From 2e21e7d1f1ad8637b2769ca2c58e9e354e78af1c Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 13 Mar 2018 22:20:06 -0400 Subject: [PATCH] Fix util-test --- test/util-test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/util-test.cc b/test/util-test.cc index 11957655..474177bb 100644 --- a/test/util-test.cc +++ b/test/util-test.cc @@ -689,7 +689,7 @@ TEST(UtilTest, UTF8ToUTF16EmptyString) { template void check_utf_conversion_error( const char *message, - fmt::basic_string_view str = fmt::basic_string_view(0, 0)) { + fmt::basic_string_view str = fmt::basic_string_view(0, 1)) { fmt::memory_buffer out; fmt::internal::format_windows_error(out, ERROR_INVALID_PARAMETER, message); fmt::system_error error(0, ""); @@ -716,7 +716,7 @@ TEST(UtilTest, UTF8ToUTF16Error) { TEST(UtilTest, UTF16ToUTF8Convert) { fmt::internal::utf16_to_utf8 u; - EXPECT_EQ(ERROR_INVALID_PARAMETER, u.convert(fmt::wstring_view(0, 0))); + EXPECT_EQ(ERROR_INVALID_PARAMETER, u.convert(fmt::wstring_view(0, 1))); EXPECT_EQ(ERROR_INVALID_PARAMETER, u.convert(fmt::wstring_view(L"foo", INT_MAX + 1u))); }