First public contribution.
1 // Copyright (c) 2002-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 the License "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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __T_FRAMEWORK_H__
17 #define __T_FRAMEWORK_H__
21 #include <e32property.h>
23 #define TF_ERROR(aRes, aCond) ((void) ((aCond) || (CTestProgram::Panic(aRes, #aCond, __FILE__, __LINE__), 0)))
24 #define TF_ERROR_PROG(aProg, aRes, aCond) ((void) ((aCond) || ((aProg)->Panic(aRes, #aCond, __FILE__, __LINE__), 0)))
26 class CTestProgram : public CBase
33 static void LaunchGroup(CTestProgram** aGroup, TUint aCount);
34 static void SpawnGroup(CTestProgram** aGroup, TUint aCount);
36 CTestProgram(const TDesC& aName);
38 void Exec(const TDesC& aFile, TAny* args, TInt size);
40 void Spawn(TUint aCount);
43 void Launch(TUint aCount);
45 virtual void Run(TUint aCount) = 0;
47 void Panic (TInt aError, char* aCond, char* aFile, TInt aLine);
50 static TInt ThreadEntry(TAny*);
57 TRequestStatus iStatus;
58 TRequestStatus iDestroyStatus;