equal
deleted
inserted
replaced
18 #include <stdio.h> |
18 #include <stdio.h> |
19 #include<e32std.h> |
19 #include<e32std.h> |
20 #include "libutils.h" |
20 #include "libutils.h" |
21 #include"std_log_result.h" |
21 #include"std_log_result.h" |
22 #define LOG_FILENAME_LINE __FILE__, __LINE__ |
22 #define LOG_FILENAME_LINE __FILE__, __LINE__ |
23 int main() |
23 void main() |
24 { |
24 { |
25 __UHEAP_MARK; |
25 __UHEAP_MARK; |
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 TBufC16<30> buf; |
29 TBufC16<30> buf; |
30 TPtr16 myTptr = buf.Des(); |
30 TPtr16 myTptr = buf.Des(); |
31 wchar_t* temp = new wchar_t[30]; |
31 wchar_t* temp = new wchar_t[30]; |
32 retval = CharpToTptr16(mycharstring, myTptr); |
32 retval = CharpToTptr16(mycharstring,temp, myTptr); |
33 |
33 |
34 int buf_len = myTptr.Length(); |
34 int buf_len = myTptr.Length(); |
35 if (retval ==ESuccess &&\ |
35 if (retval ==ESuccess &&\ |
36 char_length == buf_len ) |
36 char_length == buf_len ) |
37 { |
37 { |
43 assert_failed = true; |
43 assert_failed = true; |
44 } |
44 } |
45 delete[] temp; |
45 delete[] temp; |
46 __UHEAP_MARKEND; |
46 __UHEAP_MARKEND; |
47 testResultXml("test_charptotptr16_boundary1"); |
47 testResultXml("test_charptotptr16_boundary1"); |
48 return 0; |
|
49 } |
48 } |