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 "hdr/math_macros.h"
12#include "src/__support/FPUtil/FPBits.h"
13#include "src/math/fdim.h"
14#include "test/UnitTest/FPMatcher.h"
15#include "test/UnitTest/Test.h"
16
17using LlvmLibcFDimTest = FDimTestTemplate<double>;
18
19TEST_F(LlvmLibcFDimTest, NaNArg_fdim) { test_na_n_arg(func: &LIBC_NAMESPACE::fdim); }
20
21TEST_F(LlvmLibcFDimTest, InfArg_fdim) { test_inf_arg(func: &LIBC_NAMESPACE::fdim); }
22
23TEST_F(LlvmLibcFDimTest, NegInfArg_fdim) {
24 test_neg_inf_arg(func: &LIBC_NAMESPACE::fdim);
25}
26
27TEST_F(LlvmLibcFDimTest, BothZero_fdim) {
28 test_both_zero(func: &LIBC_NAMESPACE::fdim);
29}
30
31TEST_F(LlvmLibcFDimTest, InDoubleRange_fdim) {
32 test_in_range(func: &LIBC_NAMESPACE::fdim);
33}
34

source code of libc/test/src/math/fdim_test.cpp