diff options
| author | Tyge Løvset <[email protected]> | 2023-01-21 20:20:24 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-01-21 20:20:24 +0100 |
| commit | 2c5d525fa939cad8c50903f24b7ecc95ebfc4a87 (patch) | |
| tree | 74dbdbf48039fcc5b8b60a68f92aa83573b91f3f /misc/tests/ctest.h | |
| parent | 0197ade3ef8a2e89a466f5a1c3e512363752879b (diff) | |
| download | STC-modified-2c5d525fa939cad8c50903f24b7ecc95ebfc4a87.tar.gz STC-modified-2c5d525fa939cad8c50903f24b7ecc95ebfc4a87.zip | |
Corrected the names of float/double ctest functions to match GoogleTest
Diffstat (limited to 'misc/tests/ctest.h')
| -rw-r--r-- | misc/tests/ctest.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/misc/tests/ctest.h b/misc/tests/ctest.h index 29eb151e..483a05d7 100644 --- a/misc/tests/ctest.h +++ b/misc/tests/ctest.h @@ -225,15 +225,15 @@ void assert_fail(const char* caller, int line); #define ASSERT_FAIL() assert_fail(__FILE__, __LINE__) void assert_dbl_compare(const char* cmp, double exp, double real, double tol, const char* caller, int line); -#define ASSERT_DOUBLE_NEAR(exp, real) assert_dbl_compare("==", exp, real, -CTEST_DBL_EPSILON, __FILE__, __LINE__) -#define ASSERT_DOUBLE_NEAR_TOL(exp, real, tol) assert_dbl_compare("==", exp, real, tol, __FILE__, __LINE__) -#define ASSERT_DOUBLE_NOTNEAR(exp, real) assert_dbl_compare("!=", exp, real, -CTEST_DBL_EPSILON, __FILE__, __LINE__) -#define ASSERT_DOUBLE_NOTNEAR_TOL(exp, real, tol) assert_dbl_compare("!=", exp, real, tol, __FILE__, __LINE__) +#define ASSERT_NEAR(exp, real, tol) assert_dbl_compare("==", exp, real, tol, __FILE__, __LINE__) +#define ASSERT_NOTNEAR(exp, real, tol) assert_dbl_compare("!=", exp, real, tol, __FILE__, __LINE__) +#define ASSERT_DOUBLE_EQ(exp, real) assert_dbl_compare("==", exp, real, -CTEST_DBL_EPSILON, __FILE__, __LINE__) +#define ASSERT_DOUBLE_NE(exp, real) assert_dbl_compare("!=", exp, real, -CTEST_DBL_EPSILON, __FILE__, __LINE__) #define ASSERT_DOUBLE_LT(v1, v2) assert_dbl_compare("<", v1, v2, 0.0, __FILE__, __LINE__) #define ASSERT_DOUBLE_GT(v1, v2) assert_dbl_compare(">", v1, v2, 0.0, __FILE__, __LINE__) -#define ASSERT_FLOAT_NEAR(v1, v2) assert_dbl_compare("==", v1, v2, -CTEST_FLT_EPSILON, __FILE__, __LINE__) -#define ASSERT_FLOAT_NOTNEAR(v1, v2) assert_dbl_compare("!=", v1, v2, -CTEST_FLT_EPSILON, __FILE__, __LINE__) +#define ASSERT_FLOAT_EQ(v1, v2) assert_dbl_compare("==", v1, v2, -CTEST_FLT_EPSILON, __FILE__, __LINE__) +#define ASSERT_FLOAT_NE(v1, v2) assert_dbl_compare("!=", v1, v2, -CTEST_FLT_EPSILON, __FILE__, __LINE__) #define ASSERT_FLOAT_LT(v1, v2) assert_dbl_compare("<", (float)(v1), (float)(v2), 0.0, __FILE__, __LINE__) #define ASSERT_FLOAT_GT(v1, v2) assert_dbl_compare(">", (float)(v1), (float)(v2), 0.0, __FILE__, __LINE__) |
