sl@0: /* sl@0: * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * Wrapper for RTest which logs to a file, counts failures (without panicing) and sl@0: * generates a final result line the ONB will parse. sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: @test sl@0: */ sl@0: #ifndef RTESTWRAPPER_H sl@0: #define RTESTWRAPPER_H sl@0: #include sl@0: sl@0: class RTestWrapper : public RTest sl@0: { sl@0: public: sl@0: IMPORT_C RTestWrapper(const TDesC &aTitle,TInt aThrowaway,const TText* anOtherThrowaway); sl@0: IMPORT_C void operator()(TInt aResult,TInt aLineNum,const TText* aFileName); sl@0: sl@0: IMPORT_C void Title(const TDesC &aFileName); sl@0: IMPORT_C void Start(const TDesC &aHeading); sl@0: IMPORT_C void Next(const TDesC &aHeading); sl@0: IMPORT_C void End(); sl@0: sl@0: private: sl@0: /// Test group nest level. Incremented by Start, decremented by End sl@0: TUint iNestLevel; sl@0: sl@0: /// Incremented whenever Start or Next is called sl@0: TUint iTestCount; sl@0: sl@0: /// Set if current test fails, and iFailedCount incremented. sl@0: /// Cleared whenever Start or Next is Called. sl@0: TBool iThisTestFailed; sl@0: sl@0: /// Count of failed tests sl@0: TUint iFailedCount; sl@0: sl@0: TBuf<0x40> iTitle; sl@0: }; sl@0: sl@0: sl@0: // End of file sl@0: #endif