lbstest/lbstestproduct/LbsROMspecificSuites/src/ctlbstestsuitestepbase.cpp
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 /*
       
     2 * Copyright (c) 2005-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 
       
    19 /**
       
    20  @file 
       
    21  @internalTechnology
       
    22  @test
       
    23 */
       
    24 
       
    25 #include "ctlbstestsuitestepbase.h"
       
    26 
       
    27 
       
    28 TVerdict CTe_TestSuiteStepBase::doTestStepPreambleL()
       
    29 /**
       
    30  * @return - TVerdict
       
    31  * Implementation of CTestStep base class virtual
       
    32  * It is used for doing all initialisation common to derived classes in here.
       
    33  * Make it being able to leave if there are any errors here as there's no point in
       
    34  * trying to run a test step if anything fails.
       
    35  * The leave will be picked up by the framework.
       
    36  */
       
    37 	{
       
    38 	_LIT(KTestName, "CTe_TestSuiteStepBase::doTestStepPreambleL()");
       
    39 	INFO_PRINTF1(KTestName);
       
    40 	
       
    41 	iScheduler = new(ELeave) CActiveScheduler();
       
    42     CActiveScheduler::Install(iScheduler);
       
    43     SetTestStepResult(EPass);
       
    44 	return TestStepResult();
       
    45 	}
       
    46 
       
    47 TVerdict CTe_TestSuiteStepBase::doTestStepPostambleL()
       
    48 /**
       
    49  * @return - TVerdict
       
    50  * Implementation of CTestStep base class virtual
       
    51  * It is used for doing all after test treatment common to derived classes in here.
       
    52  * Make it being able to leave
       
    53  * The leave will be picked up by the framework.
       
    54  */
       
    55 	{
       
    56 	return TestStepResult();
       
    57 	}
       
    58 
       
    59 CTe_TestSuiteStepBase::~CTe_TestSuiteStepBase()
       
    60 	{
       
    61 	delete iScheduler;
       
    62 	delete iModulesSettings;
       
    63 	}
       
    64 
       
    65 CTe_TestSuiteStepBase::CTe_TestSuiteStepBase()
       
    66 	{
       
    67 	}
       
    68 
       
    69 
       
    70 
       
    71 void CTe_TestSuiteStepBase::CheckExpectedResult(TInt aResult, TInt aExpectedResult, const TDesC& aLabel)
       
    72     {
       
    73     if (aResult!=aExpectedResult)
       
    74         {
       
    75         ERR_PRINTF1(aLabel);
       
    76         ERR_PRINTF2(KValueReturned, aResult);
       
    77         ERR_PRINTF2(KValueExpected, aExpectedResult);
       
    78         SetTestStepResult(EFail);
       
    79         }
       
    80     }
       
    81 
       
    82