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 { |
26 { |
27 int retval[10]; |
27 int retval[10]; |
28 wchar_t* mycharstring = L"hellohello"; |
28 wchar_t* mycharstring = L"hellohello"; |
29 RBuf16 buf; |
29 RBuf16 buf; |
30 buf.CreateL(30); |
|
31 retval[0]= WcharToRbuf16(mycharstring,buf); |
30 retval[0]= WcharToRbuf16(mycharstring,buf); |
32 printf("The first value in retval array is %d\n", retval[0]); |
|
33 |
31 |
34 wstring str; |
32 wstring str; |
35 retval[1]= Rbuf16ToWstring(buf,str); |
33 retval[1]= Rbuf16ToWstring(buf,str); |
36 printf("The second value in retval array is %d\n", retval[1]); |
|
37 |
34 |
38 TBuf16 <15> tbuf; |
35 TBuf16 <15> tbuf; |
39 retval[2]= WstringToTbuf16(str,tbuf); |
36 retval[2]= WstringToTbuf16(str,tbuf); |
40 printf("The third value in retval array is %d\n", retval[2]); |
|
41 |
37 |
42 wchar_t* myfinalstring= new wchar_t[15]; |
38 wchar_t* myfinalstring= new wchar_t[15]; |
43 int size=15; |
39 int size=15; |
44 retval[3]= Tbuf16ToWchar(tbuf,myfinalstring,size); |
40 retval[3]= Tbuf16ToWchar(tbuf,myfinalstring,size); |
45 printf("The fourth value in retval array is %d\n", retval[3]); |
|
46 |
41 |
47 if(!wcscmp(mycharstring,myfinalstring)) |
42 if(!wcscmp(mycharstring,myfinalstring)) |
48 { |
43 { |
49 printf("\nintegration_test_scenario16 case passed"); |
44 printf("\nintegration_test_scenario16 case passed"); |
50 } |
45 } |