diff --git a/test/format-impl-test.cc b/test/format-impl-test.cc index 1da6cf84..1c468b43 100644 --- a/test/format-impl-test.cc +++ b/test/format-impl-test.cc @@ -212,11 +212,6 @@ TEST(fp_test, dragonbox_max_k) { 2 * fmt::detail::num_significand_bits() - 1)); } -TEST(fp_test, grisu_format_compiles_with_on_ieee_double) { - auto buf = fmt::memory_buffer(); - format_float(0.42, -1, fmt::detail::float_specs(), buf); -} - TEST(format_impl_test, format_error_code) { std::string msg = "error 42", sep = ": "; { diff --git a/test/format-test.cc b/test/format-test.cc index 638bd143..b75d64bf 100644 --- a/test/format-test.cc +++ b/test/format-test.cc @@ -1413,9 +1413,6 @@ TEST(format_test, precision_rounding) { EXPECT_EQ("1.9156918820264798e-56", fmt::format("{}", 1.9156918820264798e-56)); EXPECT_EQ("0.0000", fmt::format("{:.4f}", 7.2809479766055470e-15)); - - // Trigger a rounding error in Grisu by a specially chosen number. - EXPECT_EQ("3788512123356.985352", fmt::format("{:f}", 3788512123356.985352)); } TEST(format_test, prettify_float) { @@ -2247,15 +2244,15 @@ TEST(format_test, format_named_arg_with_locale) { #endif // FMT_STATIC_THOUSANDS_SEPARATOR struct convertible_to_nonconst_cstring { - operator char*() const { - static char c[]="bar"; - return c; - } + operator char*() const { + static char c[] = "bar"; + return c; + } }; FMT_BEGIN_NAMESPACE -template <> struct formatter : formatter { -}; +template <> +struct formatter : formatter {}; FMT_END_NAMESPACE TEST(format_test, formatter_nonconst_char) {