aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/utility_ut.cpp
diff options
context:
space:
mode:
authorswarmer <swarmer@yandex-team.ru>2022-02-10 16:46:31 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:31 +0300
commit317da38588b7898a99fd9168571408123350012b (patch)
tree25eebc31526019ad39a6c1b13f492963d97ba439 /util/generic/utility_ut.cpp
parent3b2241461d41d41ba1a706b0750c4f0f55c344f6 (diff)
downloadydb-317da38588b7898a99fd9168571408123350012b.tar.gz
Restoring authorship annotation for <swarmer@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/utility_ut.cpp')
-rw-r--r--util/generic/utility_ut.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/util/generic/utility_ut.cpp b/util/generic/utility_ut.cpp
index 8e9d5afff9..1e106c651f 100644
--- a/util/generic/utility_ut.cpp
+++ b/util/generic/utility_ut.cpp
@@ -23,16 +23,16 @@ private:
TTest& operator=(const TTest&);
};
-struct TUnorderedTag {
- TStringBuf Tag;
-};
-
-static bool operator<(const TUnorderedTag, const TUnorderedTag) {
- return false;
-}
-
-static bool operator>(const TUnorderedTag, const TUnorderedTag) = delete;
-
+struct TUnorderedTag {
+ TStringBuf Tag;
+};
+
+static bool operator<(const TUnorderedTag, const TUnorderedTag) {
+ return false;
+}
+
+static bool operator>(const TUnorderedTag, const TUnorderedTag) = delete;
+
Y_UNIT_TEST_SUITE(TUtilityTest) {
Y_UNIT_TEST(TestSwapPrimitive) {
@@ -60,7 +60,7 @@ Y_UNIT_TEST_SUITE(TUtilityTest) {
static_assert(Max(10, 3, 8) == 10, "Max doesn't work");
UNIT_ASSERT_EQUAL(Min(10, 3, 8), 3);
UNIT_ASSERT_EQUAL(Max(3.5, 4.2, 8.1, 99.025, 0.33, 29.0), 99.025);
-
+
UNIT_ASSERT_VALUES_EQUAL(Min(TUnorderedTag{"first"}, TUnorderedTag{"second"}).Tag, "first");
UNIT_ASSERT_VALUES_EQUAL(Max(TUnorderedTag{"first"}, TUnorderedTag{"second"}).Tag, "first");
UNIT_ASSERT_VALUES_EQUAL(Min(TUnorderedTag{"first"}, TUnorderedTag{"second"}, TUnorderedTag{"third"}).Tag, "first");