testexecfw/symbianunittestfw/sutfw/sutfwui/sutfwconsoleui/inc/symbianunittestconsoleui.h
changeset 0 3e07fef1e154
child 1 bbd31066657e
equal deleted inserted replaced
-1:000000000000 0:3e07fef1e154
       
     1 /*
       
     2 * Copyright (c) 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 "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 *
       
    16 */
       
    17 
       
    18 #ifndef SYMBIANUNITTESTCONSOLEUIMAIN_H
       
    19 #define SYMBIANUNITTESTCONSOLEUIMAIN_H
       
    20 
       
    21 // INCLUDES
       
    22 #include "symbianunittestuicallback.h"
       
    23 #include <e32cons.h>
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CSymbianUnitTestRunner;
       
    28 class CSymbianUnitTestCommandLineParser;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 class CSymbianUnitTestConsoleUi : 
       
    32     public CActive, 
       
    33     public MSymbianUnitTestUiCallBack
       
    34     {
       
    35     public: // Constructors and destructor
       
    36     
       
    37         static CSymbianUnitTestConsoleUi* NewLC( CConsoleBase& aConsole );
       
    38         static CSymbianUnitTestConsoleUi* NewL( CConsoleBase& aConsole );
       
    39         ~CSymbianUnitTestConsoleUi();
       
    40     
       
    41     public: // From CActive
       
    42         
       
    43         void RunL();
       
    44         void DoCancel();
       
    45     
       
    46     public: // From MSymbianUnitTestUiCallBack
       
    47         
       
    48         void InfoMsg( const TDesC& aMessage );
       
    49         void InfoMsg( const TDesC& aFormat, const TDesC& aMessage );
       
    50         void IncrementExecutedTestsCount();
       
    51     
       
    52     private: // Constructors
       
    53     
       
    54         CSymbianUnitTestConsoleUi( CConsoleBase& aConsole );
       
    55         void ConstructL();
       
    56         
       
    57     private: // New functions
       
    58     
       
    59         void PrintAllocFailureSimulationText();
       
    60         
       
    61     private: // Data
       
    62     
       
    63         CConsoleBase& iConsole;
       
    64         CSymbianUnitTestCommandLineParser* iCommandLineParser;
       
    65         CSymbianUnitTestRunner* iTestRunner;
       
    66         TInt iExecutedTestCount;
       
    67     };
       
    68 
       
    69 // Local functions:
       
    70 LOCAL_C void MainL();
       
    71 
       
    72 #endif // SYMBIANUNITTESTCONSOLEUIMAIN_H