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

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