1 //===-- Unittests for ilogbf ----------------------------------------------===// 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 "include/math.h" 12 #include "src/math/ilogbf.h" 13 #include "utils/CPP/Functional.h" 14 #include "utils/FPUtil/FPBits.h" 15 #include "utils/FPUtil/ManipulationFunctions.h" 16 #include "utils/FPUtil/TestHelpers.h" 17 #include "utils/UnitTest/Test.h" 18 19 #include <limits.h> 20 21 using RunContext = __llvm_libc::testing::RunContext; 22 23 TEST_F(ILogbTest, SpecialNumbers_ilogbf) { 24 testSpecialNumbers<float>(&__llvm_libc::ilogbf); 25 } 26 27 TEST_F(ILogbTest, PowersOfTwo_ilogbf) { 28 testPowersOfTwo<float>(&__llvm_libc::ilogbf); 29 } 30 31 TEST_F(ILogbTest, SomeIntegers_ilogbf) { 32 testSomeIntegers<float>(&__llvm_libc::ilogbf); 33 } 34 35 TEST_F(ILogbTest, SubnormalRange_ilogbf) { 36 testSubnormalRange<float>(&__llvm_libc::ilogbf); 37 } 38 39 TEST_F(ILogbTest, NormalRange_ilogbf) { 40 testNormalRange<float>(&__llvm_libc::ilogbf); 41 } 42