aboutsummaryrefslogtreecommitdiff
path: root/libc/test/src/math/ilogbl_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/test/src/math/ilogbl_test.cpp')
-rw-r--r--libc/test/src/math/ilogbl_test.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/libc/test/src/math/ilogbl_test.cpp b/libc/test/src/math/ilogbl_test.cpp
new file mode 100644
index 000000000000..6404c6b00fd1
--- /dev/null
+++ b/libc/test/src/math/ilogbl_test.cpp
@@ -0,0 +1,41 @@
+//===-- Unittests for ilogbl ----------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "ILogbTest.h"
+
+#include "include/math.h"
+#include "src/math/ilogbl.h"
+#include "utils/CPP/Functional.h"
+#include "utils/FPUtil/FPBits.h"
+#include "utils/FPUtil/ManipulationFunctions.h"
+#include "utils/FPUtil/TestHelpers.h"
+#include "utils/UnitTest/Test.h"
+
+#include <limits.h>
+
+using RunContext = __llvm_libc::testing::RunContext;
+
+TEST_F(ILogbTest, SpecialNumbers_ilogbl) {
+ testSpecialNumbers<long double>(&__llvm_libc::ilogbl);
+}
+
+TEST_F(ILogbTest, PowersOfTwo_ilogbl) {
+ testPowersOfTwo<long double>(&__llvm_libc::ilogbl);
+}
+
+TEST_F(ILogbTest, SomeIntegers_ilogbl) {
+ testSomeIntegers<long double>(&__llvm_libc::ilogbl);
+}
+
+TEST_F(ILogbTest, SubnormalRange_ilogbl) {
+ testSubnormalRange<long double>(&__llvm_libc::ilogbl);
+}
+
+TEST_F(ILogbTest, NormalRange_ilogbl) {
+ testNormalRange<long double>(&__llvm_libc::ilogbl);
+}