MCPcopy Create free account
hub / github.com/comaps/comaps / TestIterWithEmptyTokens

Function TestIterWithEmptyTokens

libs/base/base_tests/string_utils_test.cpp:695–708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

693}
694
695void TestIterWithEmptyTokens(std::string const & s, char const * delims, std::vector<std::string> const & tokens)
696{
697 using namespace strings;
698 TokenizeIterator<SimpleDelimiter, std::string::const_iterator, true /* KeepEmptyTokens */> it(s.begin(), s.end(),
699 delims);
700
701 for (size_t i = 0; i < tokens.size(); ++i)
702 {
703 TEST(it, (s, delims, i));
704 TEST_EQUAL(*it, tokens[i], (s, delims, i));
705 ++it;
706 }
707 TEST(!it, (s, delims));
708}
709
710UNIT_TEST(SimpleTokenizer)
711{

Callers 1

UNIT_TESTFunction · 0.85

Calls 4

TESTFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected