diff options
Diffstat (limited to 'tests/math_test.cpp')
| -rw-r--r-- | tests/math_test.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/math_test.cpp b/tests/math_test.cpp index 7734018..6758af1 100644 --- a/tests/math_test.cpp +++ b/tests/math_test.cpp @@ -239,6 +239,12 @@ TEST(math, finite) { ASSERT_FALSE(finite(HUGE_VAL)); } +TEST(math, isinf_function) { + // The isinf macro deals with all three types; the isinf function is for doubles. + ASSERT_FALSE((isinf)(123.0)); + ASSERT_TRUE((isinf)(HUGE_VAL)); +} + TEST(math, __isinff) { ASSERT_FALSE(__isinff(123.0f)); ASSERT_TRUE(__isinff(HUGE_VALF)); @@ -249,6 +255,12 @@ TEST(math, __isinfl) { ASSERT_TRUE(__isinfl(HUGE_VALL)); } +TEST(math, isnan_function) { + // The isnan macro deals with all three types; the isnan function is for doubles. + ASSERT_FALSE((isnan)(123.0)); + ASSERT_TRUE((isnan)(nan(""))); +} + TEST(math, __isnanf) { ASSERT_FALSE(__isnanf(123.0f)); ASSERT_TRUE(__isnanf(nanf(""))); |
