1 //===-- Unittests for ilogbl ----------------------------------------------===//
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/math/ilogbl.h"
12 #include "utils/FPUtil/FPBits.h"
13 #include "utils/FPUtil/ManipulationFunctions.h"
14 #include "utils/FPUtil/TestHelpers.h"
15 #include "utils/UnitTest/Test.h"
16 #include <math.h>
17 
18 using RunContext = __llvm_libc::testing::RunContext;
19 
TEST_F(ILogbTest,SpecialNumbers_ilogbl)20 TEST_F(ILogbTest, SpecialNumbers_ilogbl) {
21   testSpecialNumbers<long double>(&__llvm_libc::ilogbl);
22 }
23 
TEST_F(ILogbTest,PowersOfTwo_ilogbl)24 TEST_F(ILogbTest, PowersOfTwo_ilogbl) {
25   testPowersOfTwo<long double>(&__llvm_libc::ilogbl);
26 }
27 
TEST_F(ILogbTest,SomeIntegers_ilogbl)28 TEST_F(ILogbTest, SomeIntegers_ilogbl) {
29   testSomeIntegers<long double>(&__llvm_libc::ilogbl);
30 }
31 
TEST_F(ILogbTest,SubnormalRange_ilogbl)32 TEST_F(ILogbTest, SubnormalRange_ilogbl) {
33   testSubnormalRange<long double>(&__llvm_libc::ilogbl);
34 }
35 
TEST_F(ILogbTest,NormalRange_ilogbl)36 TEST_F(ILogbTest, NormalRange_ilogbl) {
37   testNormalRange<long double>(&__llvm_libc::ilogbl);
38 }
39