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
commit8d57b69dee81198a59c39e64704f7dc9f04b4fbf (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic/mapfindptr_ut.cpp
parent25d83bf841d8b3ce3886525078f1964ac3c293c5 (diff)
downloadydb-8d57b69dee81198a59c39e64704f7dc9f04b4fbf.tar.gz
Restoring authorship annotation for <dobrokot@yandex-team.ru>. Commit 2 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 e78817425b..613da7a96b 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");