summaryrefslogtreecommitdiff
path: root/libc/test/src/math/smoke/log10f_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/test/src/math/smoke/log10f_test.cpp')
-rw-r--r--libc/test/src/math/smoke/log10f_test.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/test/src/math/smoke/log10f_test.cpp b/libc/test/src/math/smoke/log10f_test.cpp
index f15da755c17e..a8b4bd0e72fd 100644
--- a/libc/test/src/math/smoke/log10f_test.cpp
+++ b/libc/test/src/math/smoke/log10f_test.cpp
@@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//
+#include "hdr/errno_macros.h"
#include "hdr/math_macros.h"
#include "hdr/stdint_proxy.h"
#include "src/__support/FPUtil/FPBits.h"
@@ -21,12 +22,19 @@ TEST_F(LlvmLibcLog10fTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, LIBC_NAMESPACE::log10f(aNaN));
EXPECT_FP_EQ(inf, LIBC_NAMESPACE::log10f(inf));
+ EXPECT_MATH_ERRNO(0);
+
EXPECT_FP_IS_NAN_WITH_EXCEPTION(LIBC_NAMESPACE::log10f(neg_inf), FE_INVALID);
+ EXPECT_MATH_ERRNO(EDOM);
EXPECT_FP_EQ_WITH_EXCEPTION(neg_inf, LIBC_NAMESPACE::log10f(0.0f),
FE_DIVBYZERO);
+ EXPECT_MATH_ERRNO(ERANGE);
EXPECT_FP_EQ_WITH_EXCEPTION(neg_inf, LIBC_NAMESPACE::log10f(-0.0f),
FE_DIVBYZERO);
+ EXPECT_MATH_ERRNO(ERANGE);
EXPECT_FP_IS_NAN_WITH_EXCEPTION(LIBC_NAMESPACE::log10f(-1.0f), FE_INVALID);
+ EXPECT_MATH_ERRNO(EDOM);
+
EXPECT_FP_EQ_ALL_ROUNDING(zero, LIBC_NAMESPACE::log10f(1.0f));
float x = 1.0f;