sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @test sl@0: @internalComponent - Internal Symbian test code sl@0: */ sl@0: sl@0: #ifndef __EFMTESTSTEPBASE__ sl@0: #define __EFMTESTSTEPBASE__ sl@0: sl@0: #include sl@0: #include "efm_test_consts.h" sl@0: /* sl@0: test type section name sl@0: test type section indicates whether the test step is performed in normal sl@0: or low capabilty environment sl@0: */ sl@0: _LIT(KTestLowCap, "testlowcap"); sl@0: _LIT(KTestOOM, "testOOM"); sl@0: sl@0: //macros used for testing sl@0: #define TESTDIAGNOSTIC(cond,message)\ sl@0: if (!(cond))\ sl@0: {\ sl@0: ERR_PRINTF1( message);\ sl@0: SetTestStepResult(EFail);\ sl@0: } sl@0: sl@0: #define TESTDIAGNOSTICERROR(cond,message,error)\ sl@0: if (!(cond))\ sl@0: {\ sl@0: ERR_PRINTF2( message, error );\ sl@0: SetTestStepResult(EFail);\ sl@0: } sl@0: sl@0: /** Test step that publishes features required by the rest of test steps sl@0: */ sl@0: _LIT(KEFMTestStepPublishFeatures, "EFMTestStepPublishFeatures"); sl@0: sl@0: class CEFMTestStepPublishFeatures : public CTestStep sl@0: { sl@0: public: sl@0: CEFMTestStepPublishFeatures(); sl@0: virtual TVerdict doTestStepL(void); sl@0: }; sl@0: sl@0: /** Base class for configurable test steps sl@0: */ sl@0: class CEFMConfigurableTestStepBase : public CTestStep sl@0: { sl@0: public: sl@0: virtual TVerdict doTestStepPreambleL(void); sl@0: protected: sl@0: virtual void CheckCondition(TBool aMainCondition, TBool aOOMCondition, TPtrC aLoggingMessage, TInt aErrorCode); sl@0: sl@0: TBool iLowCap; sl@0: TBool iOOM; sl@0: }; sl@0: sl@0: #endif