author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:48:56 +0100 | |
branch | GCC_SURGE |
changeset 45 | 4b03adbd26ca |
parent 22 | ddc455616bd6 |
parent 34 | 5fae379060a7 |
permissions | -rw-r--r-- |
31 | 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 |
_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 |
printf("retval1 value is %d\n", retval1); |
|
32 |
||
33 |
char *src2= des1; |
|
34 |
RBuf8 des2; |
|
34
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
35 |
des2.CreateL(30); |
31 | 36 |
retval2= CharToRbuf8(src2,des2); |
37 |
printf("retval2 value is %d\n", retval2); |
|
38 |
||
39 |
RBuf8 src3; |
|
40 |
src3.Create(des2); |
|
41 |
string des3; |
|
42 |
retval3= Rbuf8ToString(src3,des3); |
|
43 |
printf("retval3 value is %d\n", retval3); |
|
44 |
||
45 |
string src4=des3; |
|
46 |
TPtrC16 des4((unsigned short*)" ",50); |
|
47 |
wchar_t *aPtr= new wchar_t[20]; |
|
48 |
retval4= StringToTptrc16(src4,aPtr,des4); |
|
49 |
printf("retval4 value is %d\n", retval4); |
|
50 |
||
51 |
TPtrC16 src5= des4; |
|
52 |
char *des5= new char[30]; |
|
53 |
retval5= Tptrc16ToCharp(src5,des5,size2); |
|
54 |
printf("retval5 value is %d\n", retval5); |
|
55 |
||
56 |
ret= strncmp("integration_test9",(char*)des5,17); |
|
57 |
if(ret == ESuccess) |
|
58 |
{ |
|
59 |
printf("integration_test9 PASSED\n"); |
|
60 |
} |
|
61 |
else |
|
62 |
{ |
|
63 |
printf("integration_test9 FAILED\n"); |
|
64 |
assert_failed = true; |
|
65 |
} |
|
66 |
delete[] aPtr; |
|
67 |
delete[] des5; |
|
68 |
src3.Close(); |
|
69 |
delete[] des1; |
|
70 |
des2.Close(); |
|
71 |
} |
|
72 |
__UHEAP_MARKEND; |
|
73 |
testResultXml("integration_test_scenario9"); |
|
74 |
return 0; |
|
75 |
} |