xml/libxml2libs/test/tef/xml2/src/texmlengine.cpp
changeset 0 e35f40988205
equal deleted inserted replaced
-1:000000000000 0:e35f40988205
       
     1 // Copyright (c) 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 /**
       
    17  @file texmlengine.cpp
       
    18  @internalTechnology
       
    19 */
       
    20 #include "texml2teststep.h"
       
    21 #include <xml/utils/xmlengxestd.h>
       
    22 
       
    23 /**
       
    24  * Class CXmlEngineStep Implementation
       
    25  */
       
    26 
       
    27 /**
       
    28  * Constructor. Sets the test step name so that it can be 
       
    29  * differentiated from within doTestStepL()
       
    30  */
       
    31 CXmlEngineStep::CXmlEngineStep(const TDesC& aStepName)
       
    32 	{
       
    33 	SetTestStepName(aStepName);
       
    34 	}
       
    35 
       
    36 /**
       
    37  * TEF invokes doTestStepL interface along with the step name
       
    38  * to let appropriate action to be taken for the test step.
       
    39  */
       
    40 TVerdict CXmlEngineStep::doTestStepL(void)
       
    41 	{
       
    42 	if (TestStepName() == KXmlEnginePushAndPop)
       
    43 		{
       
    44 		INFO_PRINTF1(KXmlEnginePushAndPop);
       
    45 		SetTestStepResult(EPass);
       
    46 		TRAPD(err, TestKXmlEnginePushAndPopL());
       
    47 		if(err != KErrNone)
       
    48 			{
       
    49 			SetTestStepResult(EFail);
       
    50 			}
       
    51 		}
       
    52 	return TestStepResult();
       
    53 	}
       
    54 /**
       
    55  * Tests XmlEnginePushL, XmlEnginePopAndClose
       
    56  */
       
    57 TVerdict CXmlEngineStep::TestKXmlEnginePushAndPopL()
       
    58 	{
       
    59 	XmlEnginePushL();
       
    60 	XmlEnginePopAndClose();
       
    61 	return EPass;
       
    62 	}