1 | //===-- Unittests for fdiml -----------------------------------------------===// |
---|---|
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/fdiml.h" |
14 | #include "test/UnitTest/FPMatcher.h" |
15 | #include "test/UnitTest/Test.h" |
16 | |
17 | using LlvmLibcFDimTest = FDimTestTemplate<long double>; |
18 | |
19 | TEST_F(LlvmLibcFDimTest, NaNArg_fdiml) { |
20 | test_na_n_arg(func: &LIBC_NAMESPACE::fdiml); |
21 | } |
22 | |
23 | TEST_F(LlvmLibcFDimTest, InfArg_fdiml) { test_inf_arg(func: &LIBC_NAMESPACE::fdiml); } |
24 | |
25 | TEST_F(LlvmLibcFDimTest, NegInfArg_fdiml) { |
26 | test_neg_inf_arg(func: &LIBC_NAMESPACE::fdiml); |
27 | } |
28 | |
29 | TEST_F(LlvmLibcFDimTest, BothZero_fdiml) { |
30 | test_both_zero(func: &LIBC_NAMESPACE::fdiml); |
31 | } |
32 | |
33 | TEST_F(LlvmLibcFDimTest, InLongDoubleRange_fdiml) { |
34 | test_in_range(func: &LIBC_NAMESPACE::fdiml); |
35 | } |
36 |