sl@0
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
/**
|
sl@0
|
17 |
@file
|
sl@0
|
18 |
@test
|
sl@0
|
19 |
@internalComponent - Internal Symbian test code
|
sl@0
|
20 |
*/
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifndef __EFMTESTSTEPBASE__
|
sl@0
|
23 |
#define __EFMTESTSTEPBASE__
|
sl@0
|
24 |
|
sl@0
|
25 |
#include <test/testexecutestepbase.h>
|
sl@0
|
26 |
#include "efm_test_consts.h"
|
sl@0
|
27 |
/*
|
sl@0
|
28 |
test type section name
|
sl@0
|
29 |
test type section indicates whether the test step is performed in normal
|
sl@0
|
30 |
or low capabilty environment
|
sl@0
|
31 |
*/
|
sl@0
|
32 |
_LIT(KTestLowCap, "testlowcap");
|
sl@0
|
33 |
_LIT(KTestOOM, "testOOM");
|
sl@0
|
34 |
|
sl@0
|
35 |
//macros used for testing
|
sl@0
|
36 |
#define TESTDIAGNOSTIC(cond,message)\
|
sl@0
|
37 |
if (!(cond))\
|
sl@0
|
38 |
{\
|
sl@0
|
39 |
ERR_PRINTF1( message);\
|
sl@0
|
40 |
SetTestStepResult(EFail);\
|
sl@0
|
41 |
}
|
sl@0
|
42 |
|
sl@0
|
43 |
#define TESTDIAGNOSTICERROR(cond,message,error)\
|
sl@0
|
44 |
if (!(cond))\
|
sl@0
|
45 |
{\
|
sl@0
|
46 |
ERR_PRINTF2( message, error );\
|
sl@0
|
47 |
SetTestStepResult(EFail);\
|
sl@0
|
48 |
}
|
sl@0
|
49 |
|
sl@0
|
50 |
/** Test step that publishes features required by the rest of test steps
|
sl@0
|
51 |
*/
|
sl@0
|
52 |
_LIT(KEFMTestStepPublishFeatures, "EFMTestStepPublishFeatures");
|
sl@0
|
53 |
|
sl@0
|
54 |
class CEFMTestStepPublishFeatures : public CTestStep
|
sl@0
|
55 |
{
|
sl@0
|
56 |
public:
|
sl@0
|
57 |
CEFMTestStepPublishFeatures();
|
sl@0
|
58 |
virtual TVerdict doTestStepL(void);
|
sl@0
|
59 |
};
|
sl@0
|
60 |
|
sl@0
|
61 |
/** Base class for configurable test steps
|
sl@0
|
62 |
*/
|
sl@0
|
63 |
class CEFMConfigurableTestStepBase : public CTestStep
|
sl@0
|
64 |
{
|
sl@0
|
65 |
public:
|
sl@0
|
66 |
virtual TVerdict doTestStepPreambleL(void);
|
sl@0
|
67 |
protected:
|
sl@0
|
68 |
virtual void CheckCondition(TBool aMainCondition, TBool aOOMCondition, TPtrC aLoggingMessage, TInt aErrorCode);
|
sl@0
|
69 |
|
sl@0
|
70 |
TBool iLowCap;
|
sl@0
|
71 |
TBool iOOM;
|
sl@0
|
72 |
};
|
sl@0
|
73 |
|
sl@0
|
74 |
#endif
|