aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/mapfindptr_ut.cpp
diff options
context:
space:
mode:
authordobrokot <dobrokot@yandex-team.ru>2022-02-10 16:49:07 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:07 +0300
commit25d83bf841d8b3ce3886525078f1964ac3c293c5 (patch)
treebd52fa16c8dd727890b2ef9d87d1a402bd0d3a9a /util/generic/mapfindptr_ut.cpp
parent1d2e8a8e9976488ea69a7e4763aa749244f82612 (diff)
downloadydb-25d83bf841d8b3ce3886525078f1964ac3c293c5.tar.gz
Restoring authorship annotation for <dobrokot@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/mapfindptr_ut.cpp')
-rw-r--r--util/generic/mapfindptr_ut.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/generic/mapfindptr_ut.cpp b/util/generic/mapfindptr_ut.cpp
index 613da7a96b..e78817425b 100644
--- a/util/generic/mapfindptr_ut.cpp
+++ b/util/generic/mapfindptr_ut.cpp
@@ -2,26 +2,26 @@
#include "hash.h"
#include <library/cpp/testing/unittest/registar.h>
-
+
#include <map>
#include "mapfindptr.h"
Y_UNIT_TEST_SUITE(TMapFindPtrTest) {
struct TTestMap: std::map<int, TString>, TMapOps<TTestMap> {};
-
+
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);
-
+
//test mutation
if (TString* p = a.FindPtr(42)) {
*p = "dog";
- }
+ }
UNIT_ASSERT(a.FindPtr(42));
UNIT_ASSERT_EQUAL(*a.FindPtr(42), "dog");