cryptomgmtlibs/securitytestfw/inc/rtestwrapper.h
changeset 8 35751d3474b7
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
       
     1 /*
       
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * Wrapper for RTest which logs to a file, counts failures (without panicing) and
       
    16 * generates a final result line the ONB will parse.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 /**
       
    24  @file
       
    25  @internalTechnology
       
    26  @test
       
    27 */
       
    28 #ifndef RTESTWRAPPER_H
       
    29 #define RTESTWRAPPER_H
       
    30 #include <e32test.h>
       
    31 
       
    32 class RTestWrapper : public RTest
       
    33 	{
       
    34 public:
       
    35 	IMPORT_C RTestWrapper(const TDesC &aTitle,TInt aThrowaway,const TText* anOtherThrowaway);
       
    36 	IMPORT_C void operator()(TInt aResult,TInt aLineNum,const TText* aFileName);
       
    37 
       
    38 	IMPORT_C void Title(const TDesC &aFileName);
       
    39 	IMPORT_C void Start(const TDesC &aHeading);
       
    40 	IMPORT_C void Next(const TDesC &aHeading);
       
    41 	IMPORT_C void End();
       
    42 
       
    43 private:
       
    44 	/// Test group nest level. Incremented by Start, decremented by End
       
    45 	TUint iNestLevel;
       
    46 
       
    47 	/// Incremented whenever Start or Next is called
       
    48 	TUint iTestCount;
       
    49 
       
    50 	/// Set if current test fails, and iFailedCount incremented.
       
    51 	/// Cleared whenever Start or Next is Called.
       
    52 	TBool iThisTestFailed;
       
    53 
       
    54 	/// Count of failed tests
       
    55 	TUint iFailedCount;
       
    56 
       
    57 	TBuf<0x40> iTitle;
       
    58 	};
       
    59 
       
    60 
       
    61 // End of file
       
    62 #endif