File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
- #if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || \
1
+ #if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || \
2
2
defined (WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || \
3
3
defined(WINCE) || defined(_WIN32_WCE)
4
4
5
5
#include < locale>
6
6
#include < iostream>
7
+ // #include <fstream>
7
8
8
9
#include " test.h"
9
10
10
11
#include " libipc/platform/to_tchar.h"
11
12
12
13
TEST (Platform, to_tchar) {
13
14
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 " ;
17
18
wchar_t const *utf16 = L" hello world, \u4f60\u597d\uff0c\u3053\u3093\u306b\u3061\u306f " ;
18
19
{
19
20
ipc::string str = ipc::detail::to_tchar<char >(utf8);
@@ -22,6 +23,8 @@ TEST(Platform, to_tchar) {
22
23
{
23
24
ipc::wstring wtr = ipc::detail::to_tchar<wchar_t >(utf8);
24
25
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));
25
28
}
26
29
}
27
30
You can’t perform that action at this time.
0 commit comments