sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // This file contains the test steps for Unit Test Suite 00 : TestFrameworkMain.cpp sl@0: // sl@0: // sl@0: sl@0: // EPOC includes sl@0: #include sl@0: sl@0: // Test system includes sl@0: #include sl@0: sl@0: // Specific includes for this test suite sl@0: #include "TestFrameworkMain.h" sl@0: #include "TSU_MmTsthSuite00.h" sl@0: sl@0: // Specific includes for these test steps sl@0: #include "TSU_MmTsth00.h" sl@0: sl@0: // -------------------------------------------- sl@0: sl@0: // Unit Test Suite 00 : TestFrameworkMain.cpp sl@0: // Depends on : none sl@0: sl@0: // Tests :- sl@0: // 1 Construct a CTestFrameworkMain sl@0: sl@0: // (Other tests are specific to member classes!) sl@0: sl@0: // --------------------- sl@0: // RTestMmTsthU0001 sl@0: sl@0: RTestMmTsthU0001* RTestMmTsthU0001::NewL() sl@0: { sl@0: RTestMmTsthU0001* self = new(ELeave) RTestMmTsthU0001; sl@0: return self; sl@0: } sl@0: sl@0: // Each test step initialises its own name. sl@0: RTestMmTsthU0001::RTestMmTsthU0001() sl@0: { sl@0: iTestStepName = _L("MM-TSTH-U-0001"); sl@0: } sl@0: sl@0: // preamble sl@0: TVerdict RTestMmTsthU0001::OpenL() sl@0: { sl@0: return iTestStepResult = EPass; sl@0: } sl@0: sl@0: // postamble sl@0: void RTestMmTsthU0001::Close() sl@0: { sl@0: } sl@0: sl@0: // Do the test step. sl@0: TVerdict RTestMmTsthU0001::DoTestStepL() sl@0: { sl@0: TVerdict currentVerdict = EPass; sl@0: sl@0: INFO_PRINTF1(_L("Unit test for TestFrameworkMain")); sl@0: sl@0: CTestFrameworkMain* theTest = CTestFrameworkMain::NewLC(); sl@0: sl@0: // NB we can't run a second instance of CTestFrameworkMain (i.e. call StartTestingL()) sl@0: // without causing the old one to close at cleanup, stopping all tests. sl@0: // Therefore our useful testing is limited to ensuring a CTestFrameworkMain sl@0: // constructs correctly sl@0: sl@0: // check a log has been constructed. if it is not NULL, we've passed sl@0: CLog* theLog = theTest->LogClient(); sl@0: if(theLog != NULL) sl@0: INFO_PRINTF1(_L("CTestFramework constructed correctly")); sl@0: sl@0: CleanupStack::PopAndDestroy(theTest); sl@0: sl@0: // we pass if we haven't left sl@0: return iTestStepResult = currentVerdict; // should be EPass if we've got here sl@0: sl@0: } sl@0: sl@0: