From 22d31b31f0e9b4e4654ba67ee881f3564c2cc297 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 3 Apr 2022 14:52:35 -0700 Subject: [PATCH] Add a __float128 test --- test/format-impl-test.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/format-impl-test.cc b/test/format-impl-test.cc index 1ce392d0..f6f2860d 100644 --- a/test/format-impl-test.cc +++ b/test/format-impl-test.cc @@ -353,6 +353,14 @@ TEST(format_impl_test, count_digits) { test_count_digits(); } +#if FMT_USE_FLOAT128 +TEST(format_impl_test, write_float128) { + auto s = std::string(); + fmt::detail::write(std::back_inserter(s), __float128(42)); + EXPECT_EQ(s, "42"); +} +#endif + #ifdef _WIN32 # include