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: // TSU_MMF_SwCodecDevicesSuite.cpp sl@0: // This main DLL entry point for the TSU_MMF_SWCODECDEVICES.dll sl@0: // sl@0: // sl@0: sl@0: // EPOC includes sl@0: #include sl@0: sl@0: // Test system includes sl@0: #include "TSU_MMF_DeviceSuite.h" sl@0: #include "TSU_MMF_SWCODECDEVICES.h" sl@0: #include "tsu_mmf_CodecTests.h" sl@0: #include "TSU_MMF_SignConversionCodecs.h" sl@0: #include "TSU_MMF_Loop.h" sl@0: #include "TSU_MMF_Oom.h" sl@0: //[ actual codec includes ] sl@0: #include "MmfPcm16toAlawhwDevice.h" sl@0: #include "MmfALawToPcm16HwDevice.h" sl@0: #include "GSM610.H" sl@0: #include "MmfImaAdpcmtopcm16hwdevice.h" sl@0: #include "MmfMuLawToPcm16hwDevice.h" sl@0: #include "mmfpcm16SwapEndianhwdevice.h" sl@0: #include "mmfpcm16ToImaAdpcm.h" sl@0: #include "mmfpcm16toMulawhwdevice.h" sl@0: #include "mmfpcm16topcmU16BEHwDevice.h" sl@0: #include "MMFpcm16ToPcmU8HwDevice.h" sl@0: #include "MMFpcm16ToPcmU8HwDevice.h" sl@0: #include "mmfpcmS16PcmS8HwDevice.h" sl@0: #include "mmfpcmS16topcmU16Codec.h" sl@0: #include "mmfpcmS8ToPcmS16HwDevice.h" sl@0: #include "mmfpcmU16BeToPcmS16HwDevice.h" sl@0: #include "mmfpcmU16TopcmS16HwDevice.h" sl@0: #include "MMFpcmU8ToPcm16HwDevice.h" sl@0: sl@0: sl@0: /** sl@0: * NewTestSuite is exported at ordinal 1 sl@0: * this provides the interface to allow schedule test sl@0: * to create instances of this test suite sl@0: */ sl@0: EXPORT_C CTestSuite_MMF_SwCodecDevices* NewTestSuiteL() sl@0: { sl@0: CTestSuite_MMF_SwCodecDevices* result = new (ELeave) CTestSuite_MMF_SwCodecDevices; sl@0: CleanupStack::PushL(result); sl@0: result->ConstructL(); sl@0: CleanupStack::Pop(1, result); // result sl@0: return result; sl@0: } sl@0: sl@0: //destructor sl@0: CTestSuite_MMF_SwCodecDevices::~CTestSuite_MMF_SwCodecDevices() sl@0: { sl@0: } sl@0: sl@0: //Get Test Suite version sl@0: _LIT(KTxtVersion,"0.1"); sl@0: TPtrC CTestSuite_MMF_SwCodecDevices::GetVersion( void ) sl@0: { sl@0: return KTxtVersion(); sl@0: } sl@0: sl@0: /** sl@0: * sl@0: * Add a test step into the suite sl@0: * @param "CTestStep_MMF_SwCodecDevices* aPtrTestStep" sl@0: * Test step pointer sl@0: */ sl@0: void CTestSuite_MMF_SwCodecDevices::AddTestStepL( CTestStep_MMF_SwCodecDevices* aPtrTestStep ) sl@0: { sl@0: // test steps contain a pointer back to the suite which owns them sl@0: aPtrTestStep->SetSuite(this); sl@0: // add the step using tyhe base class method sl@0: CTestSuite::AddTestStepL(aPtrTestStep); sl@0: } sl@0: sl@0: /** sl@0: * Constructor for test suite sl@0: * this creates all the test steps and sl@0: * stores them inside CTestSuite_MMF_SWCODECDEVICES sl@0: */ sl@0: void CTestSuite_MMF_SwCodecDevices::InitialiseL( void ) sl@0: { sl@0: // store the name of this test suite sl@0: InitSystemPath(); sl@0: iSuiteName = _L("TSU_MMF_SWCODECDEVICES"); sl@0: sl@0: AddTestStepL( new(ELeave) CTest_MMF_SwCodecDevices_U_0001() ); sl@0: AddTestStepL( new(ELeave) CTest_MMF_SwCodecDevices_U_0002() ); sl@0: AddTestStepL( new(ELeave) CTest_MMF_SwCodecDevices_U_0003() ); sl@0: AddTestStepL( new(ELeave) CTestALawCodec_U_0004()); sl@0: AddTestStepL( new(ELeave) CTestMuLawCodec_U_0006()); sl@0: sl@0: AddTestStepL( new(ELeave) CTestStepCodecUnitTest(0)); sl@0: AddTestStepL( new(ELeave) CTestStepCodecUnitTest(1) ); sl@0: AddTestStepL( new(ELeave) CTestStepCodecUnitTest,0,0,1>(2)); sl@0: AddTestStepL( new(ELeave) CTestStepCodecUnitTest(3)); sl@0: AddTestStepL( new(ELeave) CTestStepCodecUnitTest,0,0,1>(4)); sl@0: AddTestStepL( new(ELeave) CTestStepCodecUnitTest(5)); sl@0: sl@0: AddTestStepL( new(ELeave) CTestStepSignConversionTest()); sl@0: AddTestStepL( new(ELeave) CTestStepSignConversionTest()); sl@0: AddTestStepL( new(ELeave) CTestStepSignConversionTest()); sl@0: AddTestStepL( new(ELeave) CTestStepSignConversionTest()); sl@0: AddTestStepL( new(ELeave) CTestStepSignConversionTest()); sl@0: sl@0: AddTestStepL( new(ELeave) CTestIMaadCodec()); sl@0: sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(0)); sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(1)); sl@0: AddTestStepL( new(ELeave) CTestStepGsm610ToPcm16OomTest(2)); sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(3)); sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(4)); sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(5)); sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(6)); sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(7)); sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(8)); sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(9)); sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(10)); sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(11)); sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(12)); sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(13)); sl@0: AddTestStepL( new(ELeave) CTestStepOomTest(14)); sl@0: AddTestStepL( new(ELeave) CTestStepPcm16ToGsm610OomTest(15)); sl@0: sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(0)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(1)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(2)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(3)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(4)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(5)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(6)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(7)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(8)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(9)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(10)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(11)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(12)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(13)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(14)); sl@0: AddTestStepL( new(ELeave) CTestStepLoopTest(15)); sl@0: sl@0: } sl@0: sl@0: /** sl@0: * sl@0: * InitSystemPath sl@0: * This sets up the default path sl@0: * sl@0: */ sl@0: void CTestSuite_MMF_SwCodecDevices::InitSystemPath() sl@0: { sl@0: _LIT(KAudioStremOutSourcePathOnC,"c:\\mm\\mmf\\testfiles\\SwCodecDevices\\"); sl@0: sl@0: RFs fs; sl@0: TUint att; sl@0: TInt ret = fs.Connect(); sl@0: __ASSERT_ALWAYS(ret == KErrNone,User::Panic(_L("Sys path not setup"),ret)); sl@0: sl@0: if (fs.Att(KAudioStremOutSourcePathOnC, att) == KErrNone) sl@0: iDefaultPath = KAudioStremOutSourcePathOnC; sl@0: else sl@0: User::Panic(_L("Test files not found"),KErrNotFound); sl@0: sl@0: fs.Close(); sl@0: } sl@0: sl@0: const TDesC& CTestSuite_MMF_SwCodecDevices::DefaultPath() const sl@0: { sl@0: return iDefaultPath; sl@0: }