equal
deleted
inserted
replaced
19 #include <stdio.h> |
19 #include <stdio.h> |
20 #include<e32std.h> |
20 #include<e32std.h> |
21 #include "libutils.h" |
21 #include "libutils.h" |
22 #include"std_log_result.h" |
22 #include"std_log_result.h" |
23 #define LOG_FILENAME_LINE __FILE__, __LINE__ |
23 #define LOG_FILENAME_LINE __FILE__, __LINE__ |
24 void main() |
24 int main() |
25 { |
25 { |
26 __UHEAP_MARK; |
26 __UHEAP_MARK; |
27 int retval =ESuccess; |
27 int retval =ESuccess; |
28 wchar_t* mywcharstring = L"Hello Widechar String"; |
28 wchar_t* mywcharstring = L"Hello Widechar String"; |
29 int wchar_length= wcslen(mywcharstring); |
29 int wchar_length= wcslen(mywcharstring); |
30 RBuf8 myRBuf; |
30 RBuf8 myRBuf; |
|
31 myRBuf.CreateL(50); |
31 myRBuf.CleanupClosePushL(); |
32 myRBuf.CleanupClosePushL(); |
32 retval = WcharToRbuf8 (mywcharstring, myRBuf); |
33 retval = WcharToRbuf8 (mywcharstring, myRBuf); |
33 |
34 |
34 int buf_len = myRBuf.Length(); |
35 int buf_len = myRBuf.Length(); |
35 if (retval ==ESuccess && wchar_length == buf_len/2 ) |
36 if (retval ==ESuccess && wchar_length == buf_len/2 ) |
42 printf("wchartorbuf8 boundary1 Failed\n"); |
43 printf("wchartorbuf8 boundary1 Failed\n"); |
43 } |
44 } |
44 CleanupStack::PopAndDestroy(1); |
45 CleanupStack::PopAndDestroy(1); |
45 __UHEAP_MARKEND; |
46 __UHEAP_MARKEND; |
46 testResultXml("test_wchartorbuf8_boundary1"); |
47 testResultXml("test_wchartorbuf8_boundary1"); |
|
48 |
|
49 return 0; |
47 } |
50 } |