void CWatcherActiveStep::CheckResults() { switch (iTestState) { case EStateStartup: // Startup, test initial notify. { iWatcherStep.CheckMediaChangeL(1, KDriveE, MDriveObserver::EMediaInserted, _L("Expect EMediaInserted at creation time")); RunNextTest(EStateTestNotify); break; } case EStateTestNotify: // test notify. { iWatcherStep.CheckMediaChangeL(2, KDriveE, MDriveObserver::EMediaInserted, _L("Expect EMediaInserted")); RunNextTest(EStateTestNotify2); break; } case EStateTestNotify2: // test notify. { iWatcherStep.CheckMediaChangeL(3, KDriveE, MDriveObserver::EMediaInserted, _L("Expect EMediaInserted")); RunNextTest(EStateFinish); break; } } }
TInt CWatcherActiveStep::RunError(TInt aError) { if (aError==KErrGeneral) { RunNextTest(EStateFinish); return KErrNone; } else { SetTestFailure(aError); return KErrNone; } }
void TestRunner::TestDone() { std::cerr << "Done executing test " << tests[m_current_test]->TestName() << std::endl; m_current_test += 1; RunNextTest(); }
void TestRunner::Run() { SetupEnv(); RunNextTest(); }