aboutsummaryrefslogtreecommitdiff
path: root/libc/test/src/math/ilogbf_test.cpp
blob: 109dddeca7b123ce8beae5614e516a02a800908c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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);
}