Define CHECK_APPROX¶
Defined in File Shell.hpp
Define Documentation¶
-
CHECK_APPROX(expected, actual, threshold)¶
[source] Fail if
expectedandactualdiffer by more thanthreshold.Accepts any numeric type (floating-point or integral); all three operands must share the same type so mismatched pairs produce a compiler diagnostic. Handles NaN correctly: a NaN operand always fails the check.
See also
CHECK_APPROX_TEXT, approx_equal
- Parameters:
expected – Expected value.
actual – Actual value.
threshold – Maximum allowed absolute difference (must be >= 0).