MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / parseStringPairs

Function parseStringPairs

test/DefTokenisers.cpp:8–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6{
7
8inline std::map<std::string, std::string> parseStringPairs(parser::DefTokeniser& tokeniser)
9{
10 std::map<std::string, std::string> pairs;
11
12 while (tokeniser.hasMoreTokens())
13 {
14 auto key = tokeniser.nextToken();
15 auto value = tokeniser.nextToken();
16
17 pairs.emplace(std::move(key), std::move(value));
18 }
19
20 return pairs;
21}
22
23TEST(DefTokeniser, ParseEmptyString)
24{

Callers 1

TESTFunction · 0.85

Calls 3

moveFunction · 0.85
hasMoreTokensMethod · 0.45
nextTokenMethod · 0.45

Tested by

no test coverage detected