aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/buffer_ut.cpp
diff options
context:
space:
mode:
authordanlark <danlark@yandex-team.ru>2022-02-10 16:46:10 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:10 +0300
commitbaa58daefa91fde4b4769facdbd2903763b9c6a8 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/generic/buffer_ut.cpp
parent3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (diff)
downloadydb-baa58daefa91fde4b4769facdbd2903763b9c6a8.tar.gz
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/buffer_ut.cpp')
-rw-r--r--util/generic/buffer_ut.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/util/generic/buffer_ut.cpp b/util/generic/buffer_ut.cpp
index df500cf1eb..437d7122ec 100644
--- a/util/generic/buffer_ut.cpp
+++ b/util/generic/buffer_ut.cpp
@@ -14,7 +14,7 @@ Y_UNIT_TEST_SUITE(TBufferTest) {
buf.Resize(6);
buf.EraseBack(2);
- UNIT_ASSERT_EQUAL(TString(buf.data(), buf.size()), "1234");
+ UNIT_ASSERT_EQUAL(TString(buf.data(), buf.size()), "1234");
}
Y_UNIT_TEST(TestAppend) {
@@ -32,7 +32,7 @@ Y_UNIT_TEST_SUITE(TBufferTest) {
}
}
- UNIT_ASSERT_EQUAL(TString(buf.data(), buf.size()), str);
+ UNIT_ASSERT_EQUAL(TString(buf.data(), buf.size()), str);
}
Y_UNIT_TEST(TestReset) {
@@ -55,17 +55,17 @@ Y_UNIT_TEST_SUITE(TBufferTest) {
TBuffer buf;
buf.Resize(10);
- UNIT_ASSERT_VALUES_EQUAL(buf.size(), 10u);
+ UNIT_ASSERT_VALUES_EQUAL(buf.size(), 10u);
buf.Resize(0);
- UNIT_ASSERT_VALUES_EQUAL(buf.size(), 0u);
+ 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");
+ 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");
+ UNIT_ASSERT_VALUES_EQUAL(TString(buf.data(), buf.size()), "some");
}
Y_UNIT_TEST(TestReserve) {
@@ -92,12 +92,12 @@ Y_UNIT_TEST_SUITE(TBufferTest) {
buf.Append('a');
UNIT_ASSERT_EQUAL(buf.Capacity(), 256);
TString tmp1 = "abcdef";
- buf.Append(tmp1.data(), tmp1.size());
+ buf.Append(tmp1.data(), tmp1.size());
UNIT_ASSERT_EQUAL(buf.Capacity(), 256);
TString tmp2 = "30498290sfokdsflj2308w";
buf.Resize(1020);
- buf.Append(tmp2.data(), tmp2.size());
+ buf.Append(tmp2.data(), tmp2.size());
UNIT_ASSERT_EQUAL(buf.Capacity(), 2048);
}
@@ -105,14 +105,14 @@ Y_UNIT_TEST_SUITE(TBufferTest) {
TBuffer buf;
TString content = "some text";
- buf.Append(content.data(), content.size());
+ buf.Append(content.data(), content.size());
UNIT_ASSERT_EQUAL(buf.Size(), 9);
UNIT_ASSERT_EQUAL(buf.Capacity(), 16);
buf.ShrinkToFit();
UNIT_ASSERT_EQUAL(buf.Size(), 9);
UNIT_ASSERT_EQUAL(buf.Capacity(), 9);
- UNIT_ASSERT_EQUAL(TString(buf.data(), buf.size()), content);
+ UNIT_ASSERT_EQUAL(TString(buf.data(), buf.size()), content);
const size_t MB = 1024 * 1024;
buf.Resize(MB);
@@ -184,10 +184,10 @@ Y_UNIT_TEST(TestSpeed) {
buf.Append("Some ", 5);
buf.Fill('!', 5);
buf.Append(" text.", 6);
- UNIT_ASSERT_VALUES_EQUAL(TString(buf.data(), buf.size()), "Some !!!!! text.");
+ UNIT_ASSERT_VALUES_EQUAL(TString(buf.data(), buf.size()), "Some !!!!! text.");
buf.Chop(5, 6);
- UNIT_ASSERT_VALUES_EQUAL(TString(buf.data(), buf.size()), "Some text.");
+ UNIT_ASSERT_VALUES_EQUAL(TString(buf.data(), buf.size()), "Some text.");
}
Y_UNIT_TEST(TestComparison) {