//////////////////////////////////////////////////////////////////////////
| 113 | |
| 114 | /////////////////////////////////////////////////////////////////////////////// |
| 115 | void 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 | /////////////////////////////////////////////////////////////////////////////// |
| 131 | void UnitTest::is(size_t actual, size_t expected, const std::string& name, |
no outgoing calls
no test coverage detected