aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/strbuf_ut.cpp
diff options
context:
space:
mode:
authordobrokot <dobrokot@yandex-team.ru>2022-02-10 16:49:07 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:07 +0300
commit25d83bf841d8b3ce3886525078f1964ac3c293c5 (patch)
treebd52fa16c8dd727890b2ef9d87d1a402bd0d3a9a /util/generic/strbuf_ut.cpp
parent1d2e8a8e9976488ea69a7e4763aa749244f82612 (diff)
downloadydb-25d83bf841d8b3ce3886525078f1964ac3c293c5.tar.gz
Restoring authorship annotation for <dobrokot@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/strbuf_ut.cpp')
-rw-r--r--util/generic/strbuf_ut.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/util/generic/strbuf_ut.cpp b/util/generic/strbuf_ut.cpp
index 69cde785af..195b7b1b5d 100644
--- a/util/generic/strbuf_ut.cpp
+++ b/util/generic/strbuf_ut.cpp
@@ -82,19 +82,19 @@ Y_UNIT_TEST_SUITE(TStrBufTest) {
}
Y_UNIT_TEST(TestAfterPrefix) {
- TStringBuf str("cat_dog");
-
- TStringBuf r = "the_same";
- UNIT_ASSERT(!str.AfterPrefix("dog", r));
- UNIT_ASSERT_EQUAL(r, "the_same");
- UNIT_ASSERT(str.AfterPrefix("cat_", r));
- UNIT_ASSERT_EQUAL(r, "dog");
-
- //example:
- str = "http://ya.ru";
- if (str.AfterPrefix("http://", r)) {
- UNIT_ASSERT_EQUAL(r, "ya.ru");
- }
+ TStringBuf str("cat_dog");
+
+ TStringBuf r = "the_same";
+ UNIT_ASSERT(!str.AfterPrefix("dog", r));
+ UNIT_ASSERT_EQUAL(r, "the_same");
+ UNIT_ASSERT(str.AfterPrefix("cat_", r));
+ UNIT_ASSERT_EQUAL(r, "dog");
+
+ //example:
+ str = "http://ya.ru";
+ if (str.AfterPrefix("http://", r)) {
+ UNIT_ASSERT_EQUAL(r, "ya.ru");
+ }
// SkipPrefix()
TStringBuf a = "abcdef";
@@ -106,22 +106,22 @@ Y_UNIT_TEST_SUITE(TStrBufTest) {
UNIT_ASSERT(a.SkipPrefix("def") && a == "");
UNIT_ASSERT(a.SkipPrefix("") && a == "");
UNIT_ASSERT(!a.SkipPrefix("def") && a == "");
- }
-
+ }
+
Y_UNIT_TEST(TestBeforeSuffix) {
- TStringBuf str("cat_dog");
-
- TStringBuf r = "the_same";
- UNIT_ASSERT(!str.BeforeSuffix("cat", r));
- UNIT_ASSERT_EQUAL(r, "the_same");
- UNIT_ASSERT(str.BeforeSuffix("_dog", r));
- UNIT_ASSERT_EQUAL(r, "cat");
-
- //example:
- str = "maps.yandex.com.ua";
- if (str.BeforeSuffix(".ru", r)) {
- UNIT_ASSERT_EQUAL(r, "maps.yandex");
- }
+ TStringBuf str("cat_dog");
+
+ TStringBuf r = "the_same";
+ UNIT_ASSERT(!str.BeforeSuffix("cat", r));
+ UNIT_ASSERT_EQUAL(r, "the_same");
+ UNIT_ASSERT(str.BeforeSuffix("_dog", r));
+ UNIT_ASSERT_EQUAL(r, "cat");
+
+ //example:
+ str = "maps.yandex.com.ua";
+ if (str.BeforeSuffix(".ru", r)) {
+ UNIT_ASSERT_EQUAL(r, "maps.yandex");
+ }
// ChopSuffix()
TStringBuf a = "abcdef";
@@ -133,8 +133,8 @@ Y_UNIT_TEST_SUITE(TStrBufTest) {
UNIT_ASSERT(a.ChopSuffix("abc") && a == "");
UNIT_ASSERT(a.ChopSuffix("") && a == "");
UNIT_ASSERT(!a.ChopSuffix("abc") && a == "");
- }
-
+ }
+
Y_UNIT_TEST(TestEmpty) {
UNIT_ASSERT(TStringBuf().empty());
UNIT_ASSERT(!TStringBuf("q").empty());