cryptomgmtlibs/securitytestfw/test/testhandler2/tTestSpec.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 2002-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 the License "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 * T_TESTSPEC.H
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __T_TESTSPEC_H__
       
    21 #define __T_TESTSPEC_H__
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <testhandler2/t_mtestspec.h>
       
    25 
       
    26 /**
       
    27  * This class represents a series of a test that needs to be run. It should be passed 
       
    28  * to a CTestHandler object in order for the tests to be run.
       
    29  */
       
    30 class CTestSpec : public CBase, public MTestSpec
       
    31 	{
       
    32 public:
       
    33 	IMPORT_C static CTestSpec* NewL();
       
    34 	virtual ~CTestSpec();
       
    35 	
       
    36 public: // from MTestSpec
       
    37 	IMPORT_C virtual TBool GetNextTest(CTestAction*& aAction);
       
    38 
       
    39 public:
       
    40 	/**
       
    41 	 * This function adds a test to the series of tests. The class takes ownership
       
    42 	 * of the argument.
       
    43 	 * @param aAction The action to add. This pointer must not be 0.
       
    44 	 * @return A standard error code.
       
    45 	 */
       
    46 	IMPORT_C virtual TInt AddNextTest(CTestAction* aAction);
       
    47 
       
    48 	/// Free all tests, so that we can do a comparison of the heap count before
       
    49 	/// any tests were loaded and after they were all run.
       
    50 	void FreeAllTests();
       
    51 
       
    52 private:
       
    53 	CTestSpec();
       
    54 	//void ConstructL();
       
    55 
       
    56 private:
       
    57 	/**
       
    58 	 * This array contains all the tests to be run. The tests are owned by this class and
       
    59 	 * are destroyed by the destructor.
       
    60 	 */
       
    61 	RPointerArray<CTestAction> iTestActionArray;
       
    62 	TInt iTestNumber;
       
    63 	};
       
    64 
       
    65 #endif