Skip to content

Commit

Permalink
[libc++] Avoid including <__config> directly in the test suite (llvm#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ldionne authored and dmpolukhin committed Sep 2, 2024
1 parent 45fb2be commit c78d4b7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libcxx/test/support/fp_compare.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c78d4b7

Please sign in to comment.