[libcxx-commits] [libcxx] [libc++] Avoid including <__config> directly in the test suite (PR #106080)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 26 07:22:06 PDT 2024
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/106080
Fixes #105878
>From e63394b940b374ee719d7c04e3fb1500a097efe2 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Mon, 26 Aug 2024 10:21:35 -0400
Subject: [PATCH] [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 3088a211dadc3b..63f174e0a29d87 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 <cmath> // for std::abs
#include <algorithm> // for std::max
#include <cassert>
-#include <__config>
+#include <cmath> // 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 <typename T>
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
More information about the libcxx-commits
mailing list