summaryrefslogtreecommitdiff
path: root/libc/test/src/math/smoke/log1pf_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/test/src/math/smoke/log1pf_test.cpp')
-rw-r--r--libc/test/src/math/smoke/log1pf_test.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libc/test/src/math/smoke/log1pf_test.cpp b/libc/test/src/math/smoke/log1pf_test.cpp
index 82c2f9465f4f..6fbeb62bfa59 100644
--- a/libc/test/src/math/smoke/log1pf_test.cpp
+++ b/libc/test/src/math/smoke/log1pf_test.cpp
@@ -6,10 +6,10 @@
//
//===----------------------------------------------------------------------===//
+#include "hdr/errno_macros.h"
#include "hdr/math_macros.h"
#include "hdr/stdint_proxy.h"
#include "src/__support/FPUtil/FPBits.h"
-#include "src/__support/libc_errno.h"
#include "src/math/log1pf.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"
@@ -22,11 +22,14 @@ TEST_F(LlvmLibcLog1pfTest, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, LIBC_NAMESPACE::log1pf(aNaN));
EXPECT_FP_EQ(inf, LIBC_NAMESPACE::log1pf(inf));
+ EXPECT_MATH_ERRNO(0);
EXPECT_FP_IS_NAN_WITH_EXCEPTION(LIBC_NAMESPACE::log1pf(neg_inf), FE_INVALID);
+ EXPECT_MATH_ERRNO(EDOM);
EXPECT_FP_EQ(zero, LIBC_NAMESPACE::log1pf(0.0f));
EXPECT_FP_EQ(neg_zero, LIBC_NAMESPACE::log1pf(-0.0f));
EXPECT_FP_EQ_WITH_EXCEPTION(neg_inf, LIBC_NAMESPACE::log1pf(-1.0f),
FE_DIVBYZERO);
+ EXPECT_MATH_ERRNO(ERANGE);
}
#ifdef LIBC_TEST_FTZ_DAZ