Skip to content

Commit

Permalink
Move to new test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans-Martin B. Jensen committed Apr 15, 2024
1 parent 703068d commit 46c4ef0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/xchar-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ TEST(xchar_test, compile_time_string) {
EXPECT_EQ(fmt::format(fmt::wformat_string<int>(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
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 46c4ef0

Please sign in to comment.