45 void _checkAssertion(
bool is_error,
const TraceInfo& where,
58 bool is_error = (!condition);
59 _checkAssertion(is_error, where,
"true",
"false", pm);
65 bool is_error = (condition);
66 _checkAssertion(is_error, where,
"false",
"true", pm);
76 bool is_error = (expected != actual);
77 _checkAssertion(is_error,where,expected,actual,pm);
81 void assertEqual(
const TraceInfo& where,
const T& expected,
const T& actual,
IParallelMng* pm =
nullptr)
84 bool is_error = (! (expected == actual));
85 _checkAssertion(is_error,where,String::fromNumber(expected),String::fromNumber(actual),pm);
89 void assertNearlyEqual(
const TraceInfo& where,
const T& expected,
90 const T& actual, IParallelMng* pm =
nullptr)
92 bool is_error = (!math::isNearlyEqual(expected,actual));
93 _checkAssertion(is_error,where,String::fromNumber(expected),String::fromNumber(actual),pm);
97 void assertNearlyZero(
const TraceInfo& where,
const T& actual, IParallelMng* pm =
nullptr)
99 bool is_error = (!math::isNearlyZero(actual));
100 _checkAssertion(is_error, where,
"0", String::fromNumber(actual),pm);
104 void assertNearlyEqualWithEpsilon(
const TraceInfo& where,
const T& expected,
105 const T& actual,
const T& epsilon, IParallelMng* pm =
nullptr)
107 bool is_error = (!math::isNearlyEqualWithEpsilon(expected,actual,epsilon));
108 _checkAssertion(is_error, where, String::fromNumber(expected), String::fromNumber(actual), pm);
112 void assertNearlyZeroWithEpsilon(
const TraceInfo& where,
const T& actual,
113 const T& epsilon, IParallelMng* pm =
nullptr)
115 bool is_error = (!math::isNearlyZeroWithEpsilon(actual,epsilon));
116 _checkAssertion(is_error, where,
"0", String::fromNumber(actual), pm);