diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /util/string/join_ut.cpp | |
parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
download | ydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/string/join_ut.cpp')
-rw-r--r-- | util/string/join_ut.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/util/string/join_ut.cpp b/util/string/join_ut.cpp index 3ed2b2459c..fde333a37d 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"); |