diff options
| author | aosipenko <[email protected]> | 2022-02-10 16:48:08 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:48:08 +0300 |
| commit | 948fd24d47d4b3b7815aaef1686aea00ef3f4288 (patch) | |
| tree | 8ad4c39c2a5f8b341bc02e3b0c5e8f26c40373cb /util/string/util_ut.cpp | |
| parent | d2eb4aae699fa2f6901bf32d22eec019c8f29838 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'util/string/util_ut.cpp')
| -rw-r--r-- | util/string/util_ut.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/util/string/util_ut.cpp b/util/string/util_ut.cpp index 18a2d8e1957..7012e9714ce 100644 --- a/util/string/util_ut.cpp +++ b/util/string/util_ut.cpp @@ -22,25 +22,25 @@ public: UNIT_ASSERT_EQUAL(strcmp(rul.sep(s1), "+-"), 0); UNIT_ASSERT_EQUAL(rul.sep(s1), nullptr); } - - void TestRemoveAll() { - static const struct T { - const char* Str; - char Ch; - const char* Result; + + void TestRemoveAll() { + static const struct T { + const char* Str; + char Ch; + const char* Result; } tests[] = { {"", 'x', ""}, {"hello world", 'h', "ello world"}, {"hello world", 'l', "heo word"}, {"hello world", 'x', "hello world"}, }; - + for (const T* t = tests; t != std::end(tests); ++t) { TString str(t->Str); - RemoveAll(str, t->Ch); - UNIT_ASSERT_EQUAL(t->Result, str); - } - } + RemoveAll(str, t->Ch); + UNIT_ASSERT_EQUAL(t->Result, str); + } + } }; UNIT_TEST_SUITE_REGISTRATION(TStrUtilTest); |
