testexecfw/symbianunittestfw/sutfw/sutfwcore/sutfwframework/src/symbianunittestresult.cpp
--- a/testexecfw/symbianunittestfw/sutfw/sutfwcore/sutfwframework/src/symbianunittestresult.cpp Mon Mar 08 15:03:44 2010 +0800
+++ b/testexecfw/symbianunittestfw/sutfw/sutfwcore/sutfwframework/src/symbianunittestresult.cpp Mon Mar 29 14:46:27 2010 +0800
@@ -19,6 +19,7 @@
#include "symbianunittestfailure.h"
#include "sutlogger.h"
+
_LIT8( KSymbianUnitTestLeaveCodeMessageFormat, "Leave code: %d" );
_LIT8( KSymbianUnitTestMemoryLeakPhrase, "Leaked %d bytes of memory" );
_LIT8( KSymbianUnitTestPanicPhrase, "Panic: " );
@@ -72,6 +73,7 @@
void CSymbianUnitTestResult::ConstructL()
{
iCurrentTestName = KNullDesC().AllocL();
+ iTestCaseNames = new (ELeave)CDesCArrayFlat(10);
}
// -----------------------------------------------------------------------------
@@ -81,6 +83,7 @@
CSymbianUnitTestResult::~CSymbianUnitTestResult()
{
delete iCurrentTestName;
+ delete iTestCaseNames;
iFailures.ResetAndDestroy();
}
@@ -141,7 +144,11 @@
SUT_LOG_FORMAT2(_L("EndCase Result[%S] Time[%d]ms"),
iCurrentResult?&KSymbianUnitTestPass:&KSymbianUnitTestFail,
microSeconds.Int64()/1000);
- //SUT_LOG_FORMAT2(_L("EndCase Result[%S] Time[%d]ms"), &KSymbianUnitTestPass, microSeconds.Int64()/1000);
+ if (iCurrentResult)
+ {
+ //only add passed case to the testcasenames
+ iTestCaseNames->AppendL(*iCurrentTestName);
+ }
}
@@ -317,3 +324,12 @@
iFailures.AppendL( failure );
CleanupStack::Pop( failure );
}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+const CDesCArray& CSymbianUnitTestResult::TestCaseNames() const
+ {
+ return *iTestCaseNames;
+ }