diff --git a/test/util-test.cc b/test/util-test.cc index d7d6d73a..024c803c 100644 --- a/test/util-test.cc +++ b/test/util-test.cc @@ -724,13 +724,13 @@ TEST(UtilTest, UTF8ToUTF16) { EXPECT_EQ(7, u.size()); } -template +template void check_utf_conversion_error(const char *message) { fmt::MemoryWriter out; fmt::internal::format_windows_error(out, ERROR_INVALID_PARAMETER, message); fmt::SystemError error(0, ""); try { - Converter(0); + Converter(fmt::BasicStringRef(0, 0)); } catch (const fmt::SystemError &e) { error = e; } @@ -739,18 +739,18 @@ void check_utf_conversion_error(const char *message) { } TEST(UtilTest, UTF16ToUTF8Error) { - check_utf_conversion_error( + check_utf_conversion_error( "cannot convert string from UTF-16 to UTF-8"); } TEST(UtilTest, UTF8ToUTF16Error) { - check_utf_conversion_error( + check_utf_conversion_error( "cannot convert string from UTF-8 to UTF-16"); } TEST(UtilTest, UTF16ToUTF8Convert) { fmt::internal::UTF16ToUTF8 u; - EXPECT_EQ(ERROR_INVALID_PARAMETER, u.convert(0)); + EXPECT_EQ(ERROR_INVALID_PARAMETER, u.convert(fmt::WStringRef(0, 0)); } #endif // _WIN32