1 //===-- Unittests for fdim ------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
11 #include "src/__support/FPUtil/FPBits.h"
12 #include "src/math/fdim.h"
13 #include "test/UnitTest/FPMatcher.h"
14 #include "test/UnitTest/Test.h"
17 using LlvmLibcFDimTest
= FDimTestTemplate
<double>;
19 TEST_F(LlvmLibcFDimTest
, NaNArg_fdim
) { test_na_n_arg(&LIBC_NAMESPACE::fdim
); }
21 TEST_F(LlvmLibcFDimTest
, InfArg_fdim
) { test_inf_arg(&LIBC_NAMESPACE::fdim
); }
23 TEST_F(LlvmLibcFDimTest
, NegInfArg_fdim
) {
24 test_neg_inf_arg(&LIBC_NAMESPACE::fdim
);
27 TEST_F(LlvmLibcFDimTest
, BothZero_fdim
) {
28 test_both_zero(&LIBC_NAMESPACE::fdim
);
31 TEST_F(LlvmLibcFDimTest
, InDoubleRange_fdim
) {
32 test_in_range(&LIBC_NAMESPACE::fdim
);