From e8cf4716156dc16a2a031d4d41db58543d1fc11a Mon Sep 17 00:00:00 2001 From: mutouyun Date: Sun, 15 Aug 2021 14:42:47 +0800 Subject: [PATCH] modify to_tchar test --- test/test_platform.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test_platform.cpp b/test/test_platform.cpp index 56da3d2..22ea848 100644 --- a/test/test_platform.cpp +++ b/test/test_platform.cpp @@ -1,4 +1,4 @@ -#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || \ +#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || \ defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || \ defined(WINCE) || defined(_WIN32_WCE) @@ -11,10 +11,10 @@ TEST(Platform, to_tchar) { char const *utf8 = "hello world, " - "\xE6\xB5\xA3\xE7\x8A\xB2\xE3\x82\xBD\xE9\x94\x9B\xE5\xB1\xBB\xE4" - "\xBA\xBE\xE9\x8A\x88\xE6\x92\xB1\xE4\xBC\x80\xE9\x8A\x87\xC2\xB0" - "\xE4\xBC\x85"; - wchar_t const *utf16 = L"hello world, \x6D63\x72B2\x30BD\x951B\x5C7B\x4EBE\x9288\x64B1\x4F00\x9287\xB0\x4F05"; + "\xe6\xb5\xa3\xe7\x8a\xb2\xe3\x82\xbd\xe9\x94\x9b\xe5\xb1\xbb\xe4" + "\xba\xbe\xe9\x8a\x88\xe6\x92\xb1\xe4\xbc\x80\xe9\x8a\x87\xc2\xb0" + "\xe4\xbc\x85"; + wchar_t const *utf16 = L"hello world, \u4f60\u597d\uff0c\u3053\u3093\u306b\u3061\u306f"; { ipc::string str = ipc::detail::to_tchar(utf8); EXPECT_STREQ(str.c_str(), utf8);