diff options
| author | antoshkka <[email protected]> | 2022-02-10 16:50:14 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:14 +0300 |
| commit | ecc19a1fc1e15d78a9279514cb11edd9e808d600 (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic/strbuf_ut.cpp | |
| parent | 90277959ac43a22ec25e7b78b1a2b4f610530d51 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/generic/strbuf_ut.cpp')
| -rw-r--r-- | util/generic/strbuf_ut.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/util/generic/strbuf_ut.cpp b/util/generic/strbuf_ut.cpp index cc392ea0f0f..69cde785af0 100644 --- a/util/generic/strbuf_ut.cpp +++ b/util/generic/strbuf_ut.cpp @@ -319,19 +319,19 @@ Y_UNIT_TEST_SUITE(TStrBufTest) { s.SplitAt(pos, l, r); UNIT_ASSERT(l == "abcabc" && r == ""); // modified } - - template <class T> - void PassByConstReference(const T& val) { - // In https://st.yandex-team.ru/IGNIETFERRO-294 was assumed that `const char[]` types are compile time strings + + template <class T> + void PassByConstReference(const T& val) { + // In https://st.yandex-team.ru/IGNIETFERRO-294 was assumed that `const char[]` types are compile time strings // and that CharTraits::Length may not be called for them. Unfortunately that is not true, `char[]` types - // are easily converted to `const char[]` if they are passed to a function accepting `const T&`. - UNIT_ASSERT(TStringBuf(val).size() == 5); - } - + // are easily converted to `const char[]` if they are passed to a function accepting `const T&`. + UNIT_ASSERT(TStringBuf(val).size() == 5); + } + Y_UNIT_TEST(TestPassingArraysByConstReference) { - char data[] = "Hello\0word"; - PassByConstReference(data); - } + char data[] = "Hello\0word"; + PassByConstReference(data); + } Y_UNIT_TEST(TestTruncate) { TStringBuf s = "123"; |
