diff options
author | myltsev <myltsev@yandex-team.ru> | 2022-02-10 16:46:03 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:03 +0300 |
commit | 9166d66c30c23c9e85a7c88185a068987148d23f (patch) | |
tree | 421bdcec5755d9e441c485560aab5ab8d74c7475 /util/charset/wide_ut.cpp | |
parent | 8d3a5ed3a188a34167eaee54f1691ce5c9edf2f3 (diff) | |
download | ydb-9166d66c30c23c9e85a7c88185a068987148d23f.tar.gz |
Restoring authorship annotation for <myltsev@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/charset/wide_ut.cpp')
-rw-r--r-- | util/charset/wide_ut.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/util/charset/wide_ut.cpp b/util/charset/wide_ut.cpp index d8f3233e73..d24d8ceb87 100644 --- a/util/charset/wide_ut.cpp +++ b/util/charset/wide_ut.cpp @@ -193,7 +193,7 @@ public: void TestUTF8ToWide(); void TestWideToUTF8(); void TestGetNumOfUTF8Chars(); - void TestSubstrUTF8(); + void TestSubstrUTF8(); void TestUnicodeCase(); void TestUnicodeDetails(); void TestHexConversion(); @@ -549,14 +549,14 @@ void TConversionTest::TestGetNumOfUTF8Chars() { UNIT_ASSERT_EQUAL(GetNumberOfUTF8Chars("привет!"), 7); } -void TConversionTest::TestSubstrUTF8() { - TStringBuf utextBuf(utext, sizeof(utext)); - UNIT_ASSERT(SubstrUTF8(utextBuf, 0, 2) == utextBuf.substr(0, 4)); - UNIT_ASSERT(SubstrUTF8(utextBuf, 1, 1) == utextBuf.substr(2, 2)); - UNIT_ASSERT(SubstrUTF8(utextBuf, 1, 2) == utextBuf.substr(2, 4)); - UNIT_ASSERT(SubstrUTF8(utextBuf, 1, 3) == utextBuf.substr(2, 6)); -} - +void TConversionTest::TestSubstrUTF8() { + TStringBuf utextBuf(utext, sizeof(utext)); + UNIT_ASSERT(SubstrUTF8(utextBuf, 0, 2) == utextBuf.substr(0, 4)); + UNIT_ASSERT(SubstrUTF8(utextBuf, 1, 1) == utextBuf.substr(2, 2)); + UNIT_ASSERT(SubstrUTF8(utextBuf, 1, 2) == utextBuf.substr(2, 4)); + UNIT_ASSERT(SubstrUTF8(utextBuf, 1, 3) == utextBuf.substr(2, 6)); +} + inline bool MustBeSurrogate(wchar32 ch) { return ch > 0xFFFF; } |