xml/wbxmlparser/test/rtest/tsrc/t_wbxmlsiparserstabilitytests.cpp
changeset 0 e35f40988205
equal deleted inserted replaced
-1:000000000000 0:e35f40988205
       
     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_wbxmlsiparserstabilitytests"));
       
    22 
       
    23 
       
    24 /**
       
    25 @SYMTestCaseID 			 	SYSLIB-XML-CT-3724
       
    26 @SYMTestCaseDesc		    Parsing service indication documents.
       
    27 @SYMTestPriority 		    Medium
       
    28 @SYMTestActions  		    Parsing the documents.
       
    29 @SYMTestExpectedResults 	Parser should cope with parsing the documents.
       
    30 @SYMREQ 		 		 	REQ0000
       
    31 */
       
    32 static void SiTestsL()
       
    33 	{
       
    34 	test.Next(_L(" @SYMTestCaseID:SYSLIB-XML-CT-3724 SiTestsL tests... "));
       
    35 
       
    36 	__UHEAP_MARK;
       
    37 
       
    38 	CStabilityTestClass* siTest = CStabilityTestClass::NewL(test);
       
    39 	CleanupStack::PushL(siTest);
       
    40 	siTest->StabilityTestL(KSi1_0Directory(), KSiExt(), &CStabilityTestClass::TestWholeL);
       
    41 	CleanupStack::PopAndDestroy(siTest);
       
    42 
       
    43 	CStabilityTestClass* siTestMin = CStabilityTestClass::NewL(test, EFalse, KMinChunkSize);
       
    44 	CleanupStack::PushL(siTestMin);
       
    45 	siTestMin->StabilityTestL(KSi1_0Directory(), KSiExt(), &CStabilityTestClass::TestChunkL);
       
    46 	CleanupStack::PopAndDestroy(siTestMin);
       
    47 
       
    48 	__UHEAP_MARKEND;
       
    49 	}
       
    50 
       
    51 
       
    52 static void MainL()
       
    53 	{
       
    54 	SiTestsL();
       
    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 	}