diff options
author | breqwas <breqwas@yandex-team.ru> | 2022-02-10 16:51:44 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:51:44 +0300 |
commit | fdc4797c0e532e31f67d394e910be45b997300f6 (patch) | |
tree | b731cecf11522a4fe35870c15f0f06cd7ce2a5a7 | |
parent | 35d70ae7f13aa7c0440e36075f3e3fbeb7d14869 (diff) | |
download | ydb-fdc4797c0e532e31f67d394e910be45b997300f6.tar.gz |
Restoring authorship annotation for <breqwas@yandex-team.ru>. Commit 1 of 2.
-rw-r--r-- | util/ysaveload.h | 14 | ||||
-rw-r--r-- | util/ysaveload_ut.cpp | 52 |
2 files changed, 33 insertions, 33 deletions
diff --git a/util/ysaveload.h b/util/ysaveload.h index 02efb4049b..1c9158a119 100644 --- a/util/ysaveload.h +++ b/util/ysaveload.h @@ -589,14 +589,14 @@ template <class K, class T, class C, class A> class TSerializer<std::map<K, T, C, A>>: public TMapSerializer<std::map<K, T, C, A>, true> { }; -template <class T1, class T2, class T3, class T4> +template <class T1, class T2, class T3, class T4> class TSerializer<TMultiMap<T1, T2, T3, T4>>: public TMapSerializer<TMultiMap<T1, T2, T3, T4>, true> { -}; - -template <class K, class T, class C, class A> -class TSerializer<std::multimap<K, T, C, A>>: public TMapSerializer<std::multimap<K, T, C, A>, true> { -}; - +}; + +template <class K, class T, class C, class A> +class TSerializer<std::multimap<K, T, C, A>>: public TMapSerializer<std::multimap<K, T, C, A>, true> { +}; + template <class T1, class T2, class T3, class T4, class T5> class TSerializer<THashMap<T1, T2, T3, T4, T5>>: public TMapSerializer<THashMap<T1, T2, T3, T4, T5>, false> { }; diff --git a/util/ysaveload_ut.cpp b/util/ysaveload_ut.cpp index 723c68f391..8fc4cab999 100644 --- a/util/ysaveload_ut.cpp +++ b/util/ysaveload_ut.cpp @@ -140,17 +140,17 @@ private: { TMultiMap<ui16, ui32> multimap; - - multimap.emplace((ui16)1, 2); - multimap.emplace((ui16)2, 3); - multimap.emplace((ui16)2, 4); - multimap.emplace((ui16)2, 5); - multimap.emplace((ui16)3, 6); - - Save(&S_, multimap); - } - - { + + multimap.emplace((ui16)1, 2); + multimap.emplace((ui16)2, 3); + multimap.emplace((ui16)2, 4); + multimap.emplace((ui16)2, 5); + multimap.emplace((ui16)3, 6); + + Save(&S_, multimap); + } + + { TSaveHelper helper; Save(&S_, helper); @@ -271,25 +271,25 @@ private: { TMultiMap<ui16, ui32> multimap; - - Load(&S_, multimap); - UNIT_ASSERT_EQUAL(multimap.size(), 5); - UNIT_ASSERT_EQUAL(multimap.find((ui16)1)->second, 2); - UNIT_ASSERT_EQUAL(multimap.find((ui16)3)->second, 6); - + + Load(&S_, multimap); + UNIT_ASSERT_EQUAL(multimap.size(), 5); + UNIT_ASSERT_EQUAL(multimap.find((ui16)1)->second, 2); + UNIT_ASSERT_EQUAL(multimap.find((ui16)3)->second, 6); + THashSet<ui32> values; - auto range = multimap.equal_range((ui16)2); - for (auto i = range.first; i != range.second; ++i) { - values.insert(i->second); - } - - UNIT_ASSERT_EQUAL(values.size(), 3); + auto range = multimap.equal_range((ui16)2); + for (auto i = range.first; i != range.second; ++i) { + values.insert(i->second); + } + + UNIT_ASSERT_EQUAL(values.size(), 3); UNIT_ASSERT_EQUAL(values.contains(3), true); UNIT_ASSERT_EQUAL(values.contains(4), true); UNIT_ASSERT_EQUAL(values.contains(5), true); - } - - { + } + + { TSaveHelper helper; Load(&S_, helper); |