aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/deprecated
diff options
context:
space:
mode:
authoravatar <avatar@yandex-team.ru>2022-02-10 16:50:10 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:10 +0300
commit7cba2edf1dbe4bc03ee23552d0a418bf48eb3a13 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/deprecated
parente21d5670f181bded7a3222fe235c79bea9d9f378 (diff)
downloadydb-7cba2edf1dbe4bc03ee23552d0a418bf48eb3a13.tar.gz
Restoring authorship annotation for <avatar@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/deprecated')
-rw-r--r--library/cpp/deprecated/split/delim_string_iter_ut.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/library/cpp/deprecated/split/delim_string_iter_ut.cpp b/library/cpp/deprecated/split/delim_string_iter_ut.cpp
index eb88fa927e..18a8b2a160 100644
--- a/library/cpp/deprecated/split/delim_string_iter_ut.cpp
+++ b/library/cpp/deprecated/split/delim_string_iter_ut.cpp
@@ -1,35 +1,35 @@
#include "delim_string_iter.h"
-#include <util/generic/vector.h>
+#include <util/generic/vector.h>
#include <library/cpp/testing/unittest/registar.h>
-
+
/// Test that TDelimStringIter build on top of given string and delimeter will produce expected sequence
static void AssertStringSplit(const TString& str, const TString& delim, const TVector<TString>& expected) {
TDelimStringIter it(str, delim);
-
- // test iterator invariants
- for (const auto& expectedString : expected) {
- UNIT_ASSERT(it.Valid());
+
+ // test iterator invariants
+ for (const auto& expectedString : expected) {
+ UNIT_ASSERT(it.Valid());
UNIT_ASSERT(bool(it));
UNIT_ASSERT_STRINGS_EQUAL(it->ToString(), expectedString);
- ++it;
- }
- UNIT_ASSERT(!it.Valid());
-};
-
+ ++it;
+ }
+ UNIT_ASSERT(!it.Valid());
+};
+
Y_UNIT_TEST_SUITE(TDelimStrokaIterTestSuite) {
Y_UNIT_TEST(SingleCharacterAsDelimiter) {
- AssertStringSplit(
+ AssertStringSplit(
"Hello words!", " ", {"Hello", "words!"});
- }
-
+ }
+
Y_UNIT_TEST(MultipleCharactersAsDelimiter) {
- AssertStringSplit(
+ AssertStringSplit(
"0, 1, 1, 2, 3, 5, 8, 13, 21, 34", "1, ", {"0, ", "", "2, 3, 5, 8, 13, 2", "34"});
- }
-
+ }
+
Y_UNIT_TEST(NoDelimitersPresent) {
AssertStringSplit("This string could be yours", "\t", {"This string could be yours"});
- }
+ }
Y_UNIT_TEST(Cdr) {
TDelimStringIter it("a\tc\t", "\t");
@@ -49,7 +49,7 @@ Y_UNIT_TEST_SUITE(TDelimStrokaIterTestSuite) {
UNIT_ASSERT_EQUAL(got, expected);
}
-}
+}
static void AssertKeyValueStringSplit(
const TStringBuf str,