46 void _checkAssertion(
bool is_error,
const TraceInfo& where,
59 bool is_error = (!condition);
60 _checkAssertion(is_error, where,
"true",
"false", pm);
66 bool is_error = (condition);
67 _checkAssertion(is_error, where,
"false",
"true", pm);
77 bool is_error = (expected != actual);
78 _checkAssertion(is_error,where,expected,actual,pm);
82 void assertEqual(
const TraceInfo& where,
const T& expected,
const T& actual,
IParallelMng* pm =
nullptr)
85 bool is_error = (! (expected == actual));
86 _checkAssertion(is_error,where,String::fromNumber(expected),String::fromNumber(actual),pm);
90 void assertNearlyEqual(
const TraceInfo& where,
const T& expected,
91 const T& actual, IParallelMng* pm =
nullptr)
93 bool is_error = (!math::isNearlyEqual(expected,actual));
94 _checkAssertion(is_error,where,String::fromNumber(expected),String::fromNumber(actual),pm);
98 void assertNearlyZero(
const TraceInfo& where,
const T& actual, IParallelMng* pm =
nullptr)
100 bool is_error = (!math::isNearlyZero(actual));
101 _checkAssertion(is_error, where,
"0", String::fromNumber(actual),pm);
105 void assertNearlyEqualWithEpsilon(
const TraceInfo& where,
const T& expected,
106 const T& actual,
const T& epsilon, IParallelMng* pm =
nullptr)
108 bool is_error = (!math::isNearlyEqualWithEpsilon(expected,actual,epsilon));
109 _checkAssertion(is_error, where, String::fromNumber(expected), String::fromNumber(actual), pm);
113 void assertNearlyZeroWithEpsilon(
const TraceInfo& where,
const T& actual,
114 const T& epsilon, IParallelMng* pm =
nullptr)
116 bool is_error = (!math::isNearlyZeroWithEpsilon(actual,epsilon));
117 _checkAssertion(is_error, where,
"0", String::fromNumber(actual), pm);