| 53 | |
| 54 | template <class T, class U> |
| 55 | static void test_equality() |
| 56 | { |
| 57 | auto x1 = T(0.125); |
| 58 | auto x2 = U(0.0); |
| 59 | auto x3 = U(1.0); |
| 60 | EXPECT(test_float_equal(x1, x1)); |
| 61 | EXPECT(test_float_equal(x2, x2)); |
| 62 | EXPECT(test_float_equal(x3, x3)); |
| 63 | |
| 64 | EXPECT(not test_float_equal(x1, x2)); |
| 65 | EXPECT(not test_float_equal(x2, x1)); |
| 66 | EXPECT(not test_float_equal(x1, x3)); |
| 67 | EXPECT(not test_float_equal(x3, x1)); |
| 68 | EXPECT(not test_float_equal(x2, x3)); |
| 69 | EXPECT(not test_float_equal(x3, x2)); |
| 70 | } |
| 71 | |
| 72 | TEST_CASE_REGISTER(test_equality<double, float>); |
| 73 | TEST_CASE_REGISTER(test_equality<double, int>); |
nothing calls this directly
no test coverage detected