//////////////////////////////////////////////////////////////////////////
| 81 | |
| 82 | /////////////////////////////////////////////////////////////////////////////// |
| 83 | void UnitTest::ok(bool expression, const std::string& name, bool expfail /* = false */) { |
| 84 | ++_counter; |
| 85 | |
| 86 | bool success = expression; |
| 87 | |
| 88 | if (success and !expfail) { |
| 89 | ++_passed; |
| 90 | std::cout << green("ok") << " " << _counter << " - " << name << '\n'; |
| 91 | } else { |
| 92 | if (success == expfail) ++_failed; |
| 93 | std::cout << red("not ok") << " " << _counter << " - " << name |
| 94 | << (expfail ? (success ? " # FIXED" : " # TODO") : "") << '\n'; |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | /////////////////////////////////////////////////////////////////////////////// |
| 99 | void UnitTest::notok(bool expression, const std::string& name, bool expfail /* = false */) { |
no outgoing calls
no test coverage detected