stif/TestCombiner/src/TestCase.cpp
changeset 26 4fde310f06fe
parent 0 a03f92240627
child 30 86a2e675b80a
--- a/stif/TestCombiner/src/TestCase.cpp	Tue May 25 18:01:01 2010 +0300
+++ b/stif/TestCombiner/src/TestCase.cpp	Mon Jun 14 11:37:33 2010 +0300
@@ -336,6 +336,7 @@
 CTCTestCase::CTCTestCase( CTestCombiner* testCombiner,
                           TInt aExpectedResult,
                           TFullTestResult::TCaseExecutionResult aCategory,
+                          const TDesC& aTestCaseArguments,
                           CTCTestModule* aModule ): //--PYTHON
     CTestCase( testCombiner, aExpectedResult, aCategory, ECaseLocal, aModule ), //--PYTHON
     iResultPckg( iResult )
@@ -365,12 +366,13 @@
 */
 
 void CTCTestCase::ConstructL( TDesC& aModuleName,
-                              TDesC& aTestId )
+                              TDesC& aTestId,
+                              const TDesC& aTestCaseArguments )
     {
     __ASSERT_ALWAYS( aModuleName.Length() < KMaxFileName, User::Leave( KErrArgument ) );
     CTestCase::ConstructL( aTestId );
     iModuleName = aModuleName.AllocL();
-    
+    iTestCaseArguments = aTestCaseArguments.AllocL();
     }
 
 /*
@@ -397,17 +399,18 @@
                                 TDesC& aModuleName,
                                 TDesC& aTestId,
                                 TInt aExpectedResult,
-                                TFullTestResult::TCaseExecutionResult
-                                    aCategory,
+                                TFullTestResult::TCaseExecutionResult aCategory,
+                                const TDesC& aTestCaseArguments,
                                 CTCTestModule* aModule ) //--PYTHON
     {
     CTCTestCase* self = new (ELeave) CTCTestCase( testCombiner,
                                                    aExpectedResult,
                                                    aCategory,
+                                                   aTestCaseArguments,
                                                    aModule ); //--PYTHON
      
     CleanupStack::PushL( self );
-    self->ConstructL( aModuleName, aTestId );
+    self->ConstructL( aModuleName, aTestId, aTestCaseArguments );
     CleanupStack::Pop();
     return self;
      
@@ -475,6 +478,7 @@
     
     delete iProgress;
     delete iModuleName;
+    delete iTestCaseArguments;
     
     delete iCommand;
     }
@@ -484,6 +488,34 @@
 
      Class: CTCTestCase
 
+     Method: TestCaseArguments
+
+     Description: Get test case arguments
+
+     Parameters: None.
+
+     Return Values: Test case arguments.
+
+     Errors/Exceptions: None.
+
+     Status: Proposal
+    
+-------------------------------------------------------------------------------
+*/
+const TDesC& CTCTestCase::TestCaseArguments() const 
+    {
+    if ( iTestCaseArguments !=NULL ) 
+        {
+        return *iTestCaseArguments; 
+        }
+    return KNullDesC;
+    }
+
+/*
+-------------------------------------------------------------------------------
+
+     Class: CTCTestCase
+
      Method: DoCancel
 
      Description: Derived from CActive, handles the Cancel.