1 //===-- Unittests for fdimf -----------------------------------------------===// 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 "FDimTest.h" 10 11 #include "src/__support/FPUtil/FPBits.h" 12 #include "src/math/fdimf.h" 13 #include "utils/UnitTest/FPMatcher.h" 14 #include "utils/UnitTest/Test.h" 15 #include <math.h> 16 17 using LlvmLibcFDimTest = FDimTestTemplate<float>; 18 19 TEST_F(LlvmLibcFDimTest, NaNArg_fdimf) { test_na_n_arg(&__llvm_libc::fdimf); } 20 21 TEST_F(LlvmLibcFDimTest, InfArg_fdimf) { test_inf_arg(&__llvm_libc::fdimf); } 22 23 TEST_F(LlvmLibcFDimTest, NegInfArg_fdimf) { 24 test_neg_inf_arg(&__llvm_libc::fdimf); 25 } 26 27 TEST_F(LlvmLibcFDimTest, BothZero_fdimf) { 28 test_both_zero(&__llvm_libc::fdimf); 29 } 30 31 TEST_F(LlvmLibcFDimTest, InFloatRange_fdimf) { 32 test_in_range(&__llvm_libc::fdimf); 33 } 34