From 5fe9d59f9161d03b4c86140b003537f0f4f7f21c Mon Sep 17 00:00:00 2001 From: "Hans-Martin B. Jensen" Date: Mon, 15 Apr 2024 13:22:23 +0200 Subject: [PATCH] Move to new test --- test/xchar-test.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/xchar-test.cc b/test/xchar-test.cc index 906252024bb56..cbc961d360a5d 100644 --- a/test/xchar-test.cc +++ b/test/xchar-test.cc @@ -93,9 +93,6 @@ TEST(xchar_test, compile_time_string) { EXPECT_EQ(fmt::format(fmt::wformat_string(L"{}"), 42), L"42"); #if defined(FMT_USE_STRING_VIEW) && FMT_CPLUSPLUS >= 201703L EXPECT_EQ(fmt::format(FMT_STRING(std::wstring_view(L"{}")), 42), L"42"); - std::wstring ws; - fmt::format_to(std::back_inserter(ws), FMT_STRING(L"{}"), 42); - EXPECT_EQ(L"42", ws); #endif } @@ -198,6 +195,12 @@ TEST(xchar_test, format_to) { EXPECT_STREQ(buf.data(), L"42"); } +TEST(xchar_test, compile_time_string_format_to) { + std::wstring ws; + fmt::format_to(std::back_inserter(ws), FMT_STRING(L"{}"), 42); + EXPECT_EQ(L"42", ws); +} + TEST(xchar_test, vformat_to) { int n = 42; auto args = fmt::make_wformat_args(n);