Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libc / test / src / math / fdim_test.cpp
blob2f00a30ad1ee6f76e231ee525917916013f6bfe6
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 //===----------------------------------------------------------------------===//
9 #include "FDimTest.h"
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"
15 #include <math.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);