xref: /llvm-project/libc/test/src/math/exhaustive/logf_test.cpp (revision b6bc9d72f65a5086f310f321e969d96e9a559e75)
1d08a801bSTue Ly //===-- Exhaustive test for logf ------------------------------------------===//
2d08a801bSTue Ly //
3d08a801bSTue Ly // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4d08a801bSTue Ly // See https://llvm.org/LICENSE.txt for license information.
5d08a801bSTue Ly // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6d08a801bSTue Ly //
7d08a801bSTue Ly //===----------------------------------------------------------------------===//
8d08a801bSTue Ly 
98cd81274STue Ly #include "exhaustive_test.h"
10d08a801bSTue Ly #include "src/math/logf.h"
11d08a801bSTue Ly #include "utils/MPFRWrapper/MPFRUtils.h"
12d08a801bSTue Ly 
13*b6bc9d72SGuillaume Chatelet namespace mpfr = LIBC_NAMESPACE::testing::mpfr;
14d08a801bSTue Ly 
159532074aSTue Ly using LlvmLibcLogfExhaustiveTest =
169532074aSTue Ly     LlvmLibcUnaryOpExhaustiveMathTest<float, mpfr::Operation::Log,
17*b6bc9d72SGuillaume Chatelet                                       LIBC_NAMESPACE::logf>;
188cd81274STue Ly 
199532074aSTue Ly // Range: [0, Inf];
209532074aSTue Ly static constexpr uint32_t POS_START = 0x0000'0000U;
219532074aSTue Ly static constexpr uint32_t POS_STOP = 0x7f80'0000U;
228cd81274STue Ly 
TEST_F(LlvmLibcLogfExhaustiveTest,PostiveRange)239532074aSTue Ly TEST_F(LlvmLibcLogfExhaustiveTest, PostiveRange) {
249532074aSTue Ly   test_full_range_all_roundings(POS_START, POS_STOP);
25d08a801bSTue Ly }
26