stif/TestCombiner/src/TestCase.cpp
branchRCL_3
changeset 16 8f8df8006c40
parent 0 a03f92240627
child 18 3406c99bc375
equal deleted inserted replaced
14:a9c038d69df8 16:8f8df8006c40
   334 */
   334 */
   335 
   335 
   336 CTCTestCase::CTCTestCase( CTestCombiner* testCombiner,
   336 CTCTestCase::CTCTestCase( CTestCombiner* testCombiner,
   337                           TInt aExpectedResult,
   337                           TInt aExpectedResult,
   338                           TFullTestResult::TCaseExecutionResult aCategory,
   338                           TFullTestResult::TCaseExecutionResult aCategory,
       
   339                           const TDesC& aTestCaseArguments,
   339                           CTCTestModule* aModule ): //--PYTHON
   340                           CTCTestModule* aModule ): //--PYTHON
   340     CTestCase( testCombiner, aExpectedResult, aCategory, ECaseLocal, aModule ), //--PYTHON
   341     CTestCase( testCombiner, aExpectedResult, aCategory, ECaseLocal, aModule ), //--PYTHON
   341     iResultPckg( iResult )
   342     iResultPckg( iResult )
   342     {
   343     {
   343     }
   344     }
   363     
   364     
   364 -------------------------------------------------------------------------------
   365 -------------------------------------------------------------------------------
   365 */
   366 */
   366 
   367 
   367 void CTCTestCase::ConstructL( TDesC& aModuleName,
   368 void CTCTestCase::ConstructL( TDesC& aModuleName,
   368                               TDesC& aTestId )
   369                               TDesC& aTestId,
       
   370                               const TDesC& aTestCaseArguments )
   369     {
   371     {
   370     __ASSERT_ALWAYS( aModuleName.Length() < KMaxFileName, User::Leave( KErrArgument ) );
   372     __ASSERT_ALWAYS( aModuleName.Length() < KMaxFileName, User::Leave( KErrArgument ) );
   371     CTestCase::ConstructL( aTestId );
   373     CTestCase::ConstructL( aTestId );
   372     iModuleName = aModuleName.AllocL();
   374     iModuleName = aModuleName.AllocL();
   373     
   375     iTestCaseArguments = aTestCaseArguments.AllocL();
   374     }
   376     }
   375 
   377 
   376 /*
   378 /*
   377 -------------------------------------------------------------------------------
   379 -------------------------------------------------------------------------------
   378 
   380 
   395 
   397 
   396 CTCTestCase* CTCTestCase::NewL( CTestCombiner* testCombiner,
   398 CTCTestCase* CTCTestCase::NewL( CTestCombiner* testCombiner,
   397                                 TDesC& aModuleName,
   399                                 TDesC& aModuleName,
   398                                 TDesC& aTestId,
   400                                 TDesC& aTestId,
   399                                 TInt aExpectedResult,
   401                                 TInt aExpectedResult,
   400                                 TFullTestResult::TCaseExecutionResult
   402                                 TFullTestResult::TCaseExecutionResult aCategory,
   401                                     aCategory,
   403                                 const TDesC& aTestCaseArguments,
   402                                 CTCTestModule* aModule ) //--PYTHON
   404                                 CTCTestModule* aModule ) //--PYTHON
   403     {
   405     {
   404     CTCTestCase* self = new (ELeave) CTCTestCase( testCombiner,
   406     CTCTestCase* self = new (ELeave) CTCTestCase( testCombiner,
   405                                                    aExpectedResult,
   407                                                    aExpectedResult,
   406                                                    aCategory,
   408                                                    aCategory,
       
   409                                                    aTestCaseArguments,
   407                                                    aModule ); //--PYTHON
   410                                                    aModule ); //--PYTHON
   408      
   411      
   409     CleanupStack::PushL( self );
   412     CleanupStack::PushL( self );
   410     self->ConstructL( aModuleName, aTestId );
   413     self->ConstructL( aModuleName, aTestId, aTestCaseArguments );
   411     CleanupStack::Pop();
   414     CleanupStack::Pop();
   412     return self;
   415     return self;
   413      
   416      
   414     }
   417     }
   415 
   418 
   473     iEventArray.ResetAndDestroy();
   476     iEventArray.ResetAndDestroy();
   474     iEventArray.Close();
   477     iEventArray.Close();
   475     
   478     
   476     delete iProgress;
   479     delete iProgress;
   477     delete iModuleName;
   480     delete iModuleName;
       
   481     delete iTestCaseArguments;
   478     
   482     
   479     delete iCommand;
   483     delete iCommand;
       
   484     }
       
   485 
       
   486 /*
       
   487 -------------------------------------------------------------------------------
       
   488 
       
   489      Class: CTCTestCase
       
   490 
       
   491      Method: TestCaseArguments
       
   492 
       
   493      Description: Get test case arguments
       
   494 
       
   495      Parameters: None.
       
   496 
       
   497      Return Values: Test case arguments.
       
   498 
       
   499      Errors/Exceptions: None.
       
   500 
       
   501      Status: Proposal
       
   502     
       
   503 -------------------------------------------------------------------------------
       
   504 */
       
   505 const TDesC& CTCTestCase::TestCaseArguments() const 
       
   506     {
       
   507     if ( iTestCaseArguments !=NULL ) 
       
   508         {
       
   509         return *iTestCaseArguments; 
       
   510         }
       
   511     return KNullDesC;
   480     }
   512     }
   481 
   513 
   482 /*
   514 /*
   483 -------------------------------------------------------------------------------
   515 -------------------------------------------------------------------------------
   484 
   516