aboutsummaryrefslogtreecommitdiffstats
path: root/util/string/join_ut.cpp
diff options
context:
space:
mode:
authorkaa <kaa@yandex-team.ru>2022-02-10 16:49:28 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:28 +0300
commitb99e8e1b6e3468f81111414c917adc2d334b2c3c (patch)
tree15f9f7cb2949ddab5a853046041062fc9c01fafb /util/string/join_ut.cpp
parent27222438aa0c42e5d9f8323344ee0cf8909491c3 (diff)
downloadydb-b99e8e1b6e3468f81111414c917adc2d334b2c3c.tar.gz
Restoring authorship annotation for <kaa@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/string/join_ut.cpp')
-rw-r--r--util/string/join_ut.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/util/string/join_ut.cpp b/util/string/join_ut.cpp
index 3ed2b2459c..3604e75a4e 100644
--- a/util/string/join_ut.cpp
+++ b/util/string/join_ut.cpp
@@ -1,10 +1,10 @@
-#include "join.h"
-
+#include "join.h"
+
#include <library/cpp/testing/unittest/registar.h>
-#include <util/generic/vector.h>
-
+#include <util/generic/vector.h>
+
#include <util/stream/output.h>
-
+
struct TCustomData {
TVector<int> Ints;
};
@@ -16,7 +16,7 @@ TString ToString(const TCustomData& d) {
Y_UNIT_TEST_SUITE(JoinStringTest) {
Y_UNIT_TEST(ScalarItems) {
UNIT_ASSERT_EQUAL(Join(',', 10, 11.1, "foobar"), "10,11.1,foobar");
- UNIT_ASSERT_EQUAL(Join(", ", 10, 11.1, "foobar"), "10, 11.1, foobar");
+ UNIT_ASSERT_EQUAL(Join(", ", 10, 11.1, "foobar"), "10, 11.1, foobar");
UNIT_ASSERT_EQUAL(Join(", ", 10, 11.1, TString("foobar")), "10, 11.1, foobar");
UNIT_ASSERT_EQUAL(Join('#', 0, "a", "foobar", -1.4, TStringBuf("aaa")), "0#a#foobar#-1.4#aaa");
@@ -24,19 +24,19 @@ Y_UNIT_TEST_SUITE(JoinStringTest) {
UNIT_ASSERT_EQUAL(Join("", "a", "b", "c"), "abc");
UNIT_ASSERT_EQUAL(Join("", "a", "b", "", "c"), "abc");
UNIT_ASSERT_EQUAL(Join(" ", "a", "b", "", "c"), "a b c");
- }
+ }
Y_UNIT_TEST(IntContainerItems) {
- int v[] = {1, 2, 3};
+ int v[] = {1, 2, 3};
TVector<int> vv(v, v + 3);
- UNIT_ASSERT_EQUAL(JoinSeq(" ", vv), "1 2 3");
- UNIT_ASSERT_EQUAL(JoinSeq(" ", vv), JoinRange(" ", vv.begin(), vv.end()));
+ UNIT_ASSERT_EQUAL(JoinSeq(" ", vv), "1 2 3");
+ UNIT_ASSERT_EQUAL(JoinSeq(" ", vv), JoinRange(" ", vv.begin(), vv.end()));
UNIT_ASSERT_EQUAL(JoinRange(" ", v, v + 2), "1 2");
UNIT_ASSERT_EQUAL(JoinSeq(" ", {}), "");
UNIT_ASSERT_EQUAL(JoinSeq(" ", {42}), "42");
UNIT_ASSERT_EQUAL(JoinSeq(" ", {1, 2, 3}), "1 2 3");
UNIT_ASSERT_VALUES_EQUAL(JoinSeq(" ", v), "1 2 3");
- }
+ }
Y_UNIT_TEST(StrContainerItems) {
// try various overloads and template type arguments
@@ -160,4 +160,4 @@ Y_UNIT_TEST_SUITE(JoinStringTest) {
UNIT_ASSERT_EQUAL(Join('a', 'a', 'a'), "97a97");
UNIT_ASSERT_EQUAL(Join("a", "a", "a"), "aaa");
}
-}
+}