Skip to content

Commit df3cf1b

Browse files
committed
modify to_tchar test
1 parent e8cf471 commit df3cf1b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/test_platform.cpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || \
1+
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || \
22
defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || \
33
defined(WINCE) || defined(_WIN32_WCE)
44

55
#include <locale>
66
#include <iostream>
7+
//#include <fstream>
78

89
#include "test.h"
910

1011
#include "libipc/platform/to_tchar.h"
1112

1213
TEST(Platform, to_tchar) {
1314
char const *utf8 = "hello world, "
14-
"\xe6\xb5\xa3\xe7\x8a\xb2\xe3\x82\xbd\xe9\x94\x9b\xe5\xb1\xbb\xe4"
15-
"\xba\xbe\xe9\x8a\x88\xe6\x92\xb1\xe4\xbc\x80\xe9\x8a\x87\xc2\xb0"
16-
"\xe4\xbc\x85";
15+
"\xe4\xbd\xa0\xe5\xa5\xbd\xef\xbc"
16+
"\x8c\xe3\x81\x93\xe3\x82\x93\xe3"
17+
"\x81\xab\xe3\x81\xa1\xe3\x81\xaf";
1718
wchar_t const *utf16 = L"hello world, \u4f60\u597d\uff0c\u3053\u3093\u306b\u3061\u306f";
1819
{
1920
ipc::string str = ipc::detail::to_tchar<char>(utf8);
@@ -22,6 +23,8 @@ TEST(Platform, to_tchar) {
2223
{
2324
ipc::wstring wtr = ipc::detail::to_tchar<wchar_t>(utf8);
2425
EXPECT_STREQ(wtr.c_str(), utf16);
26+
//std::ofstream out("out.txt", std::ios::binary|std::ios::out);
27+
//out.write((char const *)wtr.c_str(), wtr.size() * sizeof(wchar_t));
2528
}
2629
}
2730

0 commit comments

Comments
 (0)