MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / is

Method is

test/test.cpp:115–128  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

113
114///////////////////////////////////////////////////////////////////////////////
115void UnitTest::is(bool actual, bool expected, const std::string& name, bool expfail /* = false */) {
116 ++_counter;
117 bool success = (actual == expected);
118
119 if (success and !expfail) {
120 ++_passed;
121 std::cout << green("ok") << " " << _counter << " - " << name << '\n';
122 } else {
123 if (success == expfail) ++_failed;
124 std::cout << red("not ok") << " " << _counter << " - " << name
125 << (expfail ? (success ? " # FIXED" : " # TODO") : "") << "\n# expected: " << expected
126 << "\n# got: " << actual << '\n';
127 }
128}
129
130///////////////////////////////////////////////////////////////////////////////
131void UnitTest::is(size_t actual, size_t expected, const std::string& name,

Callers 15

TEST_NAMEFunction · 0.80
TEST_NAMEFunction · 0.80
TEST_NAMEFunction · 0.80
TEST_NAMEFunction · 0.80
TEST_NAMEFunction · 0.80
TEST_NAMEFunction · 0.80
TEST_NAMEFunction · 0.80
TEST_NAMEFunction · 0.80
TEST_NAMEFunction · 0.80
TEST_NAMEFunction · 0.80
TEST_NAMEFunction · 0.80
TEST_NAMEFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected