aboutsummaryrefslogtreecommitdiff
path: root/libc/test/src/math/hypotf_test.cpp
blob: ee16e3dbcd111350b6f524df1f3d914ce7ae7063 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//===-- Unittests for hypotf ----------------------------------------------===//
//
// 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 "HypotTest.h"
#include "hypotf_hard_to_round.h"

#include "src/math/hypotf.h"

using LlvmLibcHypotfTest = HypotTestTemplate<float>;

TEST_F(LlvmLibcHypotfTest, SpecialNumbers) {
  test_special_numbers(&LIBC_NAMESPACE::hypotf);
}

TEST_F(LlvmLibcHypotfTest, SubnormalRange) {
  test_subnormal_range(&LIBC_NAMESPACE::hypotf);
}

TEST_F(LlvmLibcHypotfTest, NormalRange) {
  test_normal_range(&LIBC_NAMESPACE::hypotf);
}

TEST_F(LlvmLibcHypotfTest, TrickyInputs) {
  test_input_list(&LIBC_NAMESPACE::hypotf, N_HARD_TO_ROUND,
                  HYPOTF_HARD_TO_ROUND);
}