diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /util/generic/mapfindptr_ut.cpp | |
parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
download | ydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/mapfindptr_ut.cpp')
-rw-r--r-- | util/generic/mapfindptr_ut.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/util/generic/mapfindptr_ut.cpp b/util/generic/mapfindptr_ut.cpp index 613da7a96b..10ed7992fe 100644 --- a/util/generic/mapfindptr_ut.cpp +++ b/util/generic/mapfindptr_ut.cpp @@ -7,16 +7,16 @@ #include "mapfindptr.h" -Y_UNIT_TEST_SUITE(TMapFindPtrTest) { +Y_UNIT_TEST_SUITE(TMapFindPtrTest) { struct TTestMap: std::map<int, TString>, TMapOps<TTestMap> {}; - Y_UNIT_TEST(TestDerivedClass) { + Y_UNIT_TEST(TestDerivedClass) { TTestMap a; a[42] = "cat"; UNIT_ASSERT(a.FindPtr(42)); UNIT_ASSERT_EQUAL(*a.FindPtr(42), "cat"); - UNIT_ASSERT_EQUAL(a.FindPtr(0), nullptr); + UNIT_ASSERT_EQUAL(a.FindPtr(0), nullptr); //test mutation if (TString* p = a.FindPtr(42)) { @@ -28,13 +28,13 @@ Y_UNIT_TEST_SUITE(TMapFindPtrTest) { //test const-overloaded functions too const TTestMap& b = a; UNIT_ASSERT(b.FindPtr(42) && *b.FindPtr(42) == "dog"); - UNIT_ASSERT_EQUAL(b.FindPtr(0), nullptr); + UNIT_ASSERT_EQUAL(b.FindPtr(0), nullptr); UNIT_ASSERT_STRINGS_EQUAL(b.Value(42, "cat"), "dog"); UNIT_ASSERT_STRINGS_EQUAL(b.Value(0, "alien"), "alien"); } - Y_UNIT_TEST(TestTemplateFind) { + Y_UNIT_TEST(TestTemplateFind) { THashMap<TString, int> m; m[TString("x")] = 2; @@ -43,7 +43,7 @@ Y_UNIT_TEST_SUITE(TMapFindPtrTest) { UNIT_ASSERT_EQUAL(*m.FindPtr(TStringBuf("x")), 2); } - Y_UNIT_TEST(TestValue) { + Y_UNIT_TEST(TestValue) { TTestMap a; a[1] = "lol"; @@ -52,7 +52,7 @@ Y_UNIT_TEST_SUITE(TMapFindPtrTest) { UNIT_ASSERT_VALUES_EQUAL(a.Value(2, "123"), "123"); } - Y_UNIT_TEST(TestValueRef) { + Y_UNIT_TEST(TestValueRef) { TTestMap a; a[1] = "lol"; |