equal
deleted
inserted
replaced
26 int retval =ESuccess; |
26 int retval =ESuccess; |
27 char* mycharstring = "Hello Char String"; |
27 char* mycharstring = "Hello Char String"; |
28 int char_length= strlen(mycharstring); |
28 int char_length= strlen(mycharstring); |
29 TPtrC myTptrc; |
29 TPtrC myTptrc; |
30 wchar_t* myptr= new wchar_t[strlen(mycharstring)+1]; |
30 wchar_t* myptr= new wchar_t[strlen(mycharstring)+1]; |
31 retval = CharpToTptrc16(mycharstring,myptr, myTptrc); |
31 retval = CharpToTptrc16(mycharstring, myptr, myTptrc); |
32 |
32 |
33 int buf_len = myTptrc.Length(); |
33 int buf_len = myTptrc.Length(); |
34 if (retval ==ESuccess &&\ |
34 if (retval ==ESuccess &&\ |
35 char_length == buf_len &&\ |
35 char_length == buf_len &&\ |
36 wcsncmp(L"Hello Char String",(wchar_t*)myTptrc.Ptr() , 17) ==0 ) |
36 wcsncmp(L"Hello Char String",(wchar_t*)myTptrc.Ptr() , 17) ==0 ) |
41 { |
41 { |
42 assert_failed = true; |
42 assert_failed = true; |
43 printf("charptotptrc16 content check Failed\n"); |
43 printf("charptotptrc16 content check Failed\n"); |
44 } |
44 } |
45 free(myptr); |
45 free(myptr); |
|
46 __UHEAP_MARKEND; |
46 testResultXml("test_charptotptrc16_content_check"); |
47 testResultXml("test_charptotptrc16_content_check"); |
47 return 0; |
48 return 0; |
48 } |
49 } |