1 //===-- Unittests for fdim ------------------------------------------------===// 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/fdim.h" 13 #include "utils/UnitTest/FPMatcher.h" 14 #include "utils/UnitTest/Test.h" 15 #include <math.h> 16 17 using LlvmLibcFDimTest = FDimTestTemplate<double>; 18 19 TEST_F(LlvmLibcFDimTest, NaNArg_fdim) { testNaNArg(&__llvm_libc::fdim); } 20 21 TEST_F(LlvmLibcFDimTest, InfArg_fdim) { testInfArg(&__llvm_libc::fdim); } 22 23 TEST_F(LlvmLibcFDimTest, NegInfArg_fdim) { testNegInfArg(&__llvm_libc::fdim); } 24 25 TEST_F(LlvmLibcFDimTest, BothZero_fdim) { testBothZero(&__llvm_libc::fdim); } 26 27 TEST_F(LlvmLibcFDimTest, InDoubleRange_fdim) { 28 testInRange(&__llvm_libc::fdim); 29 } 30