Files
clang-p2996/libc/test/src/math/fdimf_test.cpp
Michael Jones 25226f3e4a [libc] apply formatting to tests
Apply the formatting rules that were applied to the libc/src directory
to the libc/test directory, as well as the files in libc/utils that are
included by the tests. This does not include automated enforcement.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D116127
2021-12-22 10:53:25 -08:00

34 lines
1022 B
C++

//===-- Unittests for fdimf -----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "FDimTest.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/math/fdimf.h"
#include "utils/UnitTest/FPMatcher.h"
#include "utils/UnitTest/Test.h"
#include <math.h>
using LlvmLibcFDimTest = FDimTestTemplate<float>;
TEST_F(LlvmLibcFDimTest, NaNArg_fdimf) { test_na_n_arg(&__llvm_libc::fdimf); }
TEST_F(LlvmLibcFDimTest, InfArg_fdimf) { test_inf_arg(&__llvm_libc::fdimf); }
TEST_F(LlvmLibcFDimTest, NegInfArg_fdimf) {
test_neg_inf_arg(&__llvm_libc::fdimf);
}
TEST_F(LlvmLibcFDimTest, BothZero_fdimf) {
test_both_zero(&__llvm_libc::fdimf);
}
TEST_F(LlvmLibcFDimTest, InFloatRange_fdimf) {
test_in_range(&__llvm_libc::fdimf);
}