Просмотр исходного кода

Restoring authorship annotation for <dobrokot@yandex-team.ru>. Commit 2 of 2.

dobrokot 3 лет назад
Родитель
Сommit
8d57b69dee

+ 1 - 1
library/cpp/bit_io/bitoutput.h

@@ -123,7 +123,7 @@ namespace NBitIO {
 
     public:
         void WriteData(const char* begin, const char* end) {
-            NAccessors::Append(*Data, begin, end); 
+            NAccessors::Append(*Data, begin, end);
         }
 
         TBitOutputVectorImpl(TVec* data)

+ 9 - 9
library/cpp/bucket_quoter/ya.make

@@ -1,11 +1,11 @@
-LIBRARY() 
- 
-OWNER(serxa) 
- 
-SRCS( 
-    bucket_quoter.cpp 
-) 
- 
-END() 
+LIBRARY()
+
+OWNER(serxa)
+
+SRCS(
+    bucket_quoter.cpp
+)
+
+END()
 
 RECURSE_FOR_TESTS(ut)

+ 5 - 5
library/cpp/cgiparam/cgiparam.cpp

@@ -90,7 +90,7 @@ static inline TString DoUnescape(const TStringBuf s) {
 }
 
 void TCgiParameters::InsertEscaped(const TStringBuf name, const TStringBuf value) {
-    InsertUnescaped(DoUnescape(name), DoUnescape(value)); 
+    InsertUnescaped(DoUnescape(name), DoUnescape(value));
 }
 
 template <bool addAll, class F>
@@ -102,17 +102,17 @@ struct TAddEscaped {
     TCgiParameters* C;
 
     inline void operator()(const TStringBuf key, const TStringBuf val) {
-        C->InsertEscaped(key, val); 
+        C->InsertEscaped(key, val);
     }
 };
 
 void TCgiParameters::Scan(const TStringBuf query, bool form) {
     Flush();
-    form ? ScanAdd(query) : ScanAddAll(query); 
+    form ? ScanAdd(query) : ScanAddAll(query);
 }
 
 void TCgiParameters::ScanAdd(const TStringBuf query) {
-    TAddEscaped f = {this}; 
+    TAddEscaped f = {this};
 
     DoScan<false>(query, f);
 }
@@ -134,7 +134,7 @@ void TCgiParameters::ScanAddAllUnescaped(const TStringBuf query) {
 }
 
 void TCgiParameters::ScanAddAll(const TStringBuf query) {
-    TAddEscaped f = {this}; 
+    TAddEscaped f = {this};
 
     DoScan<true>(query, f);
 }

+ 33 - 33
library/cpp/charset/codepage_ut.cpp

@@ -121,43 +121,43 @@ void TCodepageTest::TestUTF() {
         }
     }
     const char* badStrings[] = {
-        "\xfe", 
-        "\xff", 
-        "\xcc\xc0", 
+        "\xfe",
+        "\xff",
+        "\xcc\xc0",
         "\xf4\x90\x80\x80",
-        //overlong: 
-        "\xfe\xfe\xff\xff", 
-        "\xc0\xaf", 
-        "\xe0\x80\xaf", 
-        "\xf0\x80\x80\xaf", 
-        "\xf8\x80\x80\x80\xaf", 
-        "\xfc\x80\x80\x80\x80\xaf", 
-        "\xc1\xbf", 
-        "\xe0\x9f\xbf", 
-        "\xf0\x8f\xbf\xbf", 
-        "\xf8\x87\xbf\xbf\xbf", 
-        "\xfc\x83\xbf\xbf\xbf\xbf", 
-        "\xc0\x80", 
-        "\xe0\x80\x80", 
-        "\xf0\x80\x80\x80", 
-        "\xf8\x80\x80\x80\x80", 
-        "\xfc\x80\x80\x80\x80\x80", 
-        //UTF-16 surrogate (not covered): 
-        //"\xed\xa0\x80", 
-        //"\xed\xad\xbf", 
-        //"\xed\xae\x80", 
-        //"\xed\xaf\xbf", 
-        //"\xed\xb0\x80", 
-        //"\xed\xbe\x80", 
-        //"\xed\xbf\xbf", 
-    }; 
+        //overlong:
+        "\xfe\xfe\xff\xff",
+        "\xc0\xaf",
+        "\xe0\x80\xaf",
+        "\xf0\x80\x80\xaf",
+        "\xf8\x80\x80\x80\xaf",
+        "\xfc\x80\x80\x80\x80\xaf",
+        "\xc1\xbf",
+        "\xe0\x9f\xbf",
+        "\xf0\x8f\xbf\xbf",
+        "\xf8\x87\xbf\xbf\xbf",
+        "\xfc\x83\xbf\xbf\xbf\xbf",
+        "\xc0\x80",
+        "\xe0\x80\x80",
+        "\xf0\x80\x80\x80",
+        "\xf8\x80\x80\x80\x80",
+        "\xfc\x80\x80\x80\x80\x80",
+        //UTF-16 surrogate (not covered):
+        //"\xed\xa0\x80",
+        //"\xed\xad\xbf",
+        //"\xed\xae\x80",
+        //"\xed\xaf\xbf",
+        //"\xed\xb0\x80",
+        //"\xed\xbe\x80",
+        //"\xed\xbf\xbf",
+    };
     for (size_t i = 0; i < Y_ARRAY_SIZE(badStrings); ++i) {
-        wchar32 rune; 
+        wchar32 rune;
         const ui8* p = (const ui8*)badStrings[i];
-        size_t len; 
+        size_t len;
         RECODE_RESULT res = SafeReadUTF8Char(rune, len, p, p + strlen(badStrings[i]));
-        UNIT_ASSERT(res == RECODE_BROKENSYMBOL); 
-    } 
+        UNIT_ASSERT(res == RECODE_BROKENSYMBOL);
+    }
 }
 
 void TCodepageTest::TestBrokenMultibyte() {

+ 1 - 1
library/cpp/containers/comptrie/comptrie_builder.inl

@@ -377,7 +377,7 @@ public:
         case DATA_MALLOCED:
         case DATA_IN_MEMPOOL:
             return PayloadAsPtr();
-        case DATA_ABSENT: 
+        case DATA_ABSENT:
         default:
             abort();
         }

