os/graphics/graphicsresourceservices/graphicsresourceimplementation/test/inc/tgraphicsresourceinternalteststepbase.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsresourceservices/graphicsresourceimplementation/test/inc/tgraphicsresourceinternalteststepbase.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,50 @@
     1.4 +// Copyright (c) 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 "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 +#ifndef TGRAPHICSRESOURCEINTERNALTESTSTEPBASE_H
    1.19 +#define TGRAPHICSRESOURCEINTERNALTESTSTEPBASE_H
    1.20 +
    1.21 +#include <test/ttmsgraphicsstep.h>
    1.22 +#include <sgresource/sgresource.h>
    1.23 +#include "tgraphicsresourcemultiprocessthread.h"
    1.24 +#include "tgraphicsresourceinternalsecondprocessenums.h"
    1.25 +
    1.26 +/**
    1.27 +Base Class for the Graphics Resource internal tests; contains helper functions
    1.28 +for creating second processes and retrieving test results or checking panics.
    1.29 + */
    1.30 +class CTGraphicsResourceInternalBase : public CTTMSGraphicsStep
    1.31 +	{
    1.32 +public:
    1.33 +	CTGraphicsResourceInternalBase();
    1.34 +	~CTGraphicsResourceInternalBase();
    1.35 +	
    1.36 +	inline void testBooleanTrue(TBool aCondition, const TText8* aFile, TInt aLine);
    1.37 +	inline void testBooleanTrueWithErrorCode(TBool aCondition, TInt aErrorCode, const TText8* aFile, TInt aLine);
    1.38 +
    1.39 +	TInt CreateSecondProcessAndDoTestL(const TDesC &aProcessName, TSgResIntTestInfo& aTestInfo);
    1.40 +	void CreateSecondProcessAndCheckAllocPanicL(const TDesC &aProcessName, TSgResIntTestInfo& aTestInfo, const TDesC &aAllocType);
    1.41 +	};
    1.42 +
    1.43 +inline void CTGraphicsResourceInternalBase::testBooleanTrue(TBool aCondition, const TText8* aFile, TInt aLine) 
    1.44 +	{
    1.45 +	MQCTest(aCondition, aFile, aLine);
    1.46 +	}
    1.47 +
    1.48 +inline void CTGraphicsResourceInternalBase::testBooleanTrueWithErrorCode(TBool aCondition, TInt aErrorCode, const TText8* aFile, TInt aLine)
    1.49 +	{
    1.50 +	MQCTestWithErrorCode(aCondition, aErrorCode, aFile, aLine);
    1.51 +	}
    1.52 +
    1.53 +#endif // TGRAPHICSRESOURCEINTERNALTESTSTEPBASE_H