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

Function Y_UNIT_TEST

util/string/strip_ut.cpp:33–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 };
32
33 Y_UNIT_TEST(TestStrip) {
34 for (const auto& test : StripTests) {
35 TString inputStr(test.Str);
36
37 TString s;
38 Strip(inputStr, s);
39 UNIT_ASSERT_VALUES_EQUAL(s, test.StripRes);
40
41 UNIT_ASSERT_VALUES_EQUAL(StripString(inputStr), test.StripRes);
42 UNIT_ASSERT_VALUES_EQUAL(StripStringLeft(inputStr), test.StripLeftRes);
43 UNIT_ASSERT_VALUES_EQUAL(StripStringRight(inputStr), test.StripRightRes);
44
45 TStringBuf inputStrBuf(test.Str);
46 UNIT_ASSERT_VALUES_EQUAL(StripString(inputStrBuf), test.StripRes);
47 UNIT_ASSERT_VALUES_EQUAL(StripStringLeft(inputStrBuf), test.StripLeftRes);
48 UNIT_ASSERT_VALUES_EQUAL(StripStringRight(inputStrBuf), test.StripRightRes);
49 };
50 }
51
52 Y_UNIT_TEST(TestStripInPlace) {
53 // On Darwin default locale is set to a value which interprets certain cyrillic utf-8 sequences as spaces.

Callers

nothing calls this directly

Calls 12

StripStringFunction · 0.85
StripStringLeftFunction · 0.85
StripStringRightFunction · 0.85
StripInPlaceFunction · 0.85
EqualsStripAdapterFunction · 0.85
string_viewFunction · 0.85
StripFunction · 0.70
CollapseFunction · 0.70
CollapseTextFunction · 0.70
emptyMethod · 0.45
dataMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected