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 | 11a24635da4c4f39428b182c49a7bc35e47c9534 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/generic/string_ut.h | |
parent | 317da38588b7898a99fd9168571408123350012b (diff) | |
download | ydb-11a24635da4c4f39428b182c49a7bc35e47c9534.tar.gz |
Restoring authorship annotation for <swarmer@yandex-team.ru>. Commit 2 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 906363794d..44bb10bdeb 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 |