MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / assert_false

Function assert_false

tester/test_header.cpp:35–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void assert_false(bool actual, bool kill = false) {
36 if (false != actual) {
37 ANY_FAILED = true;
38 cout << "Assertion failed:" << endl;
39 cout << "Expected: " << "false" << endl;
40 cout << " Actual: " << "true" << endl;
41 assert(false);
42 if (kill) assert(false);
43 }
44}
45
46void assert_almost_equal(double a, double b, double eps = 1e-9, bool kill = false) {
47 assert_true(abs(a - b) < eps, kill);

Callers 9

testFunction · 0.85
testFunction · 0.85
testFunction · 0.85
testFunction · 0.85
testFunction · 0.85
testFunction · 0.85
testFunction · 0.85
testFunction · 0.85
testFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected