diff options
author | ermolovd <ermolovd@yandex-team.ru> | 2022-02-10 16:47:53 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:53 +0300 |
commit | b91bcef7c99a119b0846479ef71bfab4beec72ca (patch) | |
tree | be118d54d12a61bc4812ceb0a266a170a2fa3bc9 /util/generic/map_ut.cpp | |
parent | f421873774cf0b71743afbe5f6677861e66601ea (diff) | |
download | ydb-b91bcef7c99a119b0846479ef71bfab4beec72ca.tar.gz |
Restoring authorship annotation for <ermolovd@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/map_ut.cpp')
-rw-r--r-- | util/generic/map_ut.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/util/generic/map_ut.cpp b/util/generic/map_ut.cpp index 79e832b024..8e01c8f365 100644 --- a/util/generic/map_ut.cpp +++ b/util/generic/map_ut.cpp @@ -445,37 +445,37 @@ Y_UNIT_TEST_SUITE(TYMapTest) { UNIT_ASSERT_VALUES_EQUAL(values[2], 101); } } - + Y_UNIT_TEST(TestMapInitializerList) { TMap<TString, int> m = { - {"one", 1}, - {"two", 2}, - {"three", 3}, - {"four", 4}, - }; - - UNIT_ASSERT_VALUES_EQUAL(m.size(), 4); - UNIT_ASSERT_VALUES_EQUAL(m["one"], 1); - UNIT_ASSERT_VALUES_EQUAL(m["two"], 2); - UNIT_ASSERT_VALUES_EQUAL(m["three"], 3); - UNIT_ASSERT_VALUES_EQUAL(m["four"], 4); - } - + {"one", 1}, + {"two", 2}, + {"three", 3}, + {"four", 4}, + }; + + UNIT_ASSERT_VALUES_EQUAL(m.size(), 4); + UNIT_ASSERT_VALUES_EQUAL(m["one"], 1); + UNIT_ASSERT_VALUES_EQUAL(m["two"], 2); + UNIT_ASSERT_VALUES_EQUAL(m["three"], 3); + UNIT_ASSERT_VALUES_EQUAL(m["four"], 4); + } + Y_UNIT_TEST(TestMMapInitializerList) { TMultiMap<TString, int> mm = { - {"one", 1}, - {"two", 2}, - {"two", -2}, - {"three", 3}, - }; + {"one", 1}, + {"two", 2}, + {"two", -2}, + {"three", 3}, + }; UNIT_ASSERT(mm.contains("two")); TMultiMap<TString, int> expected; - expected.emplace("one", 1); - expected.emplace("two", 2); - expected.emplace("two", -2); - expected.emplace("three", 3); - UNIT_ASSERT_VALUES_EQUAL(mm, expected); - } + expected.emplace("one", 1); + expected.emplace("two", 2); + expected.emplace("two", -2); + expected.emplace("three", 3); + UNIT_ASSERT_VALUES_EQUAL(mm, expected); + } Y_UNIT_TEST(TestMovePoolAlloc) { using TMapInPool = TMap<int, int, TLess<int>, TPoolAllocator>; |