Skip to content

Commit

Permalink
update test_tools.hpp include options
Browse files Browse the repository at this point in the history
  • Loading branch information
i80287 committed Jun 3, 2024
1 parent 3e12bbc commit dce2916
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion number_theory/test_math_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#include <cinttypes>
#include <limits>

#include "config_macros.hpp"
#include "math_functions.hpp"
#include "test_tools.hpp"
#include "config_macros.hpp"

using namespace math_functions;
using namespace test_tools;
Expand Down
6 changes: 3 additions & 3 deletions number_theory/test_tools.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
#include <stdexcept>

#include "config_macros.hpp"
#if CONFIG_HAS_AT_LEAST_CXX_20
#if CONFIG_HAS_INCLUDE(<source_location>)
#include <source_location>
#endif

namespace test_tools {
namespace test_tools_detail {

template <class T>
ATTRIBUTE_COLD [[noreturn]] inline void throw_impl(const char* message_format, T arg,
[[noreturn]] ATTRIBUTE_COLD inline void throw_impl(const char* message_format, T arg,
const char* file_name, uint32_t line,
const char* function_name) {
std::array<char, 1024> buffer;
Expand All @@ -39,7 +39,7 @@ ATTRIBUTE_COLD [[noreturn]] inline void throw_impl(const char* message_format, T

} // namespace test_tools_detail

#if CONFIG_HAS_AT_LEAST_CXX_20
#if defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907L

template <class T>
inline void throw_if_not(bool expr, const char* message_format, T arg,
Expand Down

0 comments on commit dce2916

Please sign in to comment.