diff options
author | swarmer <swarmer@yandex-team.ru> | 2022-02-10 16:46:31 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:31 +0300 |
commit | 317da38588b7898a99fd9168571408123350012b (patch) | |
tree | 25eebc31526019ad39a6c1b13f492963d97ba439 /util/generic/string_ut.h | |
parent | 3b2241461d41d41ba1a706b0750c4f0f55c344f6 (diff) | |
download | ydb-317da38588b7898a99fd9168571408123350012b.tar.gz |
Restoring authorship annotation for <swarmer@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/string_ut.h')
-rw-r--r-- | util/generic/string_ut.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/util/generic/string_ut.h b/util/generic/string_ut.h index 44bb10bdeb..906363794d 100644 --- a/util/generic/string_ut.h +++ b/util/generic/string_ut.h @@ -1031,19 +1031,19 @@ public: UNIT_ASSERT_VALUES_EQUAL(s0[3], (ui8)'\0'); UNIT_ASSERT_VALUES_EQUAL(s1[3], (ui8)'\0'); UNIT_ASSERT_VALUES_EQUAL(s2[3], (ui8)'\0'); - - /* Assignment one char reference to another results in modification of underlying character */ - { - const char_type dark_eyed[] = {'d', 'a', 'r', 'k', '-', 'e', 'y', 'e', 'd', 0}; - const char_type red_eared[] = {'r', 'e', 'd', '-', 'e', 'a', 'r', 'e', 'd', 0}; - TStringType s0 = dark_eyed; - TStringType s1 = TStringType::Uninitialized(s0.size()); - for (size_t i = 0; i < s1.size(); ++i) { - const size_t j = (3u * (i + 1u) ^ 1u) % s0.size(); - s1[i] = s0[j]; - } - UNIT_ASSERT_VALUES_EQUAL(s1, red_eared); - } + + /* Assignment one char reference to another results in modification of underlying character */ + { + const char_type dark_eyed[] = {'d', 'a', 'r', 'k', '-', 'e', 'y', 'e', 'd', 0}; + const char_type red_eared[] = {'r', 'e', 'd', '-', 'e', 'a', 'r', 'e', 'd', 0}; + TStringType s0 = dark_eyed; + TStringType s1 = TStringType::Uninitialized(s0.size()); + for (size_t i = 0; i < s1.size(); ++i) { + const size_t j = (3u * (i + 1u) ^ 1u) % s0.size(); + s1[i] = s0[j]; + } + UNIT_ASSERT_VALUES_EQUAL(s1, red_eared); + } } #endif |