symbianunittestfw/sutfw/sutfwui/sutfwconsoleui/inc/symbianunittestcommandlineparser.h
branchRCL_3
changeset 3 9397a16b6eb8
parent 1 6edeef394eb7
equal deleted inserted replaced
1:6edeef394eb7 3:9397a16b6eb8
     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 SYMBIANUNITTESTCOMMANDLINEPARSER_H
       
    19 #define SYMBIANUNITTESTCOMMANDLINEPARSER_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <symbianunittestmacros.h>
       
    23 #include <e32base.h>
       
    24 #include <badesca.h>
       
    25 #include <bacline.h>
       
    26 
       
    27 // CLASS DECLARATION
       
    28 class CSymbianUnitTestCommandLineParser : public CBase
       
    29     {
       
    30     public: // Constructors and destructor
       
    31     
       
    32         static CSymbianUnitTestCommandLineParser* NewLC();
       
    33         static CSymbianUnitTestCommandLineParser* NewL();
       
    34         ~CSymbianUnitTestCommandLineParser();
       
    35     
       
    36     public: // New functions
       
    37         
       
    38         TBool ShowHelp() const;
       
    39         const MDesCArray& TestDllNames() const;
       
    40         const CDesCArray& TestCaseNames() const;
       
    41         TBool MemoryAllocationFailureSimulation() const;
       
    42         TBool Background() const;
       
    43         const TDesC& OutputFileName() const;
       
    44         const TDesC& OutputFormat() const;
       
    45         TInt  Timeout() const;
       
    46         TBool PromptUser() const;
       
    47         
       
    48     private: // Constructors
       
    49     
       
    50         void ConstructL();
       
    51         CSymbianUnitTestCommandLineParser();
       
    52         
       
    53     private: // New functions
       
    54         
       
    55         void SetOutputFormatL();
       
    56         void SetTimeoutL();
       
    57         void SetTestDllNamesL();
       
    58         void SetTestCaseNamesL();
       
    59         TBool FindArgument( 
       
    60             const TDesC& aKey,
       
    61             const TDesC& aShortKey,
       
    62             TPtrC& aValue );
       
    63         
       
    64     private: // Data
       
    65         
       
    66         CCommandLineArguments* iArguments;
       
    67         TBool iShowHelp;
       
    68         CDesCArray* iTestDllNames;
       
    69         CDesCArray* iTestCaseNames;
       
    70         TBool iAllocFailureSimulation;
       
    71         HBufC* iOutputFormat;
       
    72         TBool iNoPrompt;
       
    73         TBool iBackground;
       
    74 	TInt iTimeout;
       
    75         
       
    76     private: // Test
       
    77         
       
    78         SYMBIAN_UNIT_TEST_CLASS( UT_CSymbianUnitTestCommandLineParser )       
       
    79     };
       
    80 
       
    81 #endif // SYMBIANUNITTESTCOMMANDLINEPARSER_H