|
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 int retval[10]; |
|
28 TBufC8<30> buf; |
|
29 TPtrC8 myTptr8 = buf.Des(); |
|
30 wchar_t* myWchar = L"no_worth_purpose"; |
|
31 char* temp = new char[15]; |
|
32 retval[0] = WcharpToTptrc8(myWchar,temp,myTptr8); |
|
33 |
|
34 wstring myWstring; |
|
35 retval[1] = Tptrc8ToWstring(myTptr8,myWstring); |
|
36 |
|
37 TBufC<30> tbuf; |
|
38 TPtrC16 myTptr16 = tbuf.Des(); |
|
39 retval[2] = WstringToTptrc16(myWstring,myTptr16); |
|
40 |
|
41 char* myChar = new char[40]; |
|
42 int size = 40; |
|
43 retval[3] = Tptrc16ToCharp(myTptr16,myChar,size); |
|
44 |
|
45 TBufC8<30> buf8; |
|
46 TPtr8 myTptr = buf8.Des(); |
|
47 retval[4] = CharpToTptr8(myChar,myTptr); |
|
48 |
|
49 wchar_t* Wstr_fin = new wchar_t[36]; |
|
50 int size_char=36; |
|
51 retval[5] = Tptr8ToWcharp(myTptr,Wstr_fin,size_char); |
|
52 |
|
53 if(!wcscmp(myWchar,Wstr_fin)) |
|
54 { |
|
55 printf("\n\nintegration_test_scenario23 case passed"); |
|
56 } |
|
57 else |
|
58 { |
|
59 printf("\n\nintegration_test_scenario23 case failed"); |
|
60 assert_failed = true; |
|
61 } |
|
62 delete[] temp; |
|
63 delete[] myChar; |
|
64 delete[] Wstr_fin; |
|
65 } |
|
66 __UHEAP_MARKEND; |
|
67 testResultXml("integration_test_scenario23"); |
|
68 } |