os/persistentdata/featuremgmt/featuremgr/test/shared/inc/efm_teststepbase.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2007-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
    18  @test
    19  @internalComponent - Internal Symbian test code 
    20 */
    21 
    22 #ifndef __EFMTESTSTEPBASE__
    23 #define __EFMTESTSTEPBASE__
    24                                                          
    25 #include <test/testexecutestepbase.h>
    26 #include "efm_test_consts.h"
    27 /*
    28 test type section name 
    29 test type section indicates whether the test step is performed in normal 
    30 or low capabilty environment
    31 */
    32 _LIT(KTestLowCap, "testlowcap");
    33 _LIT(KTestOOM, "testOOM");
    34 
    35 //macros used for testing
    36 #define TESTDIAGNOSTIC(cond,message)\
    37    if (!(cond))\
    38    {\
    39    ERR_PRINTF1( message);\
    40    SetTestStepResult(EFail);\
    41    }
    42 
    43 #define TESTDIAGNOSTICERROR(cond,message,error)\
    44    if (!(cond))\
    45    {\
    46    ERR_PRINTF2( message, error );\
    47    SetTestStepResult(EFail);\
    48    }   
    49    
    50 /** Test step that publishes features required by the rest of test steps
    51 */
    52 _LIT(KEFMTestStepPublishFeatures, "EFMTestStepPublishFeatures");
    53 
    54 class CEFMTestStepPublishFeatures : public CTestStep
    55    {
    56 public:
    57    CEFMTestStepPublishFeatures();
    58    virtual TVerdict doTestStepL(void);
    59    };
    60 
    61 /** Base class for configurable test steps
    62 */
    63 class CEFMConfigurableTestStepBase : public CTestStep
    64    {
    65 public:
    66    	virtual TVerdict doTestStepPreambleL(void);   
    67 protected:
    68 	virtual void CheckCondition(TBool aMainCondition, TBool aOOMCondition, TPtrC aLoggingMessage, TInt aErrorCode);
    69 
    70    TBool iLowCap;
    71    TBool iOOM;
    72    };    
    73    
    74 #endif