summaryrefslogtreecommitdiffstats
path: root/util/string/join_ut.cpp
diff options
context:
space:
mode:
authoryazevnul <[email protected]>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /util/string/join_ut.cpp
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/string/join_ut.cpp')
-rw-r--r--util/string/join_ut.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/string/join_ut.cpp b/util/string/join_ut.cpp
index fde333a37df..3ed2b2459c4 100644
--- a/util/string/join_ut.cpp
+++ b/util/string/join_ut.cpp
@@ -3,7 +3,7 @@
#include <library/cpp/testing/unittest/registar.h>
#include <util/generic/vector.h>
-#include <util/stream/output.h>
+#include <util/stream/output.h>
struct TCustomData {
TVector<int> Ints;
@@ -13,8 +13,8 @@ TString ToString(const TCustomData& d) {
return JoinSeq("__", d.Ints);
}
-Y_UNIT_TEST_SUITE(JoinStringTest) {
- Y_UNIT_TEST(ScalarItems) {
+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, TString("foobar")), "10, 11.1, foobar");
@@ -26,7 +26,7 @@ Y_UNIT_TEST_SUITE(JoinStringTest) {
UNIT_ASSERT_EQUAL(Join(" ", "a", "b", "", "c"), "a b c");
}
- Y_UNIT_TEST(IntContainerItems) {
+ Y_UNIT_TEST(IntContainerItems) {
int v[] = {1, 2, 3};
TVector<int> vv(v, v + 3);
UNIT_ASSERT_EQUAL(JoinSeq(" ", vv), "1 2 3");
@@ -38,7 +38,7 @@ Y_UNIT_TEST_SUITE(JoinStringTest) {
UNIT_ASSERT_VALUES_EQUAL(JoinSeq(" ", v), "1 2 3");
}
- Y_UNIT_TEST(StrContainerItems) {
+ Y_UNIT_TEST(StrContainerItems) {
// try various overloads and template type arguments
static const char* const result = "1 22 333";
static const char* const v[] = {"1", "22", "333"};
@@ -148,13 +148,13 @@ Y_UNIT_TEST_SUITE(JoinStringTest) {
UNIT_ASSERT_VALUES_EQUAL(JoinSeq(" ", v), result);
}
- Y_UNIT_TEST(CustomToString) {
- TCustomData d1{{1, 2, 3, 4, 5}};
- TCustomData d2{{0, -1, -2}};
+ Y_UNIT_TEST(CustomToString) {
+ TCustomData d1{{1, 2, 3, 4, 5}};
+ TCustomData d2{{0, -1, -2}};
UNIT_ASSERT_EQUAL(Join(" ", d1, d2), "1__2__3__4__5 0__-1__-2");
}
- Y_UNIT_TEST(JoinChars) {
+ Y_UNIT_TEST(JoinChars) {
// Note that char delimeter is printed as single char string,
// but joined char values are printed as their numeric codes! O_o
UNIT_ASSERT_EQUAL(Join('a', 'a', 'a'), "97a97");