aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic
diff options
context:
space:
mode:
authorkerzum <kerzum@yandex-team.ru>2022-02-10 16:49:33 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:33 +0300
commit47a7e7b29636bfb2deb1df5f92363b3c75229c95 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic
parent9a7232babfd763ccfe827bc70e82e0f50cfd8276 (diff)
downloadydb-47a7e7b29636bfb2deb1df5f92363b3c75229c95.tar.gz
Restoring authorship annotation for <kerzum@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic')
-rw-r--r--util/generic/buffer.h2
-rw-r--r--util/generic/buffer_ut.cpp10
-rw-r--r--util/generic/string_ut.cpp10
-rw-r--r--util/generic/ylimits_ut.cpp2
4 files changed, 12 insertions, 12 deletions
diff --git a/util/generic/buffer.h b/util/generic/buffer.h
index bdf469da08..9576467404 100644
--- a/util/generic/buffer.h
+++ b/util/generic/buffer.h
@@ -161,7 +161,7 @@ public:
Reserve(len);
Pos_ = len;
}
-
+
// Method works like Resize, but allocates exact specified number of bytes
// rather than rounded up to next power of 2
// Use with care
diff --git a/util/generic/buffer_ut.cpp b/util/generic/buffer_ut.cpp
index d6c7f70e0c..437d7122ec 100644
--- a/util/generic/buffer_ut.cpp
+++ b/util/generic/buffer_ut.cpp
@@ -56,22 +56,22 @@ Y_UNIT_TEST_SUITE(TBufferTest) {
buf.Resize(10);
UNIT_ASSERT_VALUES_EQUAL(buf.size(), 10u);
-
+
buf.Resize(0);
UNIT_ASSERT_VALUES_EQUAL(buf.size(), 0u);
-
+
buf.Resize(9);
memcpy(buf.data(), content, 9);
UNIT_ASSERT_VALUES_EQUAL(TString(buf.data(), buf.size()), "some text");
-
+
buf.Resize(4);
UNIT_ASSERT_VALUES_EQUAL(TString(buf.data(), buf.size()), "some");
}
-
+
Y_UNIT_TEST(TestReserve) {
TBuffer buf;
UNIT_ASSERT_EQUAL(buf.Capacity(), 0);
-
+
buf.Reserve(4);
UNIT_ASSERT_EQUAL(buf.Capacity(), 4);
diff --git a/util/generic/string_ut.cpp b/util/generic/string_ut.cpp
index b9099371b0..ac82e9091d 100644
--- a/util/generic/string_ut.cpp
+++ b/util/generic/string_ut.cpp
@@ -23,9 +23,9 @@ static_assert(sizeof(TString) == sizeof(const char*), "expect sizeof(TString) ==
class TStringTestZero: public TTestBase {
UNIT_TEST_SUITE(TStringTestZero);
UNIT_TEST(TestZero);
- UNIT_TEST_SUITE_END();
+ UNIT_TEST_SUITE_END();
-public:
+public:
void TestZero() {
const char data[] = "abc\0def\0";
TString s(data, sizeof(data));
@@ -33,7 +33,7 @@ public:
UNIT_ASSERT(s.StartsWith(s));
UNIT_ASSERT(s.EndsWith(s));
UNIT_ASSERT(s.Contains('\0'));
-
+
const char raw_def[] = "def";
const char raw_zero[] = "\0";
TString def(raw_def, sizeof(raw_def) - 1);
@@ -52,7 +52,7 @@ public:
UNIT_ASSERT(s != copy);
copy.replace(copy.size() - 1, 1, "\0", 0, 1);
UNIT_ASSERT(s == copy);
-
+
TString prefix(data, 5);
UNIT_ASSERT(s.StartsWith(prefix));
UNIT_ASSERT(s != prefix);
@@ -60,7 +60,7 @@ public:
UNIT_ASSERT(s > s.data());
UNIT_ASSERT(s == TString(s.data(), s.size()));
UNIT_ASSERT(data < s);
-
+
s.remove(5);
UNIT_ASSERT(s == prefix);
}
diff --git a/util/generic/ylimits_ut.cpp b/util/generic/ylimits_ut.cpp
index 896043a145..f1b3c6858c 100644
--- a/util/generic/ylimits_ut.cpp
+++ b/util/generic/ylimits_ut.cpp
@@ -133,7 +133,7 @@ void TLimitTest::TestLimits() {
UNIT_ASSERT(TestFloatLimits(float()));
UNIT_ASSERT(TestFloatLimits(double()));
using long_double = long double;
- UNIT_ASSERT(RUNNING_ON_VALGRIND || TestFloatLimits(long_double()));
+ UNIT_ASSERT(RUNNING_ON_VALGRIND || TestFloatLimits(long_double()));
}
void TLimitTest::TestNan() {