diff options
author | say <say@yandex-team.ru> | 2022-02-10 16:48:19 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:19 +0300 |
commit | 2096e85a73bb6b3b20ae25a92943992717fe4167 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/ysaveload_ut.cpp | |
parent | a6a6f6e1e77c7d7d0cdfad61c093e061d6fb5782 (diff) | |
download | ydb-2096e85a73bb6b3b20ae25a92943992717fe4167.tar.gz |
Restoring authorship annotation for <say@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/ysaveload_ut.cpp')
-rw-r--r-- | util/ysaveload_ut.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/util/ysaveload_ut.cpp b/util/ysaveload_ut.cpp index 7cffde04f1..723c68f391 100644 --- a/util/ysaveload_ut.cpp +++ b/util/ysaveload_ut.cpp @@ -27,7 +27,7 @@ class TSaveLoadTest: public TTestBase { UNIT_TEST(TestNewStyle) UNIT_TEST(TestNewNewStyle) UNIT_TEST(TestList) - UNIT_TEST(TestTuple) + UNIT_TEST(TestTuple) UNIT_TEST(TestVariant) UNIT_TEST(TestInheritNonVirtualClass) UNIT_TEST(TestInheritVirtualClass) @@ -390,22 +390,22 @@ private: UNIT_ASSERT_VALUES_EQUAL(*std::next(list.begin(), 1), 1); UNIT_ASSERT_VALUES_EQUAL(*std::next(list.begin(), 2), 10); } - - void TestTuple() { - TBufferStream s; - - using TTuple = std::tuple<int, TString, unsigned int>; - const TTuple toSave{-10, "qwerty", 15}; - Save(&s, toSave); - - TTuple toLoad; - Load(&s, toLoad); - - UNIT_ASSERT_VALUES_EQUAL(std::get<0>(toLoad), std::get<0>(toSave)); - UNIT_ASSERT_VALUES_EQUAL(std::get<1>(toLoad), std::get<1>(toSave)); - UNIT_ASSERT_VALUES_EQUAL(std::get<2>(toLoad), std::get<2>(toSave)); - } - + + void TestTuple() { + TBufferStream s; + + using TTuple = std::tuple<int, TString, unsigned int>; + const TTuple toSave{-10, "qwerty", 15}; + Save(&s, toSave); + + TTuple toLoad; + Load(&s, toLoad); + + UNIT_ASSERT_VALUES_EQUAL(std::get<0>(toLoad), std::get<0>(toSave)); + UNIT_ASSERT_VALUES_EQUAL(std::get<1>(toLoad), std::get<1>(toSave)); + UNIT_ASSERT_VALUES_EQUAL(std::get<2>(toLoad), std::get<2>(toSave)); + } + template <class TVariant, class T> void TestVariantImpl(TVariant& v, const T& expected) { v = expected; |