|
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 void main() |
|
24 { |
|
25 __UHEAP_MARK; |
|
26 { |
|
27 _LIT8(src1,"integration_test9"); |
|
28 char *des1= new char[20]; |
|
29 int size1=20,ret,retval1,retval2,retval3,retval4,retval5,size2=40; |
|
30 retval1= Tlitc8ToChar(src1,des1,size1); |
|
31 |
|
32 char *src2= des1; |
|
33 RBuf8 des2; |
|
34 retval2= CharToRbuf8(src2,des2); |
|
35 |
|
36 RBuf8 src3; |
|
37 src3.Create(des2); |
|
38 string des3; |
|
39 retval3= Rbuf8ToString(src3,des3); |
|
40 |
|
41 string src4=des3; |
|
42 TPtrC16 des4((unsigned short*)" ",50); |
|
43 wchar_t *aPtr= new wchar_t[20]; |
|
44 retval4= StringToTptrc16(src4,aPtr,des4); |
|
45 |
|
46 TPtrC16 src5= des4; |
|
47 char *des5= new char[30]; |
|
48 retval5= Tptrc16ToCharp(src5,des5,size2); |
|
49 |
|
50 ret= strncmp("integration_test9",(char*)des5,17); |
|
51 if(ret == ESuccess) |
|
52 { |
|
53 printf("integration_test9 PASSED\n"); |
|
54 } |
|
55 else |
|
56 { |
|
57 printf("integration_test9 FAILED\n"); |
|
58 assert_failed = true; |
|
59 } |
|
60 delete[] aPtr; |
|
61 delete[] des5; |
|
62 src3.Close(); |
|
63 delete[] des1; |
|
64 des2.Close(); |
|
65 } |
|
66 __UHEAP_MARKEND; |
|
67 testResultXml("integration_test_scenario9"); |
|
68 } |