diff options
author | denplusplus <denplusplus@yandex-team.ru> | 2022-02-10 16:47:34 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:34 +0300 |
commit | addb3626ed629a8c7d9c8c30e87365b478a8c266 (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/on_disk/chunks/chunks_ut.cpp | |
parent | 57c20d143e8a438cd76b9fdc3ca2e8ee3ac1f32a (diff) | |
download | ydb-addb3626ed629a8c7d9c8c30e87365b478a8c266.tar.gz |
Restoring authorship annotation for <denplusplus@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/on_disk/chunks/chunks_ut.cpp')
-rw-r--r-- | library/cpp/on_disk/chunks/chunks_ut.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/on_disk/chunks/chunks_ut.cpp b/library/cpp/on_disk/chunks/chunks_ut.cpp index 8ef8f812a5..f727647f7f 100644 --- a/library/cpp/on_disk/chunks/chunks_ut.cpp +++ b/library/cpp/on_disk/chunks/chunks_ut.cpp @@ -1,11 +1,11 @@ #include <library/cpp/testing/unittest/registar.h> - + #include <util/stream/file.h> #include <util/system/filemap.h> #include <util/system/tempfile.h> - -#include "chunked_helpers.h" - + +#include "chunked_helpers.h" + /// Data for TChunkedHelpersTest::TestGeneralVector struct TPodStruct { int x; @@ -82,13 +82,13 @@ public: void TestGeneralVector() { { /// ui32 const size_t N = 3; - TBufferStream stream; - { + TBufferStream stream; + { TGeneralVectorWriter<ui32> writer; for (size_t i = 0; i < N; ++i) writer.PushBack(i); - writer.Save(stream); - } + writer.Save(stream); + } { TBlob temp = TBlob::FromStreamSingleThreaded(stream); TGeneralVector<ui32> reader(temp); @@ -138,7 +138,7 @@ public: TBlob temp = TBlob::FromStreamSingleThreaded(stream); TGeneralVector<TItem> reader(temp); UNIT_ASSERT_EQUAL(reader.GetSize(), N); - + TItem value; reader.Get(0, value); UNIT_ASSERT(value.x == 1 && value.y == 2.0); @@ -154,14 +154,14 @@ public: TVector<int> data_holder(N); int* a = &(data_holder[0]); TBufferStream stream; - { + { TGeneralVectorWriter<int*> writer; for (size_t i = 0; i < N; ++i) { a[i] = i; writer.PushBack(a + i); } writer.Save(stream); - } + } { TBlob temp = TBlob::FromStreamSingleThreaded(stream); TGeneralVector<int*> reader(temp); @@ -174,7 +174,7 @@ public: } UNIT_ASSERT_EQUAL(reader.RealSize(), sizeof(ui64) + N * sizeof(int*)); } - } + } { /// std::pair<int, int> typedef std::pair<int, int> TItem; const size_t N = 3; @@ -197,8 +197,8 @@ public: UNIT_ASSERT_EQUAL(reader.RealSize(), sizeof(ui64) + N * sizeof(TItem)); } } - } - + } + void TestStrings() { const TString FILENAME = "chunked_helpers_test.bin"; TTempFileHandle file(FILENAME.c_str()); |