+ 16 - 16
library/cpp/containers/comptrie/comptrie_trie.h

@@ -110,10 +110,10 @@ public:
         return Skipper;
     }
 
-    TPacker GetPacker() const { 
-        return Packer; 
-    } 
- 
+    TPacker GetPacker() const {
+        return Packer;
+    }
+
     bool HasCorrectSkipper() const {
         return Skipper.GetPacker() == &Packer;
     }
@@ -175,9 +175,9 @@ public:
     };
 
     TConstIterator Begin() const;
-    TConstIterator begin() const; 
+    TConstIterator begin() const;
     TConstIterator End() const;
-    TConstIterator end() const; 
+    TConstIterator end() const;
 
     // Returns an iterator pointing to the smallest key in the trie >= the argument.
     // TODO: misleading name. Should be called LowerBound for consistency with stl.
@@ -422,22 +422,22 @@ typename TCompactTrie<T, D, S>::TConstIterator TCompactTrie<T, D, S>::Begin() co
 }
 
 template <class T, class D, class S>
-typename TCompactTrie<T, D, S>::TConstIterator TCompactTrie<T, D, S>::begin() const { 
-    return Begin(); 
-} 
- 
-template <class T, class D, class S> 
+typename TCompactTrie<T, D, S>::TConstIterator TCompactTrie<T, D, S>::begin() const {
+    return Begin();
+}
+
+template <class T, class D, class S>
 typename TCompactTrie<T, D, S>::TConstIterator TCompactTrie<T, D, S>::End() const {
     NCompactTrie::TOpaqueTrie self(DataHolder.AsCharPtr(), DataHolder.Length(), Skipper);
     return TConstIterator(self, EmptyValue, true, Packer);
 }
 
 template <class T, class D, class S>
-typename TCompactTrie<T, D, S>::TConstIterator TCompactTrie<T, D, S>::end() const { 
-    return End(); 
-} 
- 
-template <class T, class D, class S> 
+typename TCompactTrie<T, D, S>::TConstIterator TCompactTrie<T, D, S>::end() const {
+    return End();
+}
+
+template <class T, class D, class S>
 size_t TCompactTrie<T, D, S>::Size() const {
     size_t res = 0;
     for (TConstIterator it = Begin(); it != End(); ++it)

+ 3 - 3
library/cpp/containers/comptrie/comptrie_ut.cpp

@@ -445,11 +445,11 @@ void TCompactTrieTest::CheckIterator(const char* data, size_t datalen) {
     }
     TMap<TKey, ui64> received2;
     for (std::pair<TKey, ui64> x : trie) {
-        received2.insert(x); 
-    } 
+        received2.insert(x);
+    }
     UNIT_ASSERT(entry_count == stored.size());
     UNIT_ASSERT(received == stored);
-    UNIT_ASSERT(received2 == stored); 
+    UNIT_ASSERT(received2 == stored);
 
     std::reverse(items.begin(), items.end());
     typename TCompactTrie<T>::TConstIterator revIt = trie.End();

+ 37 - 37
library/cpp/deprecated/accessors/accessors.h

@@ -37,44 +37,44 @@ namespace NAccessors {
     inline size_t Size(const T& t) {
         return End(t) - Begin(t);
     }
- 
-    /** 
- * This gives some unification in terms of memory manipulation. 
- */ 
- 
+
+    /**
+ * This gives some unification in terms of memory manipulation.
+ */
+
+    template <typename T>
+    inline void Reserve(T& t, size_t sz) {
+        NPrivate::TReserve<T>::Do(t, sz);
+    }
+
+    template <typename T>
+    inline void Resize(T& t, size_t sz) {
+        NPrivate::TResize<T>::Do(t, sz);
+    }
+
+    template <typename T>
+    inline void Clear(T& t) {
+        NPrivate::TClear<T, false>::Do(t);
+    }
+
+    template <typename T>
+    inline void Init(T& t) {
+        NPrivate::TClear<T, true>::Do(t);
+    }
+
+    template <typename T>
+    inline void Append(T& t, const typename TMemoryTraits<T>::TElementType& v) {
+        NPrivate::TAppend<T>::Do(t, v);
+    }
+
+    template <typename T>
+    inline void Append(T& t,
+                       const typename TMemoryTraits<T>::TElementType* beg,
+                       const typename TMemoryTraits<T>::TElementType* end) {
+        NPrivate::TAppendRegion<T>::Do(t, beg, end);
+    }
+
     template <typename T>
-    inline void Reserve(T& t, size_t sz) { 
-        NPrivate::TReserve<T>::Do(t, sz); 
-    } 
- 
-    template <typename T> 
-    inline void Resize(T& t, size_t sz) { 
-        NPrivate::TResize<T>::Do(t, sz); 
-    } 
- 
-    template <typename T> 
-    inline void Clear(T& t) { 
-        NPrivate::TClear<T, false>::Do(t); 
-    } 
- 
-    template <typename T> 
-    inline void Init(T& t) { 
-        NPrivate::TClear<T, true>::Do(t); 
-    } 
- 
-    template <typename T> 
-    inline void Append(T& t, const typename TMemoryTraits<T>::TElementType& v) { 
-        NPrivate::TAppend<T>::Do(t, v); 
-    } 
- 
-    template <typename T> 
-    inline void Append(T& t, 
-                       const typename TMemoryTraits<T>::TElementType* beg, 
-                       const typename TMemoryTraits<T>::TElementType* end) { 
-        NPrivate::TAppendRegion<T>::Do(t, beg, end); 
-    } 
- 
-    template <typename T> 
     inline void Assign(T& t,
                        const typename TMemoryTraits<T>::TElementType* beg,
                        const typename TMemoryTraits<T>::TElementType* end) {

+ 198 - 198
library/cpp/deprecated/accessors/accessors_impl.h

@@ -113,236 +113,236 @@ namespace NAccessors {
                 return TGet::Get(b);
             }
         };
- 
-        template <typename Ta, bool Init> 
-        struct TClear: public TMemoryAccessorBase<Ta> { 
-            template <typename Tb> 
-            struct TNoMemoryIndirectionClear { 
-                static void Do(Tb& b) { 
-                    Zero(b); 
-                } 
-            }; 
- 
-            template <typename Tb> 
-            struct TIndirectMemoryRegionClear { 
+
+        template <typename Ta, bool Init>
+        struct TClear: public TMemoryAccessorBase<Ta> {
+            template <typename Tb>
+            struct TNoMemoryIndirectionClear {
+                static void Do(Tb& b) {
+                    Zero(b);
+                }
+            };
+
+            template <typename Tb>
+            struct TIndirectMemoryRegionClear {
                 Y_HAS_MEMBER(Clear);
                 Y_HAS_MEMBER(clear);
- 
-                template <typename Tc> 
-                struct TByClear { 
-                    static void Do(Tc& b) { 
-                        b.Clear(); 
-                    } 
-                }; 
- 
-                template <typename Tc> 
-                struct TByclear { 
-                    static void Do(Tc& b) { 
-                        b.clear(); 
-                    } 
-                }; 
- 
-                template <typename Tc> 
-                struct TByNone { 
-                    static void Do(Tc& b) { 
-                        if (!Init) 
-                            b = Tc(); 
-                    } 
-                }; 
- 
+
+                template <typename Tc>
+                struct TByClear {
+                    static void Do(Tc& b) {
+                        b.Clear();
+                    }
+                };
+
+                template <typename Tc>
+                struct TByclear {
+                    static void Do(Tc& b) {
+                        b.clear();
+                    }
+                };
+
+                template <typename Tc>
+                struct TByNone {
+                    static void Do(Tc& b) {
+                        if (!Init)
+                            b = Tc();
+                    }
+                };
+
                 using TDo = std::conditional_t<
                     THasClear<Tb>::value,
-                    TByClear<Tb>, 
+                    TByClear<Tb>,
                     std::conditional_t<
                         THasclear<Tb>::value,
-                        TByclear<Tb>, 
-                        TByNone<Tb>>>; 
- 
-                static void Do(Tb& b) { 
-                    TDo::Do(b); 
-                } 
-            }; 
- 
+                        TByclear<Tb>,
+                        TByNone<Tb>>>;
+
+                static void Do(Tb& b) {
+                    TDo::Do(b);
+                }
+            };
+
             using TDo = std::conditional_t<TMemoryAccessorBase<Ta>::SimpleMemory, TNoMemoryIndirectionClear<Ta>, TIndirectMemoryRegionClear<Ta>>;
- 
-            static void Do(Ta& b) { 
-                TDo::Do(b); 
-            } 
-        }; 
- 
-        template <typename Tb> 
-        struct TReserve { 
+
+            static void Do(Ta& b) {
+                TDo::Do(b);
+            }
+        };
+
+        template <typename Tb>
+        struct TReserve {
             Y_HAS_MEMBER(Reserve);
             Y_HAS_MEMBER(reserve);
- 
-            template <typename Tc> 
-            struct TByReserve { 
-                static void Do(Tc& b, size_t sz) { 
-                    b.Reserve(sz); 
-                } 
-            }; 
- 
-            template <typename Tc> 
-            struct TByreserve { 
-                static void Do(Tc& b, size_t sz) { 
-                    b.reserve(sz); 
-                } 
-            }; 
- 
-            template <typename Tc> 
-            struct TByNone { 
-                static void Do(Tc&, size_t) { 
-                } 
-            }; 
- 
+
+            template <typename Tc>
+            struct TByReserve {
+                static void Do(Tc& b, size_t sz) {
+                    b.Reserve(sz);
+                }
+            };
+
+            template <typename Tc>
+            struct TByreserve {
+                static void Do(Tc& b, size_t sz) {
+                    b.reserve(sz);
+                }
+            };
+
+            template <typename Tc>
+            struct TByNone {
+                static void Do(Tc&, size_t) {
+                }
+            };
+
             using TDo = std::conditional_t<
                 THasReserve<Tb>::value,
-                TByReserve<Tb>, 
+                TByReserve<Tb>,
                 std::conditional_t<
                     THasreserve<Tb>::value,
-                    TByreserve<Tb>, 
-                    TByNone<Tb>>>; 
- 
-            static void Do(Tb& b, size_t sz) { 
-                TDo::Do(b, sz); 
-            } 
-        }; 
- 
-        template <typename Tb> 
-        struct TResize { 
+                    TByreserve<Tb>,
+                    TByNone<Tb>>>;
+
+            static void Do(Tb& b, size_t sz) {
+                TDo::Do(b, sz);
+            }
+        };
+
+        template <typename Tb>
+        struct TResize {
             Y_HAS_MEMBER(Resize);
             Y_HAS_MEMBER(resize);
- 
-            template <typename Tc> 
-            struct TByResize { 
-                static void Do(Tc& b, size_t sz) { 
-                    b.Resize(sz); 
-                } 
-            }; 
- 
-            template <typename Tc> 
-            struct TByresize { 
-                static void Do(Tc& b, size_t sz) { 
-                    b.resize(sz); 
-                } 
-            }; 
- 
+
+            template <typename Tc>
+            struct TByResize {
+                static void Do(Tc& b, size_t sz) {
+                    b.Resize(sz);
+                }
+            };
+
+            template <typename Tc>
+            struct TByresize {
+                static void Do(Tc& b, size_t sz) {
+                    b.resize(sz);
+                }
+            };
+
             using TDo = std::conditional_t<THasResize<Tb>::value, TByResize<Tb>, TByresize<Tb>>;
- 
-            static void Do(Tb& b, size_t sz) { 
-                TDo::Do(b, sz); 
-            } 
-        }; 
- 
-        template <typename Tb> 
-        struct TAppend { 
+
+            static void Do(Tb& b, size_t sz) {
+                TDo::Do(b, sz);
+            }
+        };
+
+        template <typename Tb>
+        struct TAppend {
             Y_HAS_MEMBER(Append);
             Y_HAS_MEMBER(append);
             Y_HAS_MEMBER(push_back);
- 
-            template <typename Tc> 
-            struct TByAppend { 
-                using TElementType = typename TMemoryTraits<Tc>::TElementType; 
- 
-                static void Do(Tc& b, const TElementType& val) { 
-                    b.Append(val); 
-                } 
-            }; 
- 
-            template <typename Tc> 
-            struct TByappend { 
-                using TElementType = typename TMemoryTraits<Tc>::TElementType; 
- 
-                static void Do(Tc& b, const TElementType& val) { 
-                    b.append(val); 
-                } 
-            }; 
- 
-            template <typename Tc> 
-            struct TBypush_back { 
-                using TElementType = typename TMemoryTraits<Tc>::TElementType; 
- 
-                static void Do(Tc& b, const TElementType& val) { 
-                    b.push_back(val); 
-                } 
-            }; 
- 
+
+            template <typename Tc>
+            struct TByAppend {
+                using TElementType = typename TMemoryTraits<Tc>::TElementType;
+
+                static void Do(Tc& b, const TElementType& val) {
+                    b.Append(val);
+                }
+            };
+
+            template <typename Tc>
+            struct TByappend {
+                using TElementType = typename TMemoryTraits<Tc>::TElementType;
+
+                static void Do(Tc& b, const TElementType& val) {
+                    b.append(val);
+                }
+            };
+
+            template <typename Tc>
+            struct TBypush_back {
+                using TElementType = typename TMemoryTraits<Tc>::TElementType;
+
+                static void Do(Tc& b, const TElementType& val) {
+                    b.push_back(val);
+                }
+            };
+
             using TDo = std::conditional_t<
                 THasAppend<Tb>::value,
-                TByAppend<Tb>, 
+                TByAppend<Tb>,
                 std::conditional_t<
                     THasappend<Tb>::value,
-                    TByappend<Tb>, 
-                    TBypush_back<Tb>>>; 
- 
-            using TElementType = typename TMemoryTraits<Tb>::TElementType; 
- 
-            static void Do(Tb& b, const TElementType& val) { 
-                TDo::Do(b, val); 
-            } 
-        }; 
- 
-        template <typename Tb> 
-        struct TAppendRegion { 
+                    TByappend<Tb>,
+                    TBypush_back<Tb>>>;
+
+            using TElementType = typename TMemoryTraits<Tb>::TElementType;
+
+            static void Do(Tb& b, const TElementType& val) {
+                TDo::Do(b, val);
+            }
+        };
+
+        template <typename Tb>
+        struct TAppendRegion {
             Y_HAS_MEMBER(Append);
             Y_HAS_MEMBER(append);
             Y_HAS_MEMBER(insert);
- 
-            template <typename Tc> 
-            struct TByAppend { 
-                using TElementType = typename TMemoryTraits<Tc>::TElementType; 
- 
-                static void Do(Tc& b, const TElementType* beg, const TElementType* end) { 
-                    b.Append(beg, end); 
-                } 
-            }; 
- 
-            template <typename Tc> 
-            struct TByappend { 
-                using TElementType = typename TMemoryTraits<Tc>::TElementType; 
- 
-                static void Do(Tc& b, const TElementType* beg, const TElementType* end) { 
-                    b.append(beg, end); 
-                } 
-            }; 
- 
-            template <typename Tc> 
-            struct TByinsert { 
-                using TElementType = typename TMemoryTraits<Tc>::TElementType; 
- 
-                static void Do(Tc& b, const TElementType* beg, const TElementType* end) { 
-                    b.insert(b.end(), beg, end); 
-                } 
-            }; 
- 
-            template <typename Tc> 
-            struct TByNone { 
-                using TElementType = typename TMemoryTraits<Tc>::TElementType; 
- 
-                static void Do(Tc& b, const TElementType* beg, const TElementType* end) { 
-                    for (const TElementType* it = beg; it != end; ++it) 
-                        TAppend<Tc>::Do(b, *it); 
-                } 
-            }; 
- 
+
+            template <typename Tc>
+            struct TByAppend {
+                using TElementType = typename TMemoryTraits<Tc>::TElementType;
+
+                static void Do(Tc& b, const TElementType* beg, const TElementType* end) {
+                    b.Append(beg, end);
+                }
+            };
+
+            template <typename Tc>
+            struct TByappend {
+                using TElementType = typename TMemoryTraits<Tc>::TElementType;
+
+                static void Do(Tc& b, const TElementType* beg, const TElementType* end) {
+                    b.append(beg, end);
+                }
+            };
+
+            template <typename Tc>
+            struct TByinsert {
+                using TElementType = typename TMemoryTraits<Tc>::TElementType;
+
+                static void Do(Tc& b, const TElementType* beg, const TElementType* end) {
+                    b.insert(b.end(), beg, end);
+                }
+            };
+
+            template <typename Tc>
+            struct TByNone {
+                using TElementType = typename TMemoryTraits<Tc>::TElementType;
+
+                static void Do(Tc& b, const TElementType* beg, const TElementType* end) {
+                    for (const TElementType* it = beg; it != end; ++it)
+                        TAppend<Tc>::Do(b, *it);
+                }
+            };
+
             using TDo = std::conditional_t<
                 THasAppend<Tb>::value,
-                TByAppend<Tb>, 
+                TByAppend<Tb>,
                 std::conditional_t<
                     THasappend<Tb>::value,
-                    TByappend<Tb>, 
+                    TByappend<Tb>,
                     std::conditional_t<
                         THasinsert<Tb>::value,
-                        TByinsert<Tb>, 
-                        TByNone<Tb>>>>; 
- 
-            using TElementType = typename TMemoryTraits<Tb>::TElementType; 
- 
-            static void Do(Tb& b, const TElementType* beg, const TElementType* end) { 
-                TDo::Do(b, beg, end); 
-            } 
-        }; 
- 
+                        TByinsert<Tb>,
+                        TByNone<Tb>>>>;
+
+            using TElementType = typename TMemoryTraits<Tb>::TElementType;
+
+            static void Do(Tb& b, const TElementType* beg, const TElementType* end) {
+                TDo::Do(b, beg, end);
+            }
+        };
+
         template <typename Ta>
         struct TAssign: public TMemoryAccessorBase<Ta> {
             using TElementType = typename TMemoryTraits<Ta>::TElementType;

+ 31 - 31
library/cpp/deprecated/accessors/accessors_ut.cpp

@@ -22,30 +22,30 @@ private:
         UNIT_ASSERT_VALUES_EQUAL_C(end - beg, sz, comm);
     }
 
-    template <typename T> 
-    void TestWrite(const char* comm) { 
-        typename TMemoryTraits<T>::TElementType val[4] = {'t', 'e', 's', 't'}; 
-        T t; 
-        NAccessors::Init(t); 
-        NAccessors::Reserve(t, 6); 
- 
-        size_t sz = NAccessors::Size(t); 
-        UNIT_ASSERT_VALUES_EQUAL_C(0u, sz, comm); 
- 
-        NAccessors::Append(t, 'a'); 
-        sz = NAccessors::Size(t); 
-        UNIT_ASSERT_VALUES_EQUAL_C(1u, sz, comm); 
- 
-        NAccessors::Append(t, val, val + 4); 
-        sz = NAccessors::Size(t); 
-        UNIT_ASSERT_VALUES_EQUAL_C(5u, sz, comm); 
- 
-        NAccessors::Clear(t); 
- 
-        sz = NAccessors::Size(t); 
-        UNIT_ASSERT_VALUES_EQUAL_C(0u, sz, comm); 
-    } 
- 
+    template <typename T>
+    void TestWrite(const char* comm) {
+        typename TMemoryTraits<T>::TElementType val[4] = {'t', 'e', 's', 't'};
+        T t;
+        NAccessors::Init(t);
+        NAccessors::Reserve(t, 6);
+
+        size_t sz = NAccessors::Size(t);
+        UNIT_ASSERT_VALUES_EQUAL_C(0u, sz, comm);
+
+        NAccessors::Append(t, 'a');
+        sz = NAccessors::Size(t);
+        UNIT_ASSERT_VALUES_EQUAL_C(1u, sz, comm);
+
+        NAccessors::Append(t, val, val + 4);
+        sz = NAccessors::Size(t);
+        UNIT_ASSERT_VALUES_EQUAL_C(5u, sz, comm);
+
+        NAccessors::Clear(t);
+
+        sz = NAccessors::Size(t);
+        UNIT_ASSERT_VALUES_EQUAL_C(0u, sz, comm);
+    }
+
     void TestAccessors() {
         TestRead('a', "char");
         TestRead(1, "int");
@@ -74,17 +74,17 @@ private:
 
         TestWrite<TString>("TString");
         TestWrite<TVector<char>>("TVector<char>");
-        TestWrite<TBuffer>("TBuffer"); 
+        TestWrite<TBuffer>("TBuffer");
         TestWrite<TVector<ui64>>("TVector<ui64>");
         TestWrite<TUtf16String>("TUtf16String");
- 
+
         std::array<TString, 10> sarr;
-        NAccessors::Init(sarr); 
-        NAccessors::Clear(sarr); 
- 
+        NAccessors::Init(sarr);
+        NAccessors::Clear(sarr);
+
         std::array<char, 10> carr;
-        NAccessors::Init(carr); 
-        NAccessors::Clear(carr); 
+        NAccessors::Init(carr);
+        NAccessors::Clear(carr);
         TestRead(carr, "std::array<char, 10>");
     }
 };

Некоторые файлы не были показаны из-за большого количества измененных файлов