aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/charset/wide_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 /library/cpp/charset/wide_ut.cpp
parent3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (diff)
downloadydb-baa58daefa91fde4b4769facdbd2903763b9c6a8.tar.gz
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/charset/wide_ut.cpp')
-rw-r--r--library/cpp/charset/wide_ut.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/charset/wide_ut.cpp b/library/cpp/charset/wide_ut.cpp
index 742db7cf95..78947d51ba 100644
--- a/library/cpp/charset/wide_ut.cpp
+++ b/library/cpp/charset/wide_ut.cpp
@@ -230,42 +230,42 @@ void TConversionTest::TestYandexEncoding() {
void TConversionTest::TestRecodeIntoString() {
TString sYandex(UnicodeText.size() * 4, 'x');
- const char* sdata = sYandex.data();
+ const char* sdata = sYandex.data();
TStringBuf sres = NDetail::Recode<wchar16>(UnicodeText, sYandex, CODES_YANDEX);
UNIT_ASSERT(sYandex == YandexText); // same content
- UNIT_ASSERT(sYandex.data() == sdata); // reserved buffer reused
- UNIT_ASSERT(sYandex.data() == sres.data()); // same buffer
- UNIT_ASSERT(sYandex.size() == sres.size()); // same size
+ UNIT_ASSERT(sYandex.data() == sdata); // reserved buffer reused
+ UNIT_ASSERT(sYandex.data() == sres.data()); // same buffer
+ UNIT_ASSERT(sYandex.size() == sres.size()); // same size
TEST_WCHAR32(sYandex, UnicodeText, CODES_YANDEX);
TUtf16String sUnicode;
sUnicode.reserve(YandexText.size() * 4);
- const wchar16* wdata = sUnicode.data();
+ const wchar16* wdata = sUnicode.data();
TWtringBuf wres = NDetail::Recode<char>(YandexText, sUnicode, CODES_YANDEX);
UNIT_ASSERT(sUnicode == UnicodeText); // same content
- UNIT_ASSERT(sUnicode.data() == wdata); // reserved buffer reused
- UNIT_ASSERT(sUnicode.data() == wres.data()); // same buffer
- UNIT_ASSERT(sUnicode.size() == wres.size()); // same size
+ UNIT_ASSERT(sUnicode.data() == wdata); // reserved buffer reused
+ UNIT_ASSERT(sUnicode.data() == wres.data()); // same buffer
+ UNIT_ASSERT(sUnicode.size() == wres.size()); // same size
TString sUtf8 = " ";
size_t scap = sUtf8.capacity();
sres = NDetail::Recode<wchar16>(UnicodeText, sUtf8, CODES_UTF8);
UNIT_ASSERT(sUtf8 == UTF8Text); // same content
UNIT_ASSERT(sUtf8.capacity() > scap); // increased buffer capacity (supplied was too small)
- UNIT_ASSERT(sUtf8.data() == sres.data()); // same buffer
- UNIT_ASSERT(sUtf8.size() == sres.size()); // same size
+ UNIT_ASSERT(sUtf8.data() == sres.data()); // same buffer
+ UNIT_ASSERT(sUtf8.size() == sres.size()); // same size
TEST_WCHAR32(sUtf8, UnicodeText, CODES_UTF8);
sUnicode.clear();
- wdata = sUnicode.data();
+ wdata = sUnicode.data();
TUtf16String copy = sUnicode; // increase ref-counter
wres = NDetail::Recode<char>(UTF8Text, sUnicode, CODES_UTF8);
UNIT_ASSERT(sUnicode == UnicodeText); // same content
#ifndef TSTRING_IS_STD_STRING
- UNIT_ASSERT(sUnicode.data() != wdata); // re-allocated (shared buffer supplied)
- UNIT_ASSERT(sUnicode.data() == wres.data()); // same buffer
+ UNIT_ASSERT(sUnicode.data() != wdata); // re-allocated (shared buffer supplied)
+ UNIT_ASSERT(sUnicode.data() == wres.data()); // same buffer
#endif
- UNIT_ASSERT(sUnicode.size() == wres.size()); // same content
+ UNIT_ASSERT(sUnicode.size() == wres.size()); // same content
}
static TString GenerateJunk(size_t seed) {