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 is a helper for TestFramework Unit Test classes. sl@0: // It subclasses the abstract CTestSuite to produce a working class we can test 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: #include "TestStepVirtualStub.h" sl@0: #include "TestSuiteVirtualStub.h" sl@0: sl@0: sl@0: // do not export if Unit Testing sl@0: #if defined (__TSU_TESTFRAMEWORK__) sl@0: #undef EXPORT_C sl@0: #define EXPORT_C sl@0: sl@0: // define only if not Unit Testing sl@0: #else sl@0: sl@0: sl@0: // Create an instance of this test suite. sl@0: // NewTestSuiteVirtualStubL is exported at ordinal 1. sl@0: // This provides the interface to allow the Test Framework sl@0: // to create instances of this test suite. sl@0: EXPORT_C CTestSuiteVirtualStub* NewTestSuiteVirtualStubL() sl@0: { sl@0: CTestSuiteVirtualStub* result = new (ELeave) CTestSuiteVirtualStub; sl@0: CleanupStack::PushL(result); sl@0: result->ConstructL(); sl@0: CleanupStack::Pop(); // result sl@0: return result; sl@0: } sl@0: #endif sl@0: sl@0: // destructor sl@0: CTestSuiteVirtualStub::~CTestSuiteVirtualStub() sl@0: { sl@0: } sl@0: sl@0: _LIT(KTxtVersion,"CTestSuiteVirtualStub Version"); sl@0: sl@0: // Get test suite version. sl@0: TPtrC CTestSuiteVirtualStub::GetVersion() const sl@0: { sl@0: return KTxtVersion(); sl@0: } sl@0: sl@0: // Initialiser for test suite. sl@0: // This creates all the test steps and stores them sl@0: // inside CTestSuiteVirtualStub sl@0: void CTestSuiteVirtualStub::InitialiseL() sl@0: { sl@0: sl@0: // store the name of this test suite sl@0: iSuiteName = KTestSuiteVirtualStub; sl@0: sl@0: // add test steps sl@0: AddTestStepL(RTestStepVirtualStub::NewL()); sl@0: sl@0: }