1 //===-- Unittests for ilogb -----------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "ILogbTest.h"
10 
11 #include "src/__support/FPUtil/FPBits.h"
12 #include "src/__support/FPUtil/ManipulationFunctions.h"
13 #include "src/math/ilogb.h"
14 #include "utils/UnitTest/FPMatcher.h"
15 #include "utils/UnitTest/Test.h"
16 #include <math.h>
17 
18 TEST_F(LlvmLibcILogbTest, SpecialNumbers_ilogb) {
19   testSpecialNumbers<double>(&__llvm_libc::ilogb);
20 }
21 
22 TEST_F(LlvmLibcILogbTest, PowersOfTwo_ilogb) {
23   testPowersOfTwo<double>(&__llvm_libc::ilogb);
24 }
25 
26 TEST_F(LlvmLibcILogbTest, SomeIntegers_ilogb) {
27   testSomeIntegers<double>(&__llvm_libc::ilogb);
28 }
29 
30 TEST_F(LlvmLibcILogbTest, SubnormalRange_ilogb) {
31   testSubnormalRange<double>(&__llvm_libc::ilogb);
32 }
33 
34 TEST_F(LlvmLibcILogbTest, NormalRange_ilogb) {
35   testNormalRange<double>(&__llvm_libc::ilogb);
36 }
37