[libcxx-commits] [libcxx] [libc++] Avoid including <__config> directly in the test suite (PR #106080)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 26 07:22:49 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Louis Dionne (ldionne)
<details>
<summary>Changes</summary>
Fixes #<!-- -->105878
---
Full diff: https://github.com/llvm/llvm-project/pull/106080.diff
1 Files Affected:
- (modified) libcxx/test/support/fp_compare.h (+4-3)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/106080
More information about the libcxx-commits
mailing list