Skip to content

Commit

Permalink
Fix macros in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Oct 25, 2023
1 parent 4337a8e commit 76012ed
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/boost/charconv/detail/from_chars_float_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace boost { namespace charconv { namespace detail {
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
# pragma GCC diagnostic ignored "-Wfloat-conversion"
#elif defined(__clang__) && __clang_major__ >= 7
#elif defined(__clang__) && __clang_major__ > 7
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wimplicit-float-conversion"
#elif defined(__clang__) && __clang_major__ < 7
Expand Down
2 changes: 1 addition & 1 deletion test/from_chars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void overflow_test()
}
else
{
BOOST_TEST(r1.ec == std::errc()) && BOOST_TEST_EQ(v1, static_cast<T>(1234));
BOOST_TEST(r1.ec == std::errc()) && BOOST_TEST_EQ(v1, 1234);
}

const char* buffer2 = "123456789123456789123456789";
Expand Down
10 changes: 5 additions & 5 deletions test/test_128bit_native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
void test128()
{
auto r1 = boost::charconv::detail::umul128(1, 1);
BOOST_TEST_EQ(r1.high, 0);
BOOST_TEST_EQ(r1.low, 1);
BOOST_TEST_EQ(r1.high, UINT64_C(0));
BOOST_TEST_EQ(r1.low, UINT64_C(1));

auto r2 = boost::charconv::detail::umul128(10, std::numeric_limits<std::uint64_t>::max());
BOOST_TEST_EQ(r2.high, 9);
BOOST_TEST_EQ(r2.high, UINT64_C(9));
BOOST_TEST_EQ(r2.low, UINT64_C(18446744073709551606));

auto r3 = boost::charconv::detail::umul128(std::numeric_limits<std::uint64_t>::max(), std::numeric_limits<std::uint64_t>::max());
BOOST_TEST_EQ(r3.high, UINT64_C(18446744073709551614));
BOOST_TEST_EQ(r3.low, 1);
BOOST_TEST_EQ(r3.low, UINT64_C(1));
}

int main(void)
int main()
{
test128();
return boost::report_errors();
Expand Down
1 change: 1 addition & 0 deletions test/test_boost_json_values.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ void issue_599_test()
#elif defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wfloat-conversion"
# pragma clang diagnostic ignored "-Wconversion"
# if __clang_major__ >= 7
# pragma clang diagnostic ignored "-Wimplicit-float-conversion"
# endif
Expand Down

0 comments on commit 76012ed

Please sign in to comment.