8 #include <doctest/doctest.h> 14 TEST_CASE(
"FloatingPointComparisonDefaultTolerance")
56 TEST_CASE(
"FloatingPointComparisonLargePositiveNumbersDefaultTolerance")
70 TEST_CASE(
"FloatingPointComparisonLargeNegativeNumbersDefaultTolerance")
84 TEST_CASE(
"FloatingPointComparisonSpecifiedTolerance")
113 TEST_CASE(
"FloatingPointComparisonLargePositiveNumbersSpecifiedTolerance")
125 TEST_CASE(
"FloatingPointComparisonLargeNegativeNumbersSpecifiedTolerance")
TEST_SUITE("FloatingPointComparisonSuite")
bool within_percentage_tolerance(float a, float b, float tolerancePercent=1.0f)
Compare two floats and return true if their values are within a specified tolerance of each other...