aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/deprecated/split
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/deprecated/split
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/deprecated/split')
-rw-r--r--library/cpp/deprecated/split/delim_string_iter.h4
-rw-r--r--library/cpp/deprecated/split/delim_string_iter_ut.cpp26
-rw-r--r--library/cpp/deprecated/split/split_iterator.cpp4
-rw-r--r--library/cpp/deprecated/split/split_iterator.h4
4 files changed, 19 insertions, 19 deletions
diff --git a/library/cpp/deprecated/split/delim_string_iter.h b/library/cpp/deprecated/split/delim_string_iter.h
index af0d86872d..8e4ca171a0 100644
--- a/library/cpp/deprecated/split/delim_string_iter.h
+++ b/library/cpp/deprecated/split/delim_string_iter.h
@@ -173,8 +173,8 @@ public:
TKeyValueDelimStringIter(const TStringBuf str, const TStringBuf delim);
bool Valid() const;
TKeyValueDelimStringIter& operator++();
- const TStringBuf& Key() const;
- const TStringBuf& Value() const;
+ const TStringBuf& Key() const;
+ const TStringBuf& Value() const;
private:
TDelimStringIter DelimIter;
diff --git a/library/cpp/deprecated/split/delim_string_iter_ut.cpp b/library/cpp/deprecated/split/delim_string_iter_ut.cpp
index 644d72e56f..18a8b2a160 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@@", "@@",
{{"", ""},
diff --git a/library/cpp/deprecated/split/split_iterator.cpp b/library/cpp/deprecated/split/split_iterator.cpp
index ca46799dd6..32262d25bd 100644
--- a/library/cpp/deprecated/split/split_iterator.cpp
+++ b/library/cpp/deprecated/split/split_iterator.cpp
@@ -155,7 +155,7 @@ TDelimitersSplitWithoutTags::TDelimitersSplitWithoutTags(const TString& s, const
}
size_t TDelimitersSplitWithoutTags::SkipTag(size_t pos) const {
- Y_ASSERT('<' == Str[pos]);
+ Y_ASSERT('<' == Str[pos]);
while ((pos < Len) && ('>' != Str[pos]))
++pos;
return pos + 1;
@@ -236,7 +236,7 @@ TCharSplitWithoutTags::TCharSplitWithoutTags(const TString& s)
}
size_t TCharSplitWithoutTags::SkipTag(size_t pos) const {
- Y_ASSERT('<' == Str[pos]);
+ Y_ASSERT('<' == Str[pos]);
while ((pos < Len) && ('>' != Str[pos]))
++pos;
return pos + 1;
diff --git a/library/cpp/deprecated/split/split_iterator.h b/library/cpp/deprecated/split/split_iterator.h
index b1a39d81be..0eacc29228 100644
--- a/library/cpp/deprecated/split/split_iterator.h
+++ b/library/cpp/deprecated/split/split_iterator.h
@@ -25,7 +25,7 @@ struct TNumPair {
: Begin(begin)
, End(end)
{
- Y_ASSERT(begin <= end);
+ Y_ASSERT(begin <= end);
}
T Length() const {
@@ -264,7 +264,7 @@ public:
TSplitIterator(const TSplit& split)
: Split(split)
, Pos(Split.Begin())
- , CurrentStroka(nullptr)
+ , CurrentStroka(nullptr)
{
}