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

Function TestLimitingConsumerOnRange

util/string/split_ut.cpp:111–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111void TestLimitingConsumerOnRange(TVector<TString>& good, const char* b, const char* e, const char* d, size_t n, const char* last) {
112 TVector<TString> test;
113 TStrokaConsumer consumer(&test);
114 TLimitingConsumer<TStrokaConsumer, const char> limits(n, &consumer);
115 TCharDelimiter<const char> delim(*d);
116 SplitString(b, e, delim, limits);
117 Cmp(good, test);
118 UNIT_ASSERT_EQUAL(good, test);
119 UNIT_ASSERT_EQUAL(TString(limits.Last), TString(last));
120}
121
122Y_UNIT_TEST_SUITE(SplitStringTest) {
123 Y_UNIT_TEST(TestCharSingleDelimiter) {

Callers 1

Y_UNIT_TESTFunction · 0.85

Calls 2

CmpFunction · 0.85
SplitStringFunction · 0.70

Tested by

no test coverage detected