MCPcopy Create free account
hub / github.com/catboost/catboost / TestRemoveAll

Method TestRemoveAll

util/string/util_ut.cpp:26–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 }
25
26 void TestRemoveAll() {
27 static const struct T {
28 const char* Str;
29 char Ch;
30 const char* Result;
31 } tests[] = {
32 {"", 'x', ""},
33 {"hello world", 'h', "ello world"},
34 {"hello world", 'l', "heo word"},
35 {"hello world", 'x', "hello world"},
36 };
37
38 for (const T* t = tests; t != std::end(tests); ++t) {
39 TString str(t->Str);
40 RemoveAll(str, t->Ch);
41 UNIT_ASSERT_EQUAL(t->Result, str);
42 }
43 }
44};
45
46UNIT_TEST_SUITE_REGISTRATION(TStrUtilTest);

Callers

nothing calls this directly

Calls 2

RemoveAllFunction · 0.85
endFunction · 0.50

Tested by

no test coverage detected