|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <stdio.h> |
|
19 #include<e32std.h> |
|
20 #include "libutils.h" |
|
21 #include"std_log_result.h" |
|
22 #define LOG_FILENAME_LINE __FILE__, __LINE__ |
|
23 int main() |
|
24 { |
|
25 __UHEAP_MARK; |
|
26 { |
|
27 int retval[10]; |
|
28 wchar_t* mycharstring = L"hellohello"; |
|
29 RBuf16 buf; |
|
30 retval[0]= WcharToRbuf16(mycharstring,buf); |
|
31 printf("The first value in retval array is %d\n", retval[0]); |
|
32 |
|
33 wstring str; |
|
34 retval[1]= Rbuf16ToWstring(buf,str); |
|
35 printf("The second value in retval array is %d\n", retval[1]); |
|
36 |
|
37 TBuf16 <15> tbuf; |
|
38 retval[2]= WstringToTbuf16(str,tbuf); |
|
39 printf("The third value in retval array is %d\n", retval[2]); |
|
40 |
|
41 wchar_t* myfinalstring= new wchar_t[15]; |
|
42 int size=15; |
|
43 retval[3]= Tbuf16ToWchar(tbuf,myfinalstring,size); |
|
44 printf("The fourth value in retval array is %d\n", retval[3]); |
|
45 |
|
46 if(!wcscmp(mycharstring,myfinalstring)) |
|
47 { |
|
48 printf("\nintegration_test_scenario16 case passed"); |
|
49 } |
|
50 else |
|
51 { |
|
52 printf("\nintegration_test_scenario16 case failed"); |
|
53 assert_failed = true; |
|
54 } |
|
55 buf.Close(); |
|
56 delete[] myfinalstring; |
|
57 } |
|
58 __UHEAP_MARKEND; |
|
59 testResultXml("integration_test_scenario16"); |
|
60 return 0; |
|
61 } |