equal
deleted
inserted
replaced
|
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 #include <stdio.h> |
|
18 #include<e32std.h> |
|
19 #include <e32base.h> |
|
20 #include "libutils.h" |
|
21 #include"std_log_result.h" |
|
22 #define LOG_FILENAME_LINE __FILE__, __LINE__ |
|
23 |
|
24 int main() |
|
25 { |
|
26 //int count = 2; |
|
27 bool err = false; |
|
28 __UHEAP_MARK; |
|
29 __UHEAP_FAILNEXT(2); |
|
30 while(!err) |
|
31 { |
|
32 int retval =ESuccess; |
|
33 wchar_t* mywcharstring = L"Hello"; |
|
34 _LIT8(Kname,"hellohello"); |
|
35 HBufC8* buff = HBufC8::NewL(10); |
|
36 CleanupStack::PushL(buff); |
|
37 *buff = Kname; |
|
38 |
|
39 retval = WcharToHbufc8(mywcharstring, buff); |
|
40 |
|
41 if (retval ==EInsufficientSystemMemory) |
|
42 |
|
43 { |
|
44 |
|
45 printf("wchartohbufc8_reliability Passed\n"); |
|
46 err = true; |
|
47 //Logging to some file can be done here |
|
48 } |
|
49 |
|
50 else |
|
51 |
|
52 { |
|
53 assert_failed = true; |
|
54 printf("wchartohbufc8_reliability Failed\n"); |
|
55 //Logging to some file can be done here |
|
56 } |
|
57 } |
|
58 CleanupStack::PopAndDestroy(); |
|
59 __UHEAP_MARKEND; |
|
60 __UHEAP_RESET; |
|
61 testResultXml("test_wchartohbufc8_reliability"); |
|
62 |
|
63 return 0; |
|
64 } |