xref: /llvm-project/libc/test/src/math/exhaustive/log10f_test.cpp (revision b6bc9d72f65a5086f310f321e969d96e9a559e75)
1e581841eSTue Ly //===-- Exhaustive test for log10f ----------------------------------------===//
2e581841eSTue Ly //
3e581841eSTue Ly // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4e581841eSTue Ly // See https://llvm.org/LICENSE.txt for license information.
5e581841eSTue Ly // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6e581841eSTue Ly //
7e581841eSTue Ly //===----------------------------------------------------------------------===//
8e581841eSTue Ly 
9e581841eSTue Ly #include "exhaustive_test.h"
10e581841eSTue Ly #include "src/math/log10f.h"
11e581841eSTue Ly #include "utils/MPFRWrapper/MPFRUtils.h"
12e581841eSTue Ly 
13*b6bc9d72SGuillaume Chatelet namespace mpfr = LIBC_NAMESPACE::testing::mpfr;
14e581841eSTue Ly 
159532074aSTue Ly using LlvmLibcLog10fExhaustiveTest =
169532074aSTue Ly     LlvmLibcUnaryOpExhaustiveMathTest<float, mpfr::Operation::Log10,
17*b6bc9d72SGuillaume Chatelet                                       LIBC_NAMESPACE::log10f>;
18e581841eSTue 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;
22e581841eSTue Ly 
TEST_F(LlvmLibcLog10fExhaustiveTest,PostiveRange)239532074aSTue Ly TEST_F(LlvmLibcLog10fExhaustiveTest, PostiveRange) {
249532074aSTue Ly   test_full_range_all_roundings(POS_START, POS_STOP);
25e581841eSTue Ly }
26