From e63394b940b374ee719d7c04e3fb1500a097efe2 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 26 Aug 2024 10:21:35 -0400 Subject: [PATCH 1/2] [libc++] Avoid including <__config> directly in the test suite Fixes #105878 --- libcxx/test/support/fp_compare.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libcxx/test/support/fp_compare.h b/libcxx/test/support/fp_compare.h index 3088a211dadc3..63f174e0a29d8 100644 --- a/libcxx/test/support/fp_compare.h +++ b/libcxx/test/support/fp_compare.h @@ -9,16 +9,17 @@ #ifndef SUPPORT_FP_COMPARE_H #define SUPPORT_FP_COMPARE_H -#include // for std::abs #include // for std::max #include -#include <__config> +#include // for std::abs + +#include "test_macros.h" // See https://www.boost.org/doc/libs/1_70_0/libs/test/doc/html/boost_test/testing_tools/extended_comparison/floating_point/floating_points_comparison_theory.html template bool fptest_close(T val, T expected, T eps) { - _LIBCPP_CONSTEXPR T zero = T(0); + TEST_CONSTEXPR T zero = T(0); assert(eps >= zero); // Handle the zero cases From c06f9bbaad186c915acefb084fe0332ffbd83b88 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 26 Aug 2024 17:52:20 -0400 Subject: [PATCH 2/2] Format --- libcxx/test/support/fp_compare.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/test/support/fp_compare.h b/libcxx/test/support/fp_compare.h index 63f174e0a29d8..237ee50d1f66b 100644 --- a/libcxx/test/support/fp_compare.h +++ b/libcxx/test/support/fp_compare.h @@ -11,7 +11,7 @@ #include // for std::max #include -#include // for std::abs +#include // for std::abs #include "test_macros.h"