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 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 RBuf8 buf; |
29 RBuf8 buf; |
|
30 buf.CreateL(20); |
30 retval[1]=WcharToRbuf8(mycharstring,buf); |
31 retval[1]=WcharToRbuf8(mycharstring,buf); |
31 |
32 |
32 wstring str; |
33 wstring str; |
33 retval[2] = Rbuf8ToWstring(buf,str); |
34 retval[2] = Rbuf8ToWstring(buf,str); |
34 |
35 |
36 retval[3]= WstringToTbuf16(str,tbuf); |
37 retval[3]= WstringToTbuf16(str,tbuf); |
37 |
38 |
38 wchar_t* myfinalstring= new wchar_t[15]; |
39 wchar_t* myfinalstring= new wchar_t[15]; |
39 int size=15; |
40 int size=15; |
40 retval[4]= Tbuf16ToWchar(tbuf,myfinalstring,size); |
41 retval[4]= Tbuf16ToWchar(tbuf,myfinalstring,size); |
|
42 |
|
43 for(int i=1; i<=4; i++) |
|
44 { |
|
45 if (retval[i]!= 0) |
|
46 printf("Conversion failed for retval\n",(retval[i])); |
|
47 } |
41 |
48 |
42 if(!wcscmp(mycharstring,myfinalstring)) |
49 if(!wcscmp(mycharstring,myfinalstring)) |
43 { |
50 { |
44 printf("\nintegration_test_scenario17 case passed"); |
51 printf("\nintegration_test_scenario17 case passed"); |
45 } |
52 } |
51 buf.Close(); |
58 buf.Close(); |
52 delete [] myfinalstring; |
59 delete [] myfinalstring; |
53 } |
60 } |
54 __UHEAP_MARKEND; |
61 __UHEAP_MARKEND; |
55 testResultXml("integration_test_scenario17"); |
62 testResultXml("integration_test_scenario17"); |
|
63 return 0; |
56 } |
64 } |