|
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include <e32test.h> |
|
17 |
|
18 #include "stabilitytestclass.h" |
|
19 #include "testdocuments.h" |
|
20 |
|
21 static RTest test(_L("t_wbxmloomwmlparserstabilitytests")); |
|
22 |
|
23 |
|
24 /** |
|
25 @SYMTestCaseID SYSLIB-XML-CT-3727 |
|
26 @SYMTestCaseDesc OOM Testing. |
|
27 @SYMTestPriority Medium |
|
28 @SYMTestActions Parsing wml documents. |
|
29 @SYMTestExpectedResults Parser should be able to cope with parsing. |
|
30 @SYMREQ REQ0000 |
|
31 */ |
|
32 static void WmlOomTestsL() |
|
33 { |
|
34 test.Next(_L(" @SYMTestCaseID:SYSLIB-XML-CT-3727 WmlOomTestsL tests... ")); |
|
35 |
|
36 __UHEAP_MARK; |
|
37 |
|
38 CStabilityTestClass* wmlTest = CStabilityTestClass::NewL(test, ETrue); |
|
39 CleanupStack::PushL(wmlTest); |
|
40 wmlTest->StabilityTestL(KWml1_1Directory(), KWmlcExt(), &CStabilityTestClass::TestWholeL); |
|
41 CleanupStack::PopAndDestroy(wmlTest); |
|
42 |
|
43 CStabilityTestClass* wmlTestMid = CStabilityTestClass::NewL(test, ETrue, KMidChunkSize); |
|
44 CleanupStack::PushL(wmlTestMid); |
|
45 wmlTestMid->StabilityTestL(KWml1_1Directory(), KWmlcExt(), &CStabilityTestClass::TestChunkL); |
|
46 CleanupStack::PopAndDestroy(wmlTestMid); |
|
47 |
|
48 __UHEAP_MARKEND; |
|
49 } |
|
50 |
|
51 |
|
52 static void MainL() |
|
53 { |
|
54 WmlOomTestsL(); |
|
55 } |
|
56 |
|
57 |
|
58 TInt E32Main() |
|
59 { |
|
60 __UHEAP_MARK; |
|
61 test.Title(); |
|
62 test.Start(_L("initialising")); |
|
63 |
|
64 CTrapCleanup* c=CTrapCleanup::New(); |
|
65 |
|
66 // start the loader |
|
67 RFs fs; |
|
68 test (fs.Connect()==KErrNone); |
|
69 fs.Close(); |
|
70 |
|
71 test (c!=0); |
|
72 TRAPD(r,MainL()); |
|
73 test (r==KErrNone); |
|
74 delete c; |
|
75 test.End(); |
|
76 test.Close(); |
|
77 __UHEAP_MARKEND; |
|
78 return KErrNone; |
|
79 } |