os/graphics/graphicsresourceservices/graphicsresourceimplementation/test/inc/tgraphicsresourceinternalteststepbase.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 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 "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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 #ifndef TGRAPHICSRESOURCEINTERNALTESTSTEPBASE_H
    16 #define TGRAPHICSRESOURCEINTERNALTESTSTEPBASE_H
    17 
    18 #include <test/ttmsgraphicsstep.h>
    19 #include <sgresource/sgresource.h>
    20 #include "tgraphicsresourcemultiprocessthread.h"
    21 #include "tgraphicsresourceinternalsecondprocessenums.h"
    22 
    23 /**
    24 Base Class for the Graphics Resource internal tests; contains helper functions
    25 for creating second processes and retrieving test results or checking panics.
    26  */
    27 class CTGraphicsResourceInternalBase : public CTTMSGraphicsStep
    28 	{
    29 public:
    30 	CTGraphicsResourceInternalBase();
    31 	~CTGraphicsResourceInternalBase();
    32 	
    33 	inline void testBooleanTrue(TBool aCondition, const TText8* aFile, TInt aLine);
    34 	inline void testBooleanTrueWithErrorCode(TBool aCondition, TInt aErrorCode, const TText8* aFile, TInt aLine);
    35 
    36 	TInt CreateSecondProcessAndDoTestL(const TDesC &aProcessName, TSgResIntTestInfo& aTestInfo);
    37 	void CreateSecondProcessAndCheckAllocPanicL(const TDesC &aProcessName, TSgResIntTestInfo& aTestInfo, const TDesC &aAllocType);
    38 	};
    39 
    40 inline void CTGraphicsResourceInternalBase::testBooleanTrue(TBool aCondition, const TText8* aFile, TInt aLine) 
    41 	{
    42 	MQCTest(aCondition, aFile, aLine);
    43 	}
    44 
    45 inline void CTGraphicsResourceInternalBase::testBooleanTrueWithErrorCode(TBool aCondition, TInt aErrorCode, const TText8* aFile, TInt aLine)
    46 	{
    47 	MQCTestWithErrorCode(aCondition, aErrorCode, aFile, aLine);
    48 	}
    49 
    50 #endif // TGRAPHICSRESOURCEINTERNALTESTSTEPBASE_H