aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/map_ut.cpp
diff options
context:
space:
mode:
authorermolovd <ermolovd@yandex-team.ru>2022-02-10 16:47:53 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:53 +0300
commitb91bcef7c99a119b0846479ef71bfab4beec72ca (patch)
treebe118d54d12a61bc4812ceb0a266a170a2fa3bc9 /util/generic/map_ut.cpp
parentf421873774cf0b71743afbe5f6677861e66601ea (diff)
downloadydb-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.cpp50
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>;