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 { |
26 { |
27 wchar_t* mycharstring = L"hellohello"; |
27 wchar_t* mycharstring = L"hellohello"; |
28 int retval[10]; |
28 int retval[10]; |
29 RBuf8 buf; |
29 RBuf8 buf; |
30 buf.CreateL(20); |
|
31 retval[1]= WcharToRbuf8(mycharstring,buf); |
30 retval[1]= WcharToRbuf8(mycharstring,buf); |
32 |
31 |
33 wstring str; |
32 wstring str; |
34 retval[2]= Rbuf8ToWstring(buf,str); |
33 retval[2]= Rbuf8ToWstring(buf,str); |
35 |
34 |
37 retval[3]= WstringToTbuf8(str,tbuf); |
36 retval[3]= WstringToTbuf8(str,tbuf); |
38 |
37 |
39 wchar_t* myfinalstring= new wchar_t[35]; |
38 wchar_t* myfinalstring= new wchar_t[35]; |
40 int size=35; |
39 int size=35; |
41 retval[4]= Tbuf8ToWchar(tbuf,myfinalstring,size); |
40 retval[4]= Tbuf8ToWchar(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 } |
|
48 |
41 |
49 if(!wcscmp(mycharstring,myfinalstring)) |
42 if(!wcscmp(mycharstring,myfinalstring)) |
50 { |
43 { |
51 printf("\nintegration_test_scenario18 case passed"); |
44 printf("\nintegration_test_scenario18 case passed"); |
52 } |
45 } |
58 buf.Close(); |
51 buf.Close(); |
59 delete[] myfinalstring; |
52 delete[] myfinalstring; |
60 } |
53 } |
61 __UHEAP_MARKEND; |
54 __UHEAP_MARKEND; |
62 testResultXml("integration_test_scenario18"); |
55 testResultXml("integration_test_scenario18"); |
63 return 0; |
|
64 } |
56 } |