TVerdict CContactViewTest::doTestStepPostambleL() { iSemaphore.Close(); EndRecoverL(); EndCompressL(); return CCntBaseStep::doTestStepPostambleL(); }
TVerdict CPerformanceFunctionalityBase::doTestStepPostambleL() { _LIT(KPostamblePrint,"I am in Base doTestStepPostambleL()"); INFO_PRINTF1(KPostamblePrint); EndCompressL(); EndRecoverL(); Cleanup(); delete iViewAll; delete iIterate; WaitForServerToExitL();//waits for server to close to allow for any memory leaks to be detected if( !iConcurrent && !iUnclean ) { TRAPD(err, CContactDatabase::DeleteDefaultFileL() ); if( err != KErrInUse && err!= KErrNotFound ) { User::LeaveIfError( err ); } } return TestStepResult(); }
/** Test wrapper for performing all comapct and recover tests start recover/compress perfrom database operations, expecting recover/compress errors end recover compress perform database operations again, expecting no errors */ void CCompactAndRecoverStep::TestWrapperL( void (CCompactAndRecoverStep::*aOperations)(const TInt ), const TInt aErr, const TInt aErr2, const TInt aErr3, const TInt aErr4 ) { if(iCompleteSteps) { INFO_PRINTF1(KCompleteSteps); } else { INFO_PRINTF1(KCancelSteps); } //start compress/recover if( iRecoverFlag ) { StartRecoverL(); } else { StartCompressL(); } //perfrom database operations #ifdef _DEBUG (this->*aOperations)( iRecoverFlag ? aErr : aErr2 ); (void)aErr3; (void)aErr4; #else (this->*aOperations)( iRecoverFlag? aErr3 : aErr4 ); (void)aErr; (void)aErr2; #endif //end recover / compress if( iRecoverFlag ) { EndRecoverL(); } else { EndCompressL(); } CContactDatabase *temp = iContactsDatabase2; iContactsDatabase2 = iContactsDatabase; iContactsDatabase = temp; //perfrom database operations expecting no errors (this->*aOperations)( KErrNone ); temp = iContactsDatabase2; iContactsDatabase2 = iContactsDatabase; iContactsDatabase = temp; }