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 /library/cpp/deprecated/split/delim_string_iter_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 'library/cpp/deprecated/split/delim_string_iter_ut.cpp')
-rw-r--r-- | library/cpp/deprecated/split/delim_string_iter_ut.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/deprecated/split/delim_string_iter_ut.cpp b/library/cpp/deprecated/split/delim_string_iter_ut.cpp index 18a8b2a160..644d72e56f 100644 --- a/library/cpp/deprecated/split/delim_string_iter_ut.cpp +++ b/library/cpp/deprecated/split/delim_string_iter_ut.cpp @@ -16,22 +16,22 @@ static void AssertStringSplit(const TString& str, const TString& delim, const TV UNIT_ASSERT(!it.Valid()); }; -Y_UNIT_TEST_SUITE(TDelimStrokaIterTestSuite) { - Y_UNIT_TEST(SingleCharacterAsDelimiter) { +Y_UNIT_TEST_SUITE(TDelimStrokaIterTestSuite) { + Y_UNIT_TEST(SingleCharacterAsDelimiter) { AssertStringSplit( "Hello words!", " ", {"Hello", "words!"}); } - Y_UNIT_TEST(MultipleCharactersAsDelimiter) { + Y_UNIT_TEST(MultipleCharactersAsDelimiter) { AssertStringSplit( "0, 1, 1, 2, 3, 5, 8, 13, 21, 34", "1, ", {"0, ", "", "2, 3, 5, 8, 13, 2", "34"}); } - Y_UNIT_TEST(NoDelimitersPresent) { + Y_UNIT_TEST(NoDelimitersPresent) { AssertStringSplit("This string could be yours", "\t", {"This string could be yours"}); } - Y_UNIT_TEST(Cdr) { + Y_UNIT_TEST(Cdr) { TDelimStringIter it("a\tc\t", "\t"); UNIT_ASSERT_STRINGS_EQUAL(*it, "a"); UNIT_ASSERT_STRINGS_EQUAL(it.Cdr(), "c\t"); @@ -39,7 +39,7 @@ Y_UNIT_TEST_SUITE(TDelimStrokaIterTestSuite) { UNIT_ASSERT_STRINGS_EQUAL(it.Cdr(), ""); } - Y_UNIT_TEST(ForIter) { + Y_UNIT_TEST(ForIter) { TVector<TStringBuf> expected = {"1", "", "3@4", ""}; TVector<TStringBuf> got; @@ -52,8 +52,8 @@ Y_UNIT_TEST_SUITE(TDelimStrokaIterTestSuite) { } static void AssertKeyValueStringSplit( - const TStringBuf str, - const TStringBuf delim, + const TStringBuf str, + const TStringBuf delim, const TVector<std::pair<TStringBuf, TStringBuf>>& expected) { TKeyValueDelimStringIter it(str, delim); @@ -66,28 +66,28 @@ static void AssertKeyValueStringSplit( UNIT_ASSERT(!it.Valid()); } -Y_UNIT_TEST_SUITE(TKeyValueDelimStringIterTestSuite) { - Y_UNIT_TEST(SingleCharacterAsDelimiter) { +Y_UNIT_TEST_SUITE(TKeyValueDelimStringIterTestSuite) { + Y_UNIT_TEST(SingleCharacterAsDelimiter) { AssertKeyValueStringSplit( "abc=123,cde=qwer", ",", {{"abc", "123"}, {"cde", "qwer"}}); } - Y_UNIT_TEST(MultipleCharactersAsDelimiter) { + Y_UNIT_TEST(MultipleCharactersAsDelimiter) { AssertKeyValueStringSplit( "abc=xyz@@qwerty=zxcv", "@@", {{"abc", "xyz"}, {"qwerty", "zxcv"}}); } - Y_UNIT_TEST(NoDelimiters) { + Y_UNIT_TEST(NoDelimiters) { AssertKeyValueStringSplit( "abc=zz", ",", {{"abc", "zz"}}); } - Y_UNIT_TEST(EmptyElements) { + Y_UNIT_TEST(EmptyElements) { AssertKeyValueStringSplit( "@@abc=zxy@@@@qwerty=y@@", "@@", {{"", ""}, |