diff options
Diffstat (limited to 'libc/test/src/math/ilogbf_test.cpp')
-rw-r--r-- | libc/test/src/math/ilogbf_test.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/libc/test/src/math/ilogbf_test.cpp b/libc/test/src/math/ilogbf_test.cpp new file mode 100644 index 000000000000..109dddeca7b1 --- /dev/null +++ b/libc/test/src/math/ilogbf_test.cpp @@ -0,0 +1,41 @@ +//===-- Unittests for ilogbf ----------------------------------------------===// +// +// 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/ilogbf.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_ilogbf) { + testSpecialNumbers<float>(&__llvm_libc::ilogbf); +} + +TEST_F(ILogbTest, PowersOfTwo_ilogbf) { + testPowersOfTwo<float>(&__llvm_libc::ilogbf); +} + +TEST_F(ILogbTest, SomeIntegers_ilogbf) { + testSomeIntegers<float>(&__llvm_libc::ilogbf); +} + +TEST_F(ILogbTest, SubnormalRange_ilogbf) { + testSubnormalRange<float>(&__llvm_libc::ilogbf); +} + +TEST_F(ILogbTest, NormalRange_ilogbf) { + testNormalRange<float>(&__llvm_libc::ilogbf); +} |