From 14984acd2749758ec2f0d7e6751b689504280918 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 30 Oct 2014 13:00:44 -0700 Subject: [PATCH] Fix UTF conversion tests --- test/util-test.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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