diff options
author | mihaild <mihaild@yandex-team.ru> | 2022-02-10 16:46:59 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:59 +0300 |
commit | 246417ad6168d3f7ab4a0cf1c79ba4259f7c45ae (patch) | |
tree | 2a65611ade91c8ae2f55647107c1a11ea743abd5 /util/charset/utf8_ut.cpp | |
parent | 5598c5e7bc7619bd51d87fea7b880b7788ad0b47 (diff) | |
download | ydb-246417ad6168d3f7ab4a0cf1c79ba4259f7c45ae.tar.gz |
Restoring authorship annotation for <mihaild@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/charset/utf8_ut.cpp')
-rw-r--r-- | util/charset/utf8_ut.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/charset/utf8_ut.cpp b/util/charset/utf8_ut.cpp index 9e68881cca..8eadb3f808 100644 --- a/util/charset/utf8_ut.cpp +++ b/util/charset/utf8_ut.cpp @@ -108,19 +108,19 @@ Y_UNIT_TEST_SUITE(TUtfUtilTest) { UNIT_ASSERT_EXCEPTION(UTF8ToWide(text), yexception); } } - + Y_UNIT_TEST(TestUTF8ToWideScalar) { TFileInput in(ArcadiaSourceRoot() + TStringBuf("/util/charset/ut/utf8/test1.txt")); - + TString text = in.ReadAll(); TUtf16String wtextSSE = UTF8ToWide(text); TUtf16String wtextScalar = TUtf16String::Uninitialized(text.size()); - const unsigned char* textBegin = reinterpret_cast<const unsigned char*>(text.c_str()); - wchar16* wtextBegin = wtextScalar.begin(); - ::NDetail::UTF8ToWideImplScalar<false>(textBegin, textBegin + text.size(), wtextBegin); - UNIT_ASSERT(wtextBegin == wtextScalar.begin() + wtextSSE.size()); - UNIT_ASSERT(textBegin == reinterpret_cast<const unsigned char*>(text.end())); - wtextScalar.remove(wtextSSE.size()); - UNIT_ASSERT(wtextScalar == wtextSSE); - } + const unsigned char* textBegin = reinterpret_cast<const unsigned char*>(text.c_str()); + wchar16* wtextBegin = wtextScalar.begin(); + ::NDetail::UTF8ToWideImplScalar<false>(textBegin, textBegin + text.size(), wtextBegin); + UNIT_ASSERT(wtextBegin == wtextScalar.begin() + wtextSSE.size()); + UNIT_ASSERT(textBegin == reinterpret_cast<const unsigned char*>(text.end())); + wtextScalar.remove(wtextSSE.size()); + UNIT_ASSERT(wtextScalar == wtextSSE); + } } |