diff options
Diffstat (limited to 'libc/test/src/math')
84 files changed, 118 insertions, 136 deletions
diff --git a/libc/test/src/math/FmaTest.h b/libc/test/src/math/FmaTest.h index 5c5419c..902ff04 100644 --- a/libc/test/src/math/FmaTest.h +++ b/libc/test/src/math/FmaTest.h @@ -48,7 +48,8 @@ class FmaTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest { InStorageType get_random_bit_pattern() { InStorageType bits{0}; for (InStorageType i = 0; i < sizeof(InStorageType) / 2; ++i) { - bits = (bits << 2) + static_cast<uint16_t>(LIBC_NAMESPACE::rand()); + bits = static_cast<InStorageType>( + (bits << 2) + static_cast<uint16_t>(LIBC_NAMESPACE::rand())); } return bits; } @@ -57,7 +58,7 @@ public: using FmaFunc = OutType (*)(InType, InType, InType); void test_subnormal_range(FmaFunc func) { - constexpr InStorageType COUNT = 100'001; + constexpr InStorageType COUNT = 10'001; constexpr InStorageType RAW_STEP = (IN_MAX_SUBNORMAL_U - IN_MIN_SUBNORMAL_U) / COUNT; constexpr InStorageType STEP = (RAW_STEP == 0 ? 1 : RAW_STEP); @@ -75,7 +76,7 @@ public: } void test_normal_range(FmaFunc func) { - constexpr InStorageType COUNT = 100'001; + constexpr InStorageType COUNT = 10'001; constexpr InStorageType RAW_STEP = (IN_MAX_NORMAL_U - IN_MIN_NORMAL_U) / COUNT; constexpr InStorageType STEP = (RAW_STEP == 0 ? 1 : RAW_STEP); diff --git a/libc/test/src/math/HypotTest.h b/libc/test/src/math/HypotTest.h index dc73581..b37abf7 100644 --- a/libc/test/src/math/HypotTest.h +++ b/libc/test/src/math/HypotTest.h @@ -71,8 +71,9 @@ public: void test_subnormal_range(Func func) { constexpr StorageType COUNT = 10'001; - for (unsigned scale = 0; scale < 4; ++scale) { - StorageType max_value = MAX_SUBNORMAL << scale; + constexpr unsigned SCALE = (sizeof(T) < 4) ? 1 : 4; + for (unsigned scale = 0; scale < SCALE; ++scale) { + StorageType max_value = static_cast<StorageType>(MAX_SUBNORMAL << scale); StorageType step = (max_value - MIN_SUBNORMAL) / COUNT + 1; for (int signs = 0; signs < 4; ++signs) { for (StorageType v = MIN_SUBNORMAL, w = max_value; diff --git a/libc/test/src/math/LdExpTest.h b/libc/test/src/math/LdExpTest.h index 08dce0d..cff2aeb 100644 --- a/libc/test/src/math/LdExpTest.h +++ b/libc/test/src/math/LdExpTest.h @@ -17,7 +17,7 @@ #include "test/UnitTest/Test.h" #include "hdr/math_macros.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LIBC_NAMESPACE::Sign; diff --git a/libc/test/src/math/acosf_test.cpp b/libc/test/src/math/acosf_test.cpp index aa0128f..6e2bed7 100644 --- a/libc/test/src/math/acosf_test.cpp +++ b/libc/test/src/math/acosf_test.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/acosf.h" @@ -14,8 +15,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> - namespace mpfr = LIBC_NAMESPACE::testing::mpfr; using LlvmLibcAcosfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/acoshf16_test.cpp b/libc/test/src/math/acoshf16_test.cpp index 2eb9521..d190cd1 100644 --- a/libc/test/src/math/acoshf16_test.cpp +++ b/libc/test/src/math/acoshf16_test.cpp @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// +#include "hdr/stdint_proxy.h" #include "src/__support/libc_errno.h" #include "src/math/acoshf16.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> using LlvmLibcAcoshf16Test = LIBC_NAMESPACE::testing::FPTest<float16>; namespace mpfr = LIBC_NAMESPACE::testing::mpfr; diff --git a/libc/test/src/math/acoshf_test.cpp b/libc/test/src/math/acoshf_test.cpp index 3d3b827..3305445 100644 --- a/libc/test/src/math/acoshf_test.cpp +++ b/libc/test/src/math/acoshf_test.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/acoshf.h" @@ -14,8 +15,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> - using LlvmLibcAcoshfTest = LIBC_NAMESPACE::testing::FPTest<float>; namespace mpfr = LIBC_NAMESPACE::testing::mpfr; diff --git a/libc/test/src/math/asinf_test.cpp b/libc/test/src/math/asinf_test.cpp index 1eaa6b8..f2963f2 100644 --- a/libc/test/src/math/asinf_test.cpp +++ b/libc/test/src/math/asinf_test.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/asinf.h" @@ -15,8 +16,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> - using LlvmLibcAsinfTest = LIBC_NAMESPACE::testing::FPTest<float>; namespace mpfr = LIBC_NAMESPACE::testing::mpfr; diff --git a/libc/test/src/math/asinhf_test.cpp b/libc/test/src/math/asinhf_test.cpp index 8c78f93..f9dfb0a 100644 --- a/libc/test/src/math/asinhf_test.cpp +++ b/libc/test/src/math/asinhf_test.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/asinhf.h" @@ -14,8 +15,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> - using LlvmLibcAsinhfTest = LIBC_NAMESPACE::testing::FPTest<float>; namespace mpfr = LIBC_NAMESPACE::testing::mpfr; diff --git a/libc/test/src/math/atanf_test.cpp b/libc/test/src/math/atanf_test.cpp index a4bdf18..dc489fe 100644 --- a/libc/test/src/math/atanf_test.cpp +++ b/libc/test/src/math/atanf_test.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/atanf.h" @@ -14,8 +15,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> - using LlvmLibcAtanfTest = LIBC_NAMESPACE::testing::FPTest<float>; namespace mpfr = LIBC_NAMESPACE::testing::mpfr; diff --git a/libc/test/src/math/atanhf16_test.cpp b/libc/test/src/math/atanhf16_test.cpp index e35cc77..4c35304 100644 --- a/libc/test/src/math/atanhf16_test.cpp +++ b/libc/test/src/math/atanhf16_test.cpp @@ -6,11 +6,11 @@ // //===----------------------------------------------------------------------===// +#include "hdr/stdint_proxy.h" #include "src/math/atanhf16.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> using LlvmLibcAtanhf16Test = LIBC_NAMESPACE::testing::FPTest<float16>; namespace mpfr = LIBC_NAMESPACE::testing::mpfr; diff --git a/libc/test/src/math/atanhf_test.cpp b/libc/test/src/math/atanhf_test.cpp index 32272ef..1ec7b6b 100644 --- a/libc/test/src/math/atanhf_test.cpp +++ b/libc/test/src/math/atanhf_test.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/atanhf.h" @@ -14,8 +15,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> - using LlvmLibcAtanhfTest = LIBC_NAMESPACE::testing::FPTest<float>; using LIBC_NAMESPACE::Sign; diff --git a/libc/test/src/math/cosf_test.cpp b/libc/test/src/math/cosf_test.cpp index 90dc8ff..e2b444f 100644 --- a/libc/test/src/math/cosf_test.cpp +++ b/libc/test/src/math/cosf_test.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/cosf.h" @@ -15,8 +16,6 @@ #include "test/src/math/sdcomp26094.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> - using LIBC_NAMESPACE::testing::SDCOMP26094_VALUES; using LlvmLibcCosfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/coshf_test.cpp b/libc/test/src/math/coshf_test.cpp index bdaba50..98f9a82 100644 --- a/libc/test/src/math/coshf_test.cpp +++ b/libc/test/src/math/coshf_test.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/CPP/array.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" @@ -15,8 +16,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> - using LlvmLibcCoshfTest = LIBC_NAMESPACE::testing::FPTest<float>; namespace mpfr = LIBC_NAMESPACE::testing::mpfr; diff --git a/libc/test/src/math/erff_test.cpp b/libc/test/src/math/erff_test.cpp index f9b0337..c40aacf 100644 --- a/libc/test/src/math/erff_test.cpp +++ b/libc/test/src/math/erff_test.cpp @@ -13,7 +13,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcErffTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/exp10_test.cpp b/libc/test/src/math/exp10_test.cpp index 6126e5f2..ee8fe9b 100644 --- a/libc/test/src/math/exp10_test.cpp +++ b/libc/test/src/math/exp10_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcExp10Test = LIBC_NAMESPACE::testing::FPTest<double>; diff --git a/libc/test/src/math/exp10f_test.cpp b/libc/test/src/math/exp10f_test.cpp index 8991596..e2021423 100644 --- a/libc/test/src/math/exp10f_test.cpp +++ b/libc/test/src/math/exp10f_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcExp10fTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/exp10m1f_test.cpp b/libc/test/src/math/exp10m1f_test.cpp index 01802bd..613fdeb 100644 --- a/libc/test/src/math/exp10m1f_test.cpp +++ b/libc/test/src/math/exp10m1f_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcExp10m1fTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/exp2_test.cpp b/libc/test/src/math/exp2_test.cpp index 4cd95dd..7866037 100644 --- a/libc/test/src/math/exp2_test.cpp +++ b/libc/test/src/math/exp2_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcExp2Test = LIBC_NAMESPACE::testing::FPTest<double>; diff --git a/libc/test/src/math/exp2f_test.cpp b/libc/test/src/math/exp2f_test.cpp index aeecb3e..349a4c3 100644 --- a/libc/test/src/math/exp2f_test.cpp +++ b/libc/test/src/math/exp2f_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcExp2fTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/exp2m1f_test.cpp b/libc/test/src/math/exp2m1f_test.cpp index 0c87657..a323bdc 100644 --- a/libc/test/src/math/exp2m1f_test.cpp +++ b/libc/test/src/math/exp2m1f_test.cpp @@ -15,7 +15,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcExp2m1fTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/exp_test.cpp b/libc/test/src/math/exp_test.cpp index 83addae..d328d09 100644 --- a/libc/test/src/math/exp_test.cpp +++ b/libc/test/src/math/exp_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcExpTest = LIBC_NAMESPACE::testing::FPTest<double>; diff --git a/libc/test/src/math/expf_test.cpp b/libc/test/src/math/expf_test.cpp index 3c10812f..8329d74 100644 --- a/libc/test/src/math/expf_test.cpp +++ b/libc/test/src/math/expf_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcExpfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/expm1_test.cpp b/libc/test/src/math/expm1_test.cpp index 0cf07e2..5d546de 100644 --- a/libc/test/src/math/expm1_test.cpp +++ b/libc/test/src/math/expm1_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcExpm1Test = LIBC_NAMESPACE::testing::FPTest<double>; diff --git a/libc/test/src/math/expm1f_test.cpp b/libc/test/src/math/expm1f_test.cpp index cf3fe9c..d5c98be 100644 --- a/libc/test/src/math/expm1f_test.cpp +++ b/libc/test/src/math/expm1f_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcExpm1fTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/generic/CMakeLists.txt b/libc/test/src/math/generic/CMakeLists.txt index 1fe7801..a9d54d6 100644 --- a/libc/test/src/math/generic/CMakeLists.txt +++ b/libc/test/src/math/generic/CMakeLists.txt @@ -30,4 +30,3 @@ add_fp_unittest( DEPENDS libc.src.math.generic.ceill ) - diff --git a/libc/test/src/math/in_float_range_test_helper.h b/libc/test/src/math/in_float_range_test_helper.h index 35e039e..2179182 100644 --- a/libc/test/src/math/in_float_range_test_helper.h +++ b/libc/test/src/math/in_float_range_test_helper.h @@ -5,7 +5,7 @@ #ifndef LLVM_LIBC_TEST_SRC_MATH_IN_FLOAT_RANGE_TEST_HELPER_H #define LLVM_LIBC_TEST_SRC_MATH_IN_FLOAT_RANGE_TEST_HELPER_H -#include <stdint.h> +#include "hdr/stdint_proxy.h" #define CHECK_DATA(start, stop, mfp_op, f, f_check, count, prec) \ { \ diff --git a/libc/test/src/math/log10_test.cpp b/libc/test/src/math/log10_test.cpp index e9529d8..7d087d4e 100644 --- a/libc/test/src/math/log10_test.cpp +++ b/libc/test/src/math/log10_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcLog10Test = LIBC_NAMESPACE::testing::FPTest<double>; diff --git a/libc/test/src/math/log10f_test.cpp b/libc/test/src/math/log10f_test.cpp index b2c1c28..c554948 100644 --- a/libc/test/src/math/log10f_test.cpp +++ b/libc/test/src/math/log10f_test.cpp @@ -13,7 +13,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcLog10fTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/log1p_test.cpp b/libc/test/src/math/log1p_test.cpp index e5747b7..4d1efe7 100644 --- a/libc/test/src/math/log1p_test.cpp +++ b/libc/test/src/math/log1p_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcLog1pTest = LIBC_NAMESPACE::testing::FPTest<double>; diff --git a/libc/test/src/math/log1pf_test.cpp b/libc/test/src/math/log1pf_test.cpp index ffe2dd2..0badbeb 100644 --- a/libc/test/src/math/log1pf_test.cpp +++ b/libc/test/src/math/log1pf_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcLog1pfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/log2_test.cpp b/libc/test/src/math/log2_test.cpp index fc440c0..dd55bd8 100644 --- a/libc/test/src/math/log2_test.cpp +++ b/libc/test/src/math/log2_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcLog2Test = LIBC_NAMESPACE::testing::FPTest<double>; diff --git a/libc/test/src/math/log2f_test.cpp b/libc/test/src/math/log2f_test.cpp index 92226c7..7854489 100644 --- a/libc/test/src/math/log2f_test.cpp +++ b/libc/test/src/math/log2f_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcLog2fTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/log_test.cpp b/libc/test/src/math/log_test.cpp index 54afaa3..be156fe 100644 --- a/libc/test/src/math/log_test.cpp +++ b/libc/test/src/math/log_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcLogTest = LIBC_NAMESPACE::testing::FPTest<double>; diff --git a/libc/test/src/math/logf_test.cpp b/libc/test/src/math/logf_test.cpp index 79d8275..7658075 100644 --- a/libc/test/src/math/logf_test.cpp +++ b/libc/test/src/math/logf_test.cpp @@ -13,7 +13,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcLogfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/performance_testing/Timer.h b/libc/test/src/math/performance_testing/Timer.h index 32578ad..f75c1f0 100644 --- a/libc/test/src/math/performance_testing/Timer.h +++ b/libc/test/src/math/performance_testing/Timer.h @@ -9,8 +9,8 @@ #ifndef LLVM_LIBC_TEST_SRC_MATH_PERFORMACE_TESTING_TIMER_H #define LLVM_LIBC_TEST_SRC_MATH_PERFORMACE_TESTING_TIMER_H +#include "hdr/stdint_proxy.h" #include "src/__support/macros/config.h" -#include <stdint.h> namespace LIBC_NAMESPACE_DECL { namespace testing { diff --git a/libc/test/src/math/performance_testing/fmodf16_perf.cpp b/libc/test/src/math/performance_testing/fmodf16_perf.cpp index f7c492c..407ed7c 100644 --- a/libc/test/src/math/performance_testing/fmodf16_perf.cpp +++ b/libc/test/src/math/performance_testing/fmodf16_perf.cpp @@ -11,7 +11,7 @@ #include "src/__support/FPUtil/generic/FMod.h" #include "src/__support/macros/properties/types.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" #define FMOD_FUNC(U) (LIBC_NAMESPACE::fputil::generic::FMod<float16, U>::eval) diff --git a/libc/test/src/math/powf_test.cpp b/libc/test/src/math/powf_test.cpp index 4d189d8..1d70724 100644 --- a/libc/test/src/math/powf_test.cpp +++ b/libc/test/src/math/powf_test.cpp @@ -13,7 +13,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcPowfTest = LIBC_NAMESPACE::testing::FPTest<float>; using LIBC_NAMESPACE::testing::tlog; diff --git a/libc/test/src/math/sdcomp26094.h b/libc/test/src/math/sdcomp26094.h index bb2b9f1..b08cfd2 100644 --- a/libc/test/src/math/sdcomp26094.h +++ b/libc/test/src/math/sdcomp26094.h @@ -9,11 +9,10 @@ #ifndef LLVM_LIBC_TEST_SRC_MATH_SDCOMP26094_H #define LLVM_LIBC_TEST_SRC_MATH_SDCOMP26094_H +#include "hdr/stdint_proxy.h" #include "src/__support/CPP/array.h" #include "src/__support/macros/config.h" -#include <stdint.h> - namespace LIBC_NAMESPACE_DECL { namespace testing { diff --git a/libc/test/src/math/sincosf_test.cpp b/libc/test/src/math/sincosf_test.cpp index 4aac1fa..9c2656f 100644 --- a/libc/test/src/math/sincosf_test.cpp +++ b/libc/test/src/math/sincosf_test.cpp @@ -15,7 +15,7 @@ #include "test/src/math/sdcomp26094.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcSinCosfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/sinf_test.cpp b/libc/test/src/math/sinf_test.cpp index e0357e6..c4676d9 100644 --- a/libc/test/src/math/sinf_test.cpp +++ b/libc/test/src/math/sinf_test.cpp @@ -15,7 +15,7 @@ #include "test/src/math/sdcomp26094.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcSinfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/sinhf_test.cpp b/libc/test/src/math/sinhf_test.cpp index 74f906e..a664010 100644 --- a/libc/test/src/math/sinhf_test.cpp +++ b/libc/test/src/math/sinhf_test.cpp @@ -15,7 +15,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcSinhfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/sinpif_test.cpp b/libc/test/src/math/sinpif_test.cpp index 94e3dbc..2e66ae9 100644 --- a/libc/test/src/math/sinpif_test.cpp +++ b/libc/test/src/math/sinpif_test.cpp @@ -12,7 +12,7 @@ #include "test/src/math/sdcomp26094.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcSinpifTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt index 4aafe03..40b7a342 100644 --- a/libc/test/src/math/smoke/CMakeLists.txt +++ b/libc/test/src/math/smoke/CMakeLists.txt @@ -221,6 +221,19 @@ add_fp_unittest( ) add_fp_unittest( + fabsbf16_test + SUITE + libc-math-smoke-tests + SRCS + fabsbf16_test.cpp + HDRS + FAbsTest.h + DEPENDS + libc.src.__support.FPUtil.bfloat16 + libc.src.math.fabsbf16 +) + +add_fp_unittest( fadd_test SUITE libc-math-smoke-tests @@ -3169,7 +3182,6 @@ add_fp_unittest( libc.hdr.signal_macros libc.src.math.nanf libc.src.__support.FPUtil.fp_bits - libc.src.__support.macros.sanitizer # FIXME: The nan tests currently have death tests, which aren't supported for # hermetic tests. UNIT_TEST_ONLY @@ -3185,7 +3197,6 @@ add_fp_unittest( libc.hdr.signal_macros libc.src.math.nan libc.src.__support.FPUtil.fp_bits - libc.src.__support.macros.sanitizer # FIXME: The nan tests currently have death tests, which aren't supported for # hermetic tests. UNIT_TEST_ONLY @@ -3201,7 +3212,6 @@ add_fp_unittest( libc.hdr.signal_macros libc.src.math.nanl libc.src.__support.FPUtil.fp_bits - libc.src.__support.macros.sanitizer # FIXME: The nan tests currently have death tests, which aren't supported for # hermetic tests. UNIT_TEST_ONLY @@ -3217,7 +3227,6 @@ add_fp_unittest( libc.hdr.signal_macros libc.src.math.nanf16 libc.src.__support.FPUtil.fp_bits - libc.src.__support.macros.sanitizer # FIXME: The nan tests currently have death tests, which aren't supported for # hermetic tests. UNIT_TEST_ONLY @@ -3233,7 +3242,6 @@ add_fp_unittest( libc.hdr.signal_macros libc.src.math.nanf128 libc.src.__support.FPUtil.fp_bits - libc.src.__support.macros.sanitizer # FIXME: The nan tests currently have death tests, which aren't supported for # hermetic tests. UNIT_TEST_ONLY diff --git a/libc/test/src/math/smoke/LdExpTest.h b/libc/test/src/math/smoke/LdExpTest.h index 094cc7e..8de70ad 100644 --- a/libc/test/src/math/smoke/LdExpTest.h +++ b/libc/test/src/math/smoke/LdExpTest.h @@ -9,6 +9,7 @@ #ifndef LLVM_LIBC_TEST_SRC_MATH_LDEXPTEST_H #define LLVM_LIBC_TEST_SRC_MATH_LDEXPTEST_H +#include "hdr/stdint_proxy.h" #include "src/__support/CPP/limits.h" // INT_MAX #include "src/__support/FPUtil/FPBits.h" #include "src/__support/FPUtil/NormalFloat.h" @@ -16,8 +17,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LIBC_NAMESPACE::Sign; template <typename T, typename U = int> diff --git a/libc/test/src/math/smoke/acosf_test.cpp b/libc/test/src/math/smoke/acosf_test.cpp index 257c6a3..733610a 100644 --- a/libc/test/src/math/smoke/acosf_test.cpp +++ b/libc/test/src/math/smoke/acosf_test.cpp @@ -13,7 +13,7 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcAcosfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/smoke/acoshf_test.cpp b/libc/test/src/math/smoke/acoshf_test.cpp index b6abfab..19556b2 100644 --- a/libc/test/src/math/smoke/acoshf_test.cpp +++ b/libc/test/src/math/smoke/acoshf_test.cpp @@ -13,7 +13,7 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcAcoshfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/smoke/asinf_test.cpp b/libc/test/src/math/smoke/asinf_test.cpp index 2615a8d..6195a11 100644 --- a/libc/test/src/math/smoke/asinf_test.cpp +++ b/libc/test/src/math/smoke/asinf_test.cpp @@ -13,7 +13,7 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcAsinfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/smoke/asinhf_test.cpp b/libc/test/src/math/smoke/asinhf_test.cpp index d812a2d..e6326c1 100644 --- a/libc/test/src/math/smoke/asinhf_test.cpp +++ b/libc/test/src/math/smoke/asinhf_test.cpp @@ -13,7 +13,7 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcAsinhfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/smoke/atanf_test.cpp b/libc/test/src/math/smoke/atanf_test.cpp index b56b9d0..7d2dfee 100644 --- a/libc/test/src/math/smoke/atanf_test.cpp +++ b/libc/test/src/math/smoke/atanf_test.cpp @@ -13,7 +13,7 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcAtanfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/smoke/atanhf_test.cpp b/libc/test/src/math/smoke/atanhf_test.cpp index 038cb30..5588ae0 100644 --- a/libc/test/src/math/smoke/atanhf_test.cpp +++ b/libc/test/src/math/smoke/atanhf_test.cpp @@ -13,7 +13,7 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LIBC_NAMESPACE::Sign; diff --git a/libc/test/src/math/smoke/cosf_test.cpp b/libc/test/src/math/smoke/cosf_test.cpp index 470a876..837fee9 100644 --- a/libc/test/src/math/smoke/cosf_test.cpp +++ b/libc/test/src/math/smoke/cosf_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/cosf.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcCosfTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcCosfTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/coshf_test.cpp b/libc/test/src/math/smoke/coshf_test.cpp index ee8f019..81096fa 100644 --- a/libc/test/src/math/smoke/coshf_test.cpp +++ b/libc/test/src/math/smoke/coshf_test.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/CPP/array.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" @@ -14,8 +15,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcCoshfTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcCoshfTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/cospif_test.cpp b/libc/test/src/math/smoke/cospif_test.cpp index 3d48909..6f1bb24 100644 --- a/libc/test/src/math/smoke/cospif_test.cpp +++ b/libc/test/src/math/smoke/cospif_test.cpp @@ -6,12 +6,11 @@ // //===----------------------------------------------------------------------===// +#include "hdr/stdint_proxy.h" #include "src/__support/libc_errno.h" #include "src/math/cospif.h" #include "test/UnitTest/FPMatcher.h" -#include <stdint.h> - using LlvmLibcCospifTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcCospifTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/erff_test.cpp b/libc/test/src/math/smoke/erff_test.cpp index a9f4994..133b4b8 100644 --- a/libc/test/src/math/smoke/erff_test.cpp +++ b/libc/test/src/math/smoke/erff_test.cpp @@ -7,13 +7,12 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/math/erff.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcErffTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcErffTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/exp10_test.cpp b/libc/test/src/math/smoke/exp10_test.cpp index 50d3de0..76e6c78 100644 --- a/libc/test/src/math/smoke/exp10_test.cpp +++ b/libc/test/src/math/smoke/exp10_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/exp10.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcExp10Test = LIBC_NAMESPACE::testing::FPTest<double>; TEST_F(LlvmLibcExp10Test, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/exp10f_test.cpp b/libc/test/src/math/smoke/exp10f_test.cpp index fcd334b..cf2f976 100644 --- a/libc/test/src/math/smoke/exp10f_test.cpp +++ b/libc/test/src/math/smoke/exp10f_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/exp10f.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcExp10fTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcExp10fTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/exp2_test.cpp b/libc/test/src/math/smoke/exp2_test.cpp index aebf808..3d26df1 100644 --- a/libc/test/src/math/smoke/exp2_test.cpp +++ b/libc/test/src/math/smoke/exp2_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/exp2.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcExp2Test = LIBC_NAMESPACE::testing::FPTest<double>; TEST_F(LlvmLibcExp2Test, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/exp2f_test.cpp b/libc/test/src/math/smoke/exp2f_test.cpp index c524327..12bcbec 100644 --- a/libc/test/src/math/smoke/exp2f_test.cpp +++ b/libc/test/src/math/smoke/exp2f_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/exp2f.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcExp2fTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcExp2fTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/exp_test.cpp b/libc/test/src/math/smoke/exp_test.cpp index c3b2ae7..4ce3227 100644 --- a/libc/test/src/math/smoke/exp_test.cpp +++ b/libc/test/src/math/smoke/exp_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/exp.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcExpTest = LIBC_NAMESPACE::testing::FPTest<double>; TEST_F(LlvmLibcExpTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/expf_test.cpp b/libc/test/src/math/smoke/expf_test.cpp index d341517..a0e785f 100644 --- a/libc/test/src/math/smoke/expf_test.cpp +++ b/libc/test/src/math/smoke/expf_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/expf.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcExpfTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcExpfTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/expm1_test.cpp b/libc/test/src/math/smoke/expm1_test.cpp index c842fe3..db7149d 100644 --- a/libc/test/src/math/smoke/expm1_test.cpp +++ b/libc/test/src/math/smoke/expm1_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/expm1.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcExpm1Test = LIBC_NAMESPACE::testing::FPTest<double>; TEST_F(LlvmLibcExpm1Test, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/expm1f_test.cpp b/libc/test/src/math/smoke/expm1f_test.cpp index 214bfe8..9482bf6f 100644 --- a/libc/test/src/math/smoke/expm1f_test.cpp +++ b/libc/test/src/math/smoke/expm1f_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/expm1f.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcExpm1fTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcExpm1fTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/fabsbf16_test.cpp b/libc/test/src/math/smoke/fabsbf16_test.cpp new file mode 100644 index 0000000..611050a --- /dev/null +++ b/libc/test/src/math/smoke/fabsbf16_test.cpp @@ -0,0 +1,14 @@ +//===-- Unittests for fabsbf16 --------------------------------------------===// +// +// 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 "FAbsTest.h" + +#include "src/__support/FPUtil/bfloat16.h" +#include "src/math/fabsbf16.h" + +LIST_FABS_TESTS(bfloat16, LIBC_NAMESPACE::fabsbf16) diff --git a/libc/test/src/math/smoke/log10_test.cpp b/libc/test/src/math/smoke/log10_test.cpp index 49cfda8..3af27d4 100644 --- a/libc/test/src/math/smoke/log10_test.cpp +++ b/libc/test/src/math/smoke/log10_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/log10.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcLog10Test = LIBC_NAMESPACE::testing::FPTest<double>; TEST_F(LlvmLibcLog10Test, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/log10f_test.cpp b/libc/test/src/math/smoke/log10f_test.cpp index a638221..f15da75 100644 --- a/libc/test/src/math/smoke/log10f_test.cpp +++ b/libc/test/src/math/smoke/log10f_test.cpp @@ -7,13 +7,12 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/math/log10f.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcLog10fTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcLog10fTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/log1pf_test.cpp b/libc/test/src/math/smoke/log1pf_test.cpp index dc3489f..82c2f94 100644 --- a/libc/test/src/math/smoke/log1pf_test.cpp +++ b/libc/test/src/math/smoke/log1pf_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/log1pf.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcLog1pfTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcLog1pfTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/log2_test.cpp b/libc/test/src/math/smoke/log2_test.cpp index 0534d00..6bf1ce3 100644 --- a/libc/test/src/math/smoke/log2_test.cpp +++ b/libc/test/src/math/smoke/log2_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/log2.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcLog2Test = LIBC_NAMESPACE::testing::FPTest<double>; TEST_F(LlvmLibcLog2Test, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/log2f_test.cpp b/libc/test/src/math/smoke/log2f_test.cpp index 53d54ac..80e13a2 100644 --- a/libc/test/src/math/smoke/log2f_test.cpp +++ b/libc/test/src/math/smoke/log2f_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/log2f.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcLog2fTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcLog2fTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/log_test.cpp b/libc/test/src/math/smoke/log_test.cpp index 09e9ab0..1d7761a 100644 --- a/libc/test/src/math/smoke/log_test.cpp +++ b/libc/test/src/math/smoke/log_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/log.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcLogTest = LIBC_NAMESPACE::testing::FPTest<double>; TEST_F(LlvmLibcLogTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/logf_test.cpp b/libc/test/src/math/smoke/logf_test.cpp index faba50e..f58209e 100644 --- a/libc/test/src/math/smoke/logf_test.cpp +++ b/libc/test/src/math/smoke/logf_test.cpp @@ -7,13 +7,12 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/math/logf.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcLogfTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcLogfTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/nan_test.cpp b/libc/test/src/math/smoke/nan_test.cpp index e8376c0..9010b74 100644 --- a/libc/test/src/math/smoke/nan_test.cpp +++ b/libc/test/src/math/smoke/nan_test.cpp @@ -8,7 +8,6 @@ #include "hdr/signal_macros.h" #include "src/__support/FPUtil/FPBits.h" -#include "src/__support/macros/sanitizer.h" #include "src/math/nan.h" #include "test/UnitTest/FEnvSafeTest.h" #include "test/UnitTest/FPMatcher.h" @@ -44,8 +43,8 @@ TEST_F(LlvmLibcNanTest, RandomString) { run_test("123 ", 0x7ff8000000000000); } -#if defined(LIBC_ADD_NULL_CHECKS) && !defined(LIBC_HAS_SANITIZER) +#if defined(LIBC_ADD_NULL_CHECKS) TEST_F(LlvmLibcNanTest, InvalidInput) { EXPECT_DEATH([] { LIBC_NAMESPACE::nan(nullptr); }, WITH_SIGNAL(-1)); } -#endif // LIBC_HAS_ADDRESS_SANITIZER +#endif // LIBC_ADD_NULL_CHECKS diff --git a/libc/test/src/math/smoke/nanf128_test.cpp b/libc/test/src/math/smoke/nanf128_test.cpp index a63ce88..40b347d 100644 --- a/libc/test/src/math/smoke/nanf128_test.cpp +++ b/libc/test/src/math/smoke/nanf128_test.cpp @@ -8,7 +8,6 @@ #include "hdr/signal_macros.h" #include "src/__support/FPUtil/FPBits.h" -#include "src/__support/macros/sanitizer.h" #include "src/__support/uint128.h" #include "src/math/nanf128.h" #include "test/UnitTest/FEnvSafeTest.h" @@ -55,8 +54,8 @@ TEST_F(LlvmLibcNanf128Test, RandomString) { QUIET_NAN); } -#if defined(LIBC_ADD_NULL_CHECKS) && !defined(LIBC_HAS_SANITIZER) +#if defined(LIBC_ADD_NULL_CHECKS) TEST_F(LlvmLibcNanf128Test, InvalidInput) { EXPECT_DEATH([] { LIBC_NAMESPACE::nanf128(nullptr); }, WITH_SIGNAL(-1)); } -#endif // LIBC_HAS_ADDRESS_SANITIZER +#endif // LIBC_ADD_NULL_CHECKS diff --git a/libc/test/src/math/smoke/nanf16_test.cpp b/libc/test/src/math/smoke/nanf16_test.cpp index 694470b..e05f79c 100644 --- a/libc/test/src/math/smoke/nanf16_test.cpp +++ b/libc/test/src/math/smoke/nanf16_test.cpp @@ -8,7 +8,6 @@ #include "hdr/signal_macros.h" #include "src/__support/FPUtil/FPBits.h" -#include "src/__support/macros/sanitizer.h" #include "src/math/nanf16.h" #include "test/UnitTest/FEnvSafeTest.h" #include "test/UnitTest/FPMatcher.h" @@ -43,8 +42,8 @@ TEST_F(LlvmLibcNanf16Test, RandomString) { run_test("123 ", 0x7e00); } -#if defined(LIBC_ADD_NULL_CHECKS) && !defined(LIBC_HAS_SANITIZER) +#if defined(LIBC_ADD_NULL_CHECKS) TEST_F(LlvmLibcNanf16Test, InvalidInput) { EXPECT_DEATH([] { LIBC_NAMESPACE::nanf16(nullptr); }, WITH_SIGNAL(-1)); } -#endif // LIBC_HAS_ADDRESS_SANITIZER +#endif // LIBC_ADD_NULL_CHECKS diff --git a/libc/test/src/math/smoke/nanf_test.cpp b/libc/test/src/math/smoke/nanf_test.cpp index cb57f65..c2fef72 100644 --- a/libc/test/src/math/smoke/nanf_test.cpp +++ b/libc/test/src/math/smoke/nanf_test.cpp @@ -8,7 +8,6 @@ #include "hdr/signal_macros.h" #include "src/__support/FPUtil/FPBits.h" -#include "src/__support/macros/sanitizer.h" #include "src/math/nanf.h" #include "test/UnitTest/FEnvSafeTest.h" #include "test/UnitTest/FPMatcher.h" @@ -43,8 +42,8 @@ TEST_F(LlvmLibcNanfTest, RandomString) { run_test("123 ", 0x7fc00000); } -#if defined(LIBC_ADD_NULL_CHECKS) && !defined(LIBC_HAS_SANITIZER) +#if defined(LIBC_ADD_NULL_CHECKS) TEST_F(LlvmLibcNanfTest, InvalidInput) { EXPECT_DEATH([] { LIBC_NAMESPACE::nanf(nullptr); }, WITH_SIGNAL(-1)); } -#endif // LIBC_HAS_ADDRESS_SANITIZER +#endif // LIBC_ADD_NULL_CHECKS diff --git a/libc/test/src/math/smoke/nanl_test.cpp b/libc/test/src/math/smoke/nanl_test.cpp index 3bcb914..b1d46df 100644 --- a/libc/test/src/math/smoke/nanl_test.cpp +++ b/libc/test/src/math/smoke/nanl_test.cpp @@ -8,7 +8,6 @@ #include "hdr/signal_macros.h" #include "src/__support/FPUtil/FPBits.h" -#include "src/__support/macros/sanitizer.h" #include "src/math/nanl.h" #include "test/UnitTest/FEnvSafeTest.h" #include "test/UnitTest/FPMatcher.h" @@ -71,8 +70,8 @@ TEST_F(LlvmLibcNanlTest, RandomString) { run_test("123 ", expected); } -#if defined(LIBC_ADD_NULL_CHECKS) && !defined(LIBC_HAS_SANITIZER) +#if defined(LIBC_ADD_NULL_CHECKS) TEST_F(LlvmLibcNanlTest, InvalidInput) { EXPECT_DEATH([] { LIBC_NAMESPACE::nanl(nullptr); }, WITH_SIGNAL(-1)); } -#endif // LIBC_HAS_ADDRESS_SANITIZER +#endif // LIBC_ADD_NULL_CHECKS diff --git a/libc/test/src/math/smoke/powf_test.cpp b/libc/test/src/math/smoke/powf_test.cpp index 0d1a650..76e8e8c 100644 --- a/libc/test/src/math/smoke/powf_test.cpp +++ b/libc/test/src/math/smoke/powf_test.cpp @@ -7,13 +7,12 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/math/powf.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcPowfTest = LIBC_NAMESPACE::testing::FPTest<float>; using LIBC_NAMESPACE::fputil::testing::ForceRoundingMode; using LIBC_NAMESPACE::fputil::testing::RoundingMode; diff --git a/libc/test/src/math/smoke/sincosf_test.cpp b/libc/test/src/math/smoke/sincosf_test.cpp index 8ba0d04..7ff0ba7 100644 --- a/libc/test/src/math/smoke/sincosf_test.cpp +++ b/libc/test/src/math/smoke/sincosf_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/sincosf.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcSinCosfTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcSinCosfTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/sinf_test.cpp b/libc/test/src/math/smoke/sinf_test.cpp index 8173969..8ba66ed 100644 --- a/libc/test/src/math/smoke/sinf_test.cpp +++ b/libc/test/src/math/smoke/sinf_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/sinf.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcSinfTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcSinfTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/sinhf_test.cpp b/libc/test/src/math/smoke/sinhf_test.cpp index ea6a447..5976a1f 100644 --- a/libc/test/src/math/smoke/sinhf_test.cpp +++ b/libc/test/src/math/smoke/sinhf_test.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/CPP/array.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" @@ -14,8 +15,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcSinhfTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcSinhfTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/sinpif_test.cpp b/libc/test/src/math/smoke/sinpif_test.cpp index b840f39..4a725e0 100644 --- a/libc/test/src/math/smoke/sinpif_test.cpp +++ b/libc/test/src/math/smoke/sinpif_test.cpp @@ -6,12 +6,11 @@ // //===----------------------------------------------------------------------===// +#include "hdr/stdint_proxy.h" #include "src/__support/libc_errno.h" #include "src/math/sinpif.h" #include "test/UnitTest/FPMatcher.h" -#include <stdint.h> - using LlvmLibcSinpifTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcSinpifTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/tanf_test.cpp b/libc/test/src/math/smoke/tanf_test.cpp index 12deca5..c85907c 100644 --- a/libc/test/src/math/smoke/tanf_test.cpp +++ b/libc/test/src/math/smoke/tanf_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/tanf.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcTanfTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcTanfTest, SpecialNumbers) { diff --git a/libc/test/src/math/smoke/tanhf_test.cpp b/libc/test/src/math/smoke/tanhf_test.cpp index b12a331..57c0573 100644 --- a/libc/test/src/math/smoke/tanhf_test.cpp +++ b/libc/test/src/math/smoke/tanhf_test.cpp @@ -7,14 +7,13 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" #include "src/math/tanhf.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include <stdint.h> - using LlvmLibcTanhfTest = LIBC_NAMESPACE::testing::FPTest<float>; TEST_F(LlvmLibcTanhfTest, SpecialNumbers) { diff --git a/libc/test/src/math/tanf_test.cpp b/libc/test/src/math/tanf_test.cpp index ecc7019..27949eb 100644 --- a/libc/test/src/math/tanf_test.cpp +++ b/libc/test/src/math/tanf_test.cpp @@ -15,7 +15,7 @@ #include "test/src/math/sdcomp26094.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcTanfTest = LIBC_NAMESPACE::testing::FPTest<float>; diff --git a/libc/test/src/math/tanhf_test.cpp b/libc/test/src/math/tanhf_test.cpp index 966ce64..27a6cbc 100644 --- a/libc/test/src/math/tanhf_test.cpp +++ b/libc/test/src/math/tanhf_test.cpp @@ -14,7 +14,7 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include <stdint.h> +#include "hdr/stdint_proxy.h" using LlvmLibcTanhfTest = LIBC_NAMESPACE::testing::FPTest<float>; |