aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/set_ut.cpp
diff options
context:
space:
mode:
authoriroubin <iroubin@yandex-team.ru>2022-02-10 16:52:05 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:52:05 +0300
commite1eef5fd2ea964227b9be2c182415857c35e1290 (patch)
treeab7fbbf3253d4c0e2793218f09378908beb025fb /util/generic/set_ut.cpp
parent94a4c65975048c0c31313b5105d9eb14cbde4985 (diff)
downloadydb-e1eef5fd2ea964227b9be2c182415857c35e1290.tar.gz
Restoring authorship annotation for <iroubin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/set_ut.cpp')
-rw-r--r--util/generic/set_ut.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/util/generic/set_ut.cpp b/util/generic/set_ut.cpp
index c59ab6760b..d2769d327f 100644
--- a/util/generic/set_ut.cpp
+++ b/util/generic/set_ut.cpp
@@ -198,71 +198,71 @@ Y_UNIT_TEST_SUITE(YSetTest) {
container c1;
c1.insert(100);
c1.insert(200);
-
+
container c2(c1);
-
+
UNIT_ASSERT_VALUES_EQUAL(2, c1.size());
UNIT_ASSERT_VALUES_EQUAL(2, c2.size());
UNIT_ASSERT(c1.contains(100));
UNIT_ASSERT(c2.contains(200));
-
+
container c3(std::move(c1));
-
+
UNIT_ASSERT_VALUES_EQUAL(0, c1.size());
UNIT_ASSERT_VALUES_EQUAL(2, c3.size());
UNIT_ASSERT(c3.contains(100));
-
+
c2.insert(300);
c3 = c2;
-
+
UNIT_ASSERT_VALUES_EQUAL(3, c2.size());
UNIT_ASSERT_VALUES_EQUAL(3, c3.size());
UNIT_ASSERT(c3.contains(300));
-
+
c2.insert(400);
c3 = std::move(c2);
-
+
UNIT_ASSERT_VALUES_EQUAL(0, c2.size());
UNIT_ASSERT_VALUES_EQUAL(4, c3.size());
UNIT_ASSERT(c3.contains(400));
}
-
+
{
using container = TMultiSet<int>;
-
+
container c1;
c1.insert(100);
c1.insert(200);
-
+
container c2(c1);
-
+
UNIT_ASSERT_VALUES_EQUAL(2, c1.size());
UNIT_ASSERT_VALUES_EQUAL(2, c2.size());
UNIT_ASSERT(c1.find(100) != c1.end());
UNIT_ASSERT(c2.find(200) != c2.end());
-
+
container c3(std::move(c1));
-
+
UNIT_ASSERT_VALUES_EQUAL(0, c1.size());
UNIT_ASSERT_VALUES_EQUAL(2, c3.size());
UNIT_ASSERT(c3.find(100) != c3.end());
-
+
c2.insert(300);
c3 = c2;
-
+
UNIT_ASSERT_VALUES_EQUAL(3, c2.size());
UNIT_ASSERT_VALUES_EQUAL(3, c3.size());
UNIT_ASSERT(c3.find(300) != c3.end());
-
+
c2.insert(400);
c3 = std::move(c2);
-
+
UNIT_ASSERT_VALUES_EQUAL(0, c2.size());
UNIT_ASSERT_VALUES_EQUAL(4, c3.size());
UNIT_ASSERT(c3.find(400) != c3.end());
}
- }
-
+ }
+
struct TKey {
TKey()
: m_data(0)