diff options
author | iaz1607 <iaz1607@yandex-team.ru> | 2022-02-10 16:45:37 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:37 +0300 |
commit | 94e51c602b555459333b3c6ae92476c424c930bc (patch) | |
tree | b2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /util/charset | |
parent | e5437feb4ac2d2dc044e1090b9312dde5ef197e0 (diff) | |
download | ydb-94e51c602b555459333b3c6ae92476c424c930bc.tar.gz |
Restoring authorship annotation for <iaz1607@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/charset')
-rw-r--r-- | util/charset/wide_ut.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/util/charset/wide_ut.cpp b/util/charset/wide_ut.cpp index 70c1b0af2d..d8f3233e73 100644 --- a/util/charset/wide_ut.cpp +++ b/util/charset/wide_ut.cpp @@ -163,8 +163,8 @@ namespace { class TConversionTest: public TTestBase { private: //! @note every of the text can have zeros in the middle - const TUtf16String UnicodeText_; - const TString Utf8Text_; + const TUtf16String UnicodeText_; + const TString Utf8Text_; private: UNIT_TEST_SUITE(TConversionTest); @@ -182,8 +182,8 @@ private: public: TConversionTest() - : UnicodeText_(CreateUnicodeText()) - , Utf8Text_(CreateUTF8Text()) + : UnicodeText_(CreateUnicodeText()) + , Utf8Text_(CreateUTF8Text()) { } @@ -466,13 +466,13 @@ static void TestSurrogates(const char* str, const wchar16* wide, size_t wideSize } void TConversionTest::TestUTF8ToWide() { - TUtf16String w = UTF8ToWide(Utf8Text_); + TUtf16String w = UTF8ToWide(Utf8Text_); UNIT_ASSERT(w.size() == 256); - UNIT_ASSERT(w.size() == UnicodeText_.size()); + UNIT_ASSERT(w.size() == UnicodeText_.size()); for (int i = 0; i < 256; ++i) { - UNIT_ASSERT_VALUES_EQUAL(w[i], UnicodeText_[i]); + UNIT_ASSERT_VALUES_EQUAL(w[i], UnicodeText_[i]); } wchar16 buffer[4] = {0}; @@ -516,23 +516,23 @@ void TConversionTest::TestUTF8ToWide() { } void TConversionTest::TestWideToUTF8() { - TString s = WideToUTF8(UnicodeText_); + TString s = WideToUTF8(UnicodeText_); size_t len = 0; - for (TUtf16String::const_iterator i = UnicodeText_.begin(), ie = UnicodeText_.end(); i != ie; ++i) { + for (TUtf16String::const_iterator i = UnicodeText_.begin(), ie = UnicodeText_.end(); i != ie; ++i) { len += UTF8RuneLenByUCS(*i); } - UNIT_ASSERT(s.size() == Utf8Text_.size()); + UNIT_ASSERT(s.size() == Utf8Text_.size()); UNIT_ASSERT(s.size() == len); for (int i = 0; i < static_cast<int>(s.size()); ++i) { - UNIT_ASSERT_VALUES_EQUAL(s[i], Utf8Text_[i]); + UNIT_ASSERT_VALUES_EQUAL(s[i], Utf8Text_[i]); } } void TConversionTest::TestGetNumOfUTF8Chars() { size_t n = 0; - bool result = GetNumberOfUTF8Chars(Utf8Text_.c_str(), Utf8Text_.size(), n); + bool result = GetNumberOfUTF8Chars(Utf8Text_.c_str(), Utf8Text_.size(), n); UNIT_ASSERT(result); UNIT_ASSERT(n == 256); |