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