MCPcopy Create free account
hub / github.com/DFHack/dfhack / TEST

Function TEST

library/MiscUtils.test.cpp:6–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include <string>
5
6TEST(MiscUtils, wordwrap) {
7 std::vector<std::string> result;
8
9 word_wrap(&result, "123", 3);
10 ASSERT_EQ(result.size(), 1);
11
12 result.clear();
13 word_wrap(&result, "123456", 3);
14 ASSERT_EQ(result.size(), 2);
15
16 result.clear();
17 word_wrap(&result, "1234567", 3);
18 ASSERT_EQ(result.size(), 3);
19}

Callers 2

matchesMethod · 0.50
getMatchBitsMethod · 0.50

Calls 3

word_wrapFunction · 0.85
sizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected