From ce670492eafdb5b8f7dd54090d850af3fab53123 Mon Sep 17 00:00:00 2001 From: Walter Gray Date: Mon, 30 Nov 2020 10:11:22 -0800 Subject: [PATCH] add test for wide fmt strings --- test/locale-test.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/locale-test.cc b/test/locale-test.cc index 942e1e29..473412ba 100644 --- a/test/locale-test.cc +++ b/test/locale-test.cc @@ -164,5 +164,10 @@ TEST(FormatTest, Print) { "12,345"); EXPECT_WRITE(stderr, fmt::print(stderr, special_grouping_loc, "{:L}", 12345), "12,345"); + + // The wide string overload is expected to compile, but fail to execute. + if (fmt::detail::const_check(false)) + EXPECT_WRITE(stdout, fmt::print(std::locale(), L"{:L}", 12345678), + "12345678"); } #endif // FMT_STATIC_THOUSANDS_SEPARATOR