os/kernelhwsrv/kerneltest/e32test/property/t_framework.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/property/t_framework.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,68 @@
     1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __T_FRAMEWORK_H__
    1.20 +#define __T_FRAMEWORK_H__
    1.21 +
    1.22 +#include <e32std.h>
    1.23 +#include <e32base.h>
    1.24 +#include <e32property.h>
    1.25 +
    1.26 +#define TF_ERROR(aRes, aCond)  ((void) ((aCond) || (CTestProgram::Panic(aRes, #aCond, __FILE__, __LINE__), 0)))
    1.27 +#define TF_ERROR_PROG(aProg, aRes, aCond)  ((void) ((aCond) || ((aProg)->Panic(aRes, #aCond, __FILE__, __LINE__), 0)))
    1.28 +
    1.29 +class CTestProgram : public CBase
    1.30 +	{
    1.31 +public:
    1.32 +
    1.33 +	static void Start();
    1.34 +	static void End();
    1.35 +
    1.36 +	static void LaunchGroup(CTestProgram** aGroup, TUint aCount);
    1.37 +	static void SpawnGroup(CTestProgram** aGroup, TUint aCount);
    1.38 +
    1.39 +	CTestProgram(const TDesC& aName);
    1.40 +	
    1.41 +	void Exec(const TDesC& aFile, TAny* args, TInt size); 
    1.42 +
    1.43 +	void Spawn(TUint aCount);
    1.44 +	void Wait();
    1.45 +
    1.46 +	void Launch(TUint aCount);
    1.47 +
    1.48 +	virtual void Run(TUint aCount) = 0;
    1.49 +
    1.50 +	void Panic (TInt aError, char* aCond, char* aFile, TInt aLine);
    1.51 +
    1.52 +private:
    1.53 +	static TInt ThreadEntry(TAny*);
    1.54 +
    1.55 +	void Panic();
    1.56 +
    1.57 +	const TDesC&	iName;	
    1.58 +
    1.59 +	TUint			iCount;
    1.60 +	TRequestStatus	iStatus;
    1.61 +	TRequestStatus	iDestroyStatus;
    1.62 +
    1.63 +	TThreadId		iThreadId;
    1.64 +
    1.65 +	TInt	iError;
    1.66 +	char*	iCond;
    1.67 +	char*	iFile;
    1.68 +	TInt	iLine;
    1.69 +	};
    1.70 +
    1.71 +#endif