diff options
author | Alexander Fokin <apfokin@gmail.com> | 2022-02-10 16:45:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:38 +0300 |
commit | bf9e69a933f89af083d895185f01ed65e4d90766 (patch) | |
tree | b2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /util/ysaveload_ut.cpp | |
parent | 863a59a65247c24db7cb06789bc5cf79d04da32f (diff) | |
download | ydb-bf9e69a933f89af083d895185f01ed65e4d90766.tar.gz |
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'util/ysaveload_ut.cpp')
-rw-r--r-- | util/ysaveload_ut.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/util/ysaveload_ut.cpp b/util/ysaveload_ut.cpp index 5166fc97c5..723c68f391 100644 --- a/util/ysaveload_ut.cpp +++ b/util/ysaveload_ut.cpp @@ -5,7 +5,7 @@ #include <util/memory/pool.h> #include <util/stream/buffer.h> #include <util/memory/blob.h> -#include <util/generic/list.h> +#include <util/generic/list.h> #include <util/generic/map.h> #include <util/generic/set.h> #include <util/generic/hash.h> @@ -26,7 +26,7 @@ class TSaveLoadTest: public TTestBase { UNIT_TEST(TestSaveLoad) UNIT_TEST(TestNewStyle) UNIT_TEST(TestNewNewStyle) - UNIT_TEST(TestList) + UNIT_TEST(TestList) UNIT_TEST(TestTuple) UNIT_TEST(TestVariant) UNIT_TEST(TestInheritNonVirtualClass) @@ -375,21 +375,21 @@ private: UNIT_ASSERT_EQUAL((++twoIter)->second, 22); } } - - void TestList() { - TBufferStream s; - + + void TestList() { + TBufferStream s; + TList<int> list = {0, 1, 10}; - Save(&s, list); - - list.clear(); - Load(&s, list); - - UNIT_ASSERT_VALUES_EQUAL(list.size(), 3); - UNIT_ASSERT_VALUES_EQUAL(*std::next(list.begin(), 0), 0); - UNIT_ASSERT_VALUES_EQUAL(*std::next(list.begin(), 1), 1); - UNIT_ASSERT_VALUES_EQUAL(*std::next(list.begin(), 2), 10); - } + Save(&s, list); + + list.clear(); + Load(&s, list); + + UNIT_ASSERT_VALUES_EQUAL(list.size(), 3); + UNIT_ASSERT_VALUES_EQUAL(*std::next(list.begin(), 0), 0); + UNIT_ASSERT_VALUES_EQUAL(*std::next(list.begin(), 1), 1); + UNIT_ASSERT_VALUES_EQUAL(*std::next(list.begin(), 2), 10); + } void TestTuple() { TBufferStream s; |