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: // sl@0: sl@0: // EPOC includes sl@0: #include sl@0: sl@0: // Test system includes sl@0: #include "TSU_MMF_ACOD.h" sl@0: #include "TSU_MMF_ACODSuite.h" sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: #ifdef __WINS__ sl@0: //wins directories sl@0: _LIT(KSourceFilesDir, "c:\\mm\\mmf\\testfiles\\acod\\"); sl@0: _LIT(KComparisonFilesDir, "c:\\mm\\mmf\\ref\\acod\\"); sl@0: #else sl@0: /* sl@0: arm4 directories sl@0: All source and comparison files need to be copied manually onto the flash card. sl@0: This code assumes the flash card is represented by drive E: on the target board. sl@0: If this is not the case, the KSourceFilesDir and KComparisonFilesDir strings sl@0: need to be changed accordingly. sl@0: */ sl@0: _LIT(KSourceFilesDir, "e:\\"); sl@0: _LIT(KComparisonFilesDir, "e:\\"); sl@0: #endif sl@0: sl@0: //8KHz source files sl@0: _LIT(KPCM16SourceFile,"PCM16Source.raw"); sl@0: _LIT(KPCM16BSourceFile,"PCM16BSource.raw"); sl@0: _LIT(KPCMU16SourceFile,"PCMU16Source.raw"); sl@0: _LIT(KPCMU16BSourceFile,"PCMU16BSource.raw"); sl@0: _LIT(KStereoPCM16SourceFile,"StereoPCM16Source.raw"); sl@0: _LIT(KPCM8SourceFile,"PCM8Source.raw"); sl@0: _LIT(KPCMU8SourceFile,"PCMU8Source.raw"); sl@0: _LIT(KAlawSourceFile,"AlawSource.raw"); sl@0: _LIT(KMulawSourceFile,"MulawSource.raw"); sl@0: _LIT(KAdpcmSourceFile,"AdpcmSource.raw"); sl@0: _LIT(KStereoAdpcmSourceFile,"StereoAdpcmSource.raw"); sl@0: _LIT(KGSM610SourceFile,"GSM610Source.raw"); sl@0: sl@0: //comparison files sl@0: _LIT(KAlawToPCM16ComparisonFile,"AlawToPCM16Comparison.raw"); sl@0: _LIT(KPCM16ToAlawComparisonFile,"PCM16ToAlawComparison.raw"); sl@0: _LIT(KPCM8ToPCM16ComparisonFile,"PCM8ToPCM16Comparison.raw"); sl@0: _LIT(KPCM16ToPCM8ComparisonFile,"PCM16ToPCM8Comparison.raw"); sl@0: _LIT(KPCM16ToPCM16BComparisonFile,"PCM16ToPCM16BComparison.raw"); sl@0: _LIT(KPCM16BToPCM16ComparisonFile,"PCM16BToPCM16Comparison.raw"); sl@0: _LIT(KPCMU16ToPCMU16BComparisonFile,"PCMU16ToPCMU16BComparison.raw"); sl@0: _LIT(KPCMU16BToPCMU16ComparisonFile,"PCMU16BToPCMU16Comparison.raw"); sl@0: _LIT(KPCM16ToPCMU16BComparisonFile,"PCM16ToPCMU16BComparison.raw"); sl@0: _LIT(KPCMU16BToPCM16ComparisonFile,"PCMU16BToPCM16Comparison.raw"); sl@0: _LIT(KPCM16ToPCMU16ComparisonFile,"PCM16ToPCMU16Comparison.raw"); sl@0: _LIT(KPCMU16ToPCM16ComparisonFile,"PCMU16ToPCM16Comparison.raw"); sl@0: _LIT(KPCM16ToPCMU8ComparisonFile,"PCM16ToPCMU8Comparison.raw"); sl@0: _LIT(KPCMU8ToPCM16ComparisonFile,"PCMU8ToPCM16Comparison.raw"); sl@0: _LIT(KAdpcmToPCM16ComparisonFile,"AdpcmToPCM16Comparison.raw"); sl@0: _LIT(KPCM16ToAdpcmComparisonFile,"PCM16ToAdpcmComparison.raw"); sl@0: _LIT(KMulawToPCM16ComparisonFile,"MulawToPCM16Comparison.raw"); sl@0: _LIT(KPCM16ToMulawComparisonFile,"PCM16ToMulawComparison.raw"); sl@0: _LIT(KStereoAdpcmToPCM16ComparisonFile,"StereoAdpcmToPCM16Comparison.raw"); sl@0: _LIT(KPCM16ToStereoAdpcmComparisonFile,"PCM16ToStereoAdpcmComparison.raw"); sl@0: _LIT(KGSM610ToPCM16ComparisonFile,"GSM610ToPCM16Comparison.raw"); sl@0: _LIT(KPCM16ToGSM610ComparisonFile,"PCM16ToGSM610Comparison.raw"); sl@0: sl@0: _LIT(KPreferredSupplierSourceFile,"AAAASource.raw"); sl@0: _LIT(KPreferredSupplierComparisonFile,"AAAABBBBPrefSuppComparison.raw"); sl@0: _LIT(KPreferredSupplier,"Preferred Supplier Test Codec 1"); sl@0: sl@0: sl@0: const TUint32 KMMFFourCCCodeAAAA = 0x41414141; //"AAAA" sl@0: const TUint32 KMMFFourCCCodeBBBB = 0x42424242; //"BBBB" sl@0: sl@0: CTestStep_MMF_ACOD::CTestStep_MMF_ACOD() sl@0: { sl@0: iExpectedLeaveErrorCode = KErrNone; sl@0: iSingleIteration = EFalse; sl@0: } sl@0: sl@0: CTestStep_MMF_ACOD::~CTestStep_MMF_ACOD() sl@0: { sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function gets the correct comparison filename for the codec specified. sl@0: * sl@0: * @param "TInt aCodecUID" sl@0: * Uid of codec. sl@0: * "TDes& aFilename" sl@0: * Descriptor to contain the comparison filename string. sl@0: */ sl@0: void CTestStep_MMF_ACOD::GetComparisonFilenameFromCodecUidL(TInt aCodecUID, TDes& aFilename) sl@0: { sl@0: switch(aCodecUID) sl@0: { sl@0: case KMmfUidCodecAlawToPCM16: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KAlawToPCM16ComparisonFile); sl@0: break; sl@0: case KMmfUidCodecPCM16ToAlaw: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToAlawComparisonFile); sl@0: break; sl@0: case KMmfUidCodecPCM8ToPCM16: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM8ToPCM16ComparisonFile); sl@0: break; sl@0: case KMmfUidCodecAudioS16ToPCMS8: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToPCM8ComparisonFile); sl@0: break; sl@0: //case KMMFUidCodecPCM16SwapEndian: sl@0: case KMMFUidCodecPCM16toPCM16B: sl@0: case KMMFUidCodecPCM16BtoPCM16: sl@0: case KMMFUidCodecPCMU16toPCMU16B: sl@0: case KMMFUidCodecPCMU16BtoPCMU16: sl@0: //This file is used for all swap endian tests other than instantiation. sl@0: //There is no need to test ProcessL for every swap endian combination. sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToPCM16BComparisonFile); sl@0: break; sl@0: case KMmfUidCodecAudioS16ToPCMU16BE: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToPCMU16BComparisonFile); sl@0: break; sl@0: case KMmfUidCodecAudioU16BEToPCMS16: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCMU16BToPCM16ComparisonFile); sl@0: break; sl@0: case KMmfUidCodecAudioS16ToPCMU16: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToPCMU16ComparisonFile); sl@0: break; sl@0: case KMmfUidCodecAudioU16ToPCMS16: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCMU16ToPCM16ComparisonFile); sl@0: break; sl@0: case KMmfUidCodecAudioS16ToPCMU8: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToPCMU8ComparisonFile); sl@0: break; sl@0: case KMmfUidCodecAudioU8ToPCMS16: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCMU8ToPCM16ComparisonFile); sl@0: break; sl@0: case KMmfUidCodecIMAADPCMToPCM16: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KAdpcmToPCM16ComparisonFile); sl@0: break; sl@0: case KMmfUidCodecPCM16ToIMAADPCM: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToAdpcmComparisonFile); sl@0: break; sl@0: case KMmfUidCodecMulawToPCM16: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KMulawToPCM16ComparisonFile); sl@0: break; sl@0: case KMmfUidCodecPCM16ToMulaw: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToMulawComparisonFile); sl@0: break; sl@0: case KMmfUidCodecIMAADPCMToPCM16Stereo: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KStereoAdpcmToPCM16ComparisonFile); sl@0: break; sl@0: case KMmfUidCodecPCM16ToIMAADPCMStereo: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToStereoAdpcmComparisonFile); sl@0: break; sl@0: case KMmfUidCodecGSM610ToPCM16: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KGSM610ToPCM16ComparisonFile); sl@0: break; sl@0: case KMmfUidCodecPCM16ToGSM610: sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToGSM610ComparisonFile); sl@0: break; sl@0: default: sl@0: User::Leave(KErrNotSupported); sl@0: break; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function gets the correct comparison filename for the fourCC codes specified. sl@0: * sl@0: * @param "const TFourCC& aSrcFourCC" sl@0: * Source fourCC code. sl@0: * "const TFourCC& aDstFourCC" sl@0: * Destination fourCC code. sl@0: * "TDes& aFilename" sl@0: * Descriptor to contain the comparison filename string. sl@0: */ sl@0: void CTestStep_MMF_ACOD::GetComparisonFilenameFromFourCCL(const TFourCC& aSrcFourCC, const TFourCC& aDstFourCC, TDes& aFilename) sl@0: { sl@0: if (aSrcFourCC == KMMFFourCCCodePCM16) sl@0: { sl@0: if (aDstFourCC == KMMFFourCCCodeALAW) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToAlawComparisonFile); sl@0: } sl@0: else if (aDstFourCC == KMMFFourCCCodePCM16B) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToPCM16BComparisonFile); sl@0: } sl@0: else if (aDstFourCC == KMMFFourCCCodePCM8) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToPCM8ComparisonFile); sl@0: } sl@0: else if (aDstFourCC == KMMFFourCCCodePCMU16B) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToPCMU16BComparisonFile); sl@0: } sl@0: else if (aDstFourCC == KMMFFourCCCodePCMU16) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToPCMU16ComparisonFile); sl@0: } sl@0: else if (aDstFourCC == KMMFFourCCCodePCMU8) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToPCMU8ComparisonFile); sl@0: } sl@0: else if (aDstFourCC == KMMFFourCCCodeIMAD) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToAdpcmComparisonFile); sl@0: } sl@0: else if (aDstFourCC == KMMFFourCCCodeMuLAW) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToMulawComparisonFile); sl@0: } sl@0: else if (aDstFourCC == KMMFFourCCCodeIMAS) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToStereoAdpcmComparisonFile); sl@0: } sl@0: else if (aDstFourCC == KMMFFourCCCodeGSM610) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16ToGSM610ComparisonFile); sl@0: } sl@0: } sl@0: else if (aDstFourCC == KMMFFourCCCodePCM16) sl@0: { sl@0: if (aSrcFourCC == KMMFFourCCCodeALAW) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KAlawToPCM16ComparisonFile); sl@0: } sl@0: if (aSrcFourCC == KMMFFourCCCodePCM8) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM8ToPCM16ComparisonFile); sl@0: } sl@0: if (aSrcFourCC == KMMFFourCCCodePCM16B) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCM16BToPCM16ComparisonFile); sl@0: } sl@0: if (aSrcFourCC == KMMFFourCCCodePCMU16B) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCMU16BToPCM16ComparisonFile); sl@0: } sl@0: if (aSrcFourCC == KMMFFourCCCodePCMU16) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCMU16ToPCM16ComparisonFile); sl@0: } sl@0: if (aSrcFourCC == KMMFFourCCCodePCMU8) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCMU8ToPCM16ComparisonFile); sl@0: } sl@0: if (aSrcFourCC == KMMFFourCCCodeIMAD) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KAdpcmToPCM16ComparisonFile); sl@0: } sl@0: if (aSrcFourCC == KMMFFourCCCodeMuLAW) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KMulawToPCM16ComparisonFile); sl@0: } sl@0: if (aSrcFourCC == KMMFFourCCCodeIMAS) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KStereoAdpcmToPCM16ComparisonFile); sl@0: } sl@0: if (aSrcFourCC == KMMFFourCCCodeGSM610) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KGSM610ToPCM16ComparisonFile); sl@0: } sl@0: } sl@0: else if ((aSrcFourCC == KMMFFourCCCodePCMU16) && sl@0: (aDstFourCC == KMMFFourCCCodePCMU16B)) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCMU16ToPCMU16BComparisonFile); sl@0: } sl@0: else if ((aSrcFourCC == KMMFFourCCCodePCMU16B) && sl@0: (aDstFourCC == KMMFFourCCCodePCMU16)) sl@0: { sl@0: aFilename.Copy(KComparisonFilesDir); sl@0: aFilename.Append(KPCMU16BToPCMU16ComparisonFile); sl@0: } sl@0: else sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function gets the correct source filename for the codec specified. sl@0: * sl@0: * @param "TInt aCodecUID" sl@0: * Uid of codec. sl@0: * "TDes& aFilename" sl@0: * Descriptor to contain the source filename string. sl@0: */ sl@0: void CTestStep_MMF_ACOD::GetSourceFilenameFromCodecUidL(TInt aCodecUID, TDes& aFilename) sl@0: { sl@0: switch(aCodecUID) sl@0: { sl@0: case KMmfUidCodecAlawToPCM16: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KAlawSourceFile); sl@0: break; sl@0: case KMmfUidCodecPCM16ToAlaw: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KPCM16SourceFile); sl@0: break; sl@0: case KMmfUidCodecPCM8ToPCM16: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KPCM8SourceFile); sl@0: break; sl@0: case KMmfUidCodecAudioS16ToPCMS8: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KPCM16SourceFile); sl@0: break; sl@0: //case KMMFUidCodecPCM16SwapEndian: sl@0: case KMMFUidCodecPCM16toPCM16B: sl@0: case KMMFUidCodecPCM16BtoPCM16: sl@0: case KMMFUidCodecPCMU16toPCMU16B: sl@0: case KMMFUidCodecPCMU16BtoPCMU16: sl@0: //this file is used for all swap endian tests other than instantiation. sl@0: //there is no need to test ProcessL for every swap endian combination. sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KPCM16SourceFile); sl@0: break; sl@0: case KMmfUidCodecAudioS16ToPCMU16BE: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KPCM16SourceFile); sl@0: break; sl@0: case KMmfUidCodecAudioU16BEToPCMS16: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KPCMU16BSourceFile); sl@0: break; sl@0: case KMmfUidCodecAudioS16ToPCMU16: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KPCM16SourceFile); sl@0: break; sl@0: case KMmfUidCodecAudioU16ToPCMS16: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KPCMU16SourceFile); sl@0: break; sl@0: case KMmfUidCodecAudioS16ToPCMU8: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KPCM16SourceFile); sl@0: break; sl@0: case KMmfUidCodecAudioU8ToPCMS16: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KPCMU8SourceFile); sl@0: break; sl@0: case KMmfUidCodecIMAADPCMToPCM16: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KAdpcmSourceFile); sl@0: break; sl@0: case KMmfUidCodecPCM16ToIMAADPCM: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KPCM16SourceFile); sl@0: break; sl@0: case KMmfUidCodecMulawToPCM16: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KMulawSourceFile); sl@0: break; sl@0: case KMmfUidCodecPCM16ToMulaw: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KPCM16SourceFile); sl@0: break; sl@0: case KMmfUidCodecIMAADPCMToPCM16Stereo: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KStereoAdpcmSourceFile); sl@0: break; sl@0: case KMmfUidCodecPCM16ToIMAADPCMStereo: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KStereoPCM16SourceFile); sl@0: break; sl@0: case KMmfUidCodecGSM610ToPCM16: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KGSM610SourceFile); sl@0: break; sl@0: case KMmfUidCodecPCM16ToGSM610: sl@0: aFilename.Copy(KSourceFilesDir); sl@0: aFilename.Append(KPCM16SourceFile); sl@0: break; sl@0: default: sl@0: User::Leave(KErrNotSupported); sl@0: break; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function gets the correct source filename for the fourCC codes specified. sl@0: * sl@0: * @param "const TFourCC& aSrcFourCC" sl@0: * Source fourCC code. sl@0: * "const TFourCC& aDstFourCC" sl@0: * Destination fourCC code. sl@0: * "TDes& aFilename" sl@0: * Descriptor to contain the source filename string. sl@0: */ sl@0: void CTestStep_MMF_ACOD::GetSourceFilenameFromFourCCL(const TFourCC& aSrcFourCC, const TFourCC& aDstFourCC, TDes& aFilename) sl@0: { sl@0: aFilename.Copy(KSourceFilesDir); sl@0: if (aSrcFourCC == KMMFFourCCCodePCM16) sl@0: { sl@0: if (aDstFourCC == KMMFFourCCCodeIMAS) sl@0: aFilename.Append(KStereoPCM16SourceFile); sl@0: else sl@0: aFilename.Append(KPCM16SourceFile); sl@0: } sl@0: else if (aSrcFourCC == KMMFFourCCCodeALAW) sl@0: aFilename.Append(KAlawSourceFile); sl@0: else if (aSrcFourCC == KMMFFourCCCodePCM8) sl@0: aFilename.Append(KPCM8SourceFile); sl@0: else if (aSrcFourCC == KMMFFourCCCodePCM16B) sl@0: aFilename.Append(KPCM16BSourceFile); sl@0: else if (aSrcFourCC == KMMFFourCCCodePCMU16B) sl@0: aFilename.Append(KPCMU16BSourceFile); sl@0: else if (aSrcFourCC == KMMFFourCCCodePCMU16) sl@0: aFilename.Append(KPCMU16SourceFile); sl@0: else if (aSrcFourCC == KMMFFourCCCodePCMU8) sl@0: aFilename.Append(KPCMU8SourceFile); sl@0: else if (aSrcFourCC == KMMFFourCCCodeIMAD) sl@0: aFilename.Append(KAdpcmSourceFile); sl@0: else if (aSrcFourCC == KMMFFourCCCodeMuLAW) sl@0: aFilename.Append(KMulawSourceFile); sl@0: else if (aSrcFourCC == KMMFFourCCCodeIMAS) sl@0: aFilename.Append(KStereoAdpcmSourceFile); sl@0: else if (aSrcFourCC == KMMFFourCCCodeGSM610) sl@0: aFilename.Append(KGSM610SourceFile); sl@0: else sl@0: User::Leave(KErrNotSupported); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function checks the data in iOutputDataBuffer against data in a comparison sl@0: * file. sl@0: * sl@0: * @param "const TDesC& aFilename" sl@0: * Full path of the comparison file to compare against. sl@0: * "TUint aPosition" sl@0: * File position from which to read the comparison data. sl@0: * @return "TBool" sl@0: * ETrue if the output is the same as the comparison data sl@0: * EFalse if the output is different to the comparison data sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::CheckOutputAgainstComparisonFileL(const TDesC& aFilename, TUint aPosition) sl@0: { sl@0: RFs fs; sl@0: User::LeaveIfError(fs.Connect()); sl@0: CleanupClosePushL(fs); sl@0: sl@0: RFile file; sl@0: User::LeaveIfError(file.Open(fs, aFilename, EFileRead|EFileShareAny)); sl@0: CleanupClosePushL(file); sl@0: sl@0: RFileReadStream fileReadStream(file, aPosition); sl@0: CleanupClosePushL(fileReadStream); sl@0: sl@0: //read data from comparison file into descriptor sl@0: HBufC8* compBuffer = HBufC8::NewL(iOutputDataBuffer->Length()); sl@0: CleanupStack::PushL(compBuffer); sl@0: TPtr8 compBufferPtr = compBuffer->Des(); sl@0: TRAPD(err, fileReadStream.ReadL(compBufferPtr, iOutputDataBuffer->Length())); sl@0: if ((err != KErrNone) && (err != KErrEof)) User::LeaveIfError(err); //EOF not an error ? sl@0: sl@0: //compare destination buffer with comparison descriptor sl@0: TInt result = iOutputDataBuffer->Compare(*compBuffer); sl@0: sl@0: if (result != 0) sl@0: INFO_PRINTF3(_L(">> iOutputDataBuffer size is %d, Comparison buffer size is %d"), iOutputDataBuffer->Length(), compBuffer->Length()); sl@0: sl@0: CleanupStack::PopAndDestroy(4); //compBuffer, fileReadStream, file, fs sl@0: sl@0: if (result == 0) sl@0: return ETrue; sl@0: else sl@0: return EFalse; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function checks the number of source bytes processed against sl@0: * iExpectedSrcBytesProcessed. sl@0: * sl@0: * @param "TUint aCount" sl@0: * Index in the iExpectedSrcBytesProcessed array to check the value against. sl@0: * @return "TBool" sl@0: * ETrue if the source bytes processed is as expected. sl@0: * EFalse if the source bytes processed is not as expected. sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::CheckSrcBytesProcessedL(TUint aCount) sl@0: { sl@0: if (iCodecProcessResult.iSrcBytesProcessed == iExpectedSrcBytesProcessed[aCount]) sl@0: return ETrue; sl@0: else if (STATIC_CAST(TUint, iFileDataLeft) < iExpectedSrcBytesProcessed[aCount]) sl@0: { sl@0: INFO_PRINTF4(_L(">> TCodecProcessResult::iSrcBytesProcessed is %d, Not enough source data available in file. iFileDataLeft for LOOP %d is %d"), iCodecProcessResult.iSrcBytesProcessed, aCount, iFileDataLeft); sl@0: if (iCodecProcessResult.iSrcBytesProcessed == STATIC_CAST(TUint, iFileDataLeft)) sl@0: return ETrue; sl@0: else sl@0: return EFalse; sl@0: } sl@0: else sl@0: { sl@0: INFO_PRINTF4(_L(">> TCodecProcessResult::iSrcBytesProcessed is %d, iExpectedSrcBytesProcessed for LOOP %d is %d"), iCodecProcessResult.iSrcBytesProcessed, aCount, iExpectedSrcBytesProcessed[aCount]); sl@0: return EFalse; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function checks the number of destination bytes added against sl@0: * iExpectedDstBytesAdded. sl@0: * sl@0: * @param "TUint aCount" sl@0: * Index of the iExpectedDstBytesAdded array to check the value against. sl@0: * @return "TBool" sl@0: * ETrue if the dest bytes added is as expected. sl@0: * EFalse if the dest bytes added is not as expected. sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::CheckDstBytesAddedL(TUint aCount) sl@0: { sl@0: if (iCodecProcessResult.iDstBytesAdded == iExpectedDstBytesAdded[aCount]) sl@0: return ETrue; sl@0: else if (STATIC_CAST(TUint, iFileDataLeft) < iExpectedSrcBytesProcessed[aCount]) sl@0: { sl@0: INFO_PRINTF4(_L(">> TCodecProcessResult::iDstBytesAdded is %d, Not enough source data available in file. iFileDataLeft for LOOP %d is %d"), iCodecProcessResult.iDstBytesAdded, aCount, iFileDataLeft); sl@0: return ETrue; sl@0: } sl@0: else sl@0: { sl@0: INFO_PRINTF4(_L(">> TCodecProcessResult::iDstBytesAdded is %d, iExpectedDstBytesAdded for LOOP %d is %d"), iCodecProcessResult.iDstBytesAdded, aCount, iExpectedDstBytesAdded[aCount]); sl@0: return EFalse; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function checks the length of iOutputDataBuffer against iTotalDstBytesAdded. sl@0: * sl@0: * @return "TBool" sl@0: * ETrue if the values are the same. sl@0: * EFalse if the values are different. sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL() sl@0: { sl@0: if (iOutputDataBuffer->Length() == STATIC_CAST(TInt, iTotalDstBytesAdded)) sl@0: return ETrue; sl@0: else sl@0: { sl@0: INFO_PRINTF3(_L(">> Output Data Buffer Length is %d, iTotalDstBytesAdded is %d"), iOutputDataBuffer->Length(), iTotalDstBytesAdded); sl@0: return EFalse; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * Checks the current return value against iExpectedReturnValue. sl@0: * sl@0: * @param "TUint aCount" sl@0: * Index of the iExpectedReturnValue array to check the value against. sl@0: * @return "TBool" sl@0: * ETrue if the return value is as expected. sl@0: * EFalse if the return value is not as expected. sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::CheckReturnValueL(TUint aCount) sl@0: { sl@0: if (aCount >= 5) sl@0: User::Leave(KErrArgument); sl@0: sl@0: if (iCodecProcessResult.iStatus == iExpectedReturnValue[aCount].iStatus) sl@0: { sl@0: return ETrue; sl@0: } sl@0: else sl@0: { sl@0: INFO_PRINTF4(_L(">> TCodecProcessResult::iStatus is %d, iExpectedReturnValue for LOOP %d is %d"), iCodecProcessResult.iStatus, aCount, iExpectedReturnValue[aCount].iStatus); sl@0: return EFalse; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function fills the source buffer with data from the file specified. sl@0: * sl@0: * @param "CMMFBuffer* aSrcBuffer" sl@0: * Buffer to contain the data read from the source file. sl@0: * "const TDesC& aFileName" sl@0: * Name of source file to use. sl@0: * "TUint aPosition" sl@0: * Position in the file from which to read the data. sl@0: */ sl@0: void CTestStep_MMF_ACOD::FillSourceBufferFromSourceFileL(CMMFBuffer* aSrcBuffer, const TDesC& aFilename, TUint aPosition) sl@0: { sl@0: RFs fs; sl@0: User::LeaveIfError(fs.Connect()); sl@0: CleanupClosePushL(fs); sl@0: sl@0: RFile file; sl@0: User::LeaveIfError(file.Open(fs, aFilename, EFileRead|EFileShareAny)); sl@0: CleanupClosePushL(file); sl@0: sl@0: iFileDataLeft = 0; sl@0: file.Size(iFileDataLeft); sl@0: if (STATIC_CAST(TInt, aPosition) < iFileDataLeft) sl@0: iFileDataLeft -= aPosition; sl@0: else User::Leave(KErrEof); sl@0: sl@0: RFileReadStream fileReadStream(file, aPosition); sl@0: CleanupClosePushL(fileReadStream); sl@0: sl@0: TInt srcBufferLength = STATIC_CAST(CMMFDataBuffer*, aSrcBuffer)->Data().MaxLength(); sl@0: sl@0: //read data from source file into source buffer sl@0: if(iFileDataLeft < srcBufferLength) sl@0: fileReadStream.ReadL(STATIC_CAST(CMMFDataBuffer*, aSrcBuffer)->Data(), iFileDataLeft); sl@0: else sl@0: fileReadStream.ReadL(STATIC_CAST(CMMFDataBuffer*, aSrcBuffer)->Data()); sl@0: sl@0: CleanupStack::PopAndDestroy(3); //filereadstream, file, fs sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function tests the functionality of ProcessL for the codec specified. sl@0: * sl@0: * @param "TUid aCodecUID" sl@0: * Uid of the codec under test. sl@0: * "TUint aSrcBufferSize" sl@0: * Size of source buffer to test the codec with. sl@0: * "TUint aDstBufferSize" sl@0: * Size of destination buffer to test the codec with. sl@0: * "TUint aSrcBufferLength" sl@0: * Length of source buffer to test the codec with if less than the maxLength. sl@0: * aSrcBufferLength defaults to zero. It is not used unless a value is sl@0: * specified. A value should only be specified in cases where the buffer sl@0: * length is less than the maxlength. sl@0: * @return "TBool" sl@0: * ETrue if the test passes. sl@0: * EFalse if the test fails. sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::TestProcessL(TUid aCodecUID, TUint aSrcBufferSize, TUint aDstBufferSize, TUint aSrcBufferLength) sl@0: { sl@0: //create buffers sl@0: CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(aSrcBufferSize); sl@0: CleanupStack::PushL(srcBuffer); sl@0: CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(aDstBufferSize); sl@0: CleanupStack::PushL(dstBuffer); sl@0: sl@0: //Fill source buffer with data sl@0: HBufC* srcFilename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrSrcFilename = srcFilename->Des(); sl@0: GetSourceFilenameFromCodecUidL(aCodecUID.iUid, ptrSrcFilename); sl@0: FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0); sl@0: sl@0: //if source buffer has different length to max length, crop data sl@0: if (aSrcBufferLength > 0) sl@0: { sl@0: srcBuffer->Data().SetLength(aSrcBufferLength); sl@0: } sl@0: sl@0: //instantiate codec sl@0: CMMFCodec* codec = CMMFCodec::NewL(aCodecUID); sl@0: CleanupStack::PushL(codec); sl@0: sl@0: TBool testOK = ETrue; sl@0: TRAPD(err, iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer)); sl@0: if (err) sl@0: { sl@0: ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessL Leave occurred in ProcessL, error code %d"), err); sl@0: testOK = EFalse; sl@0: } sl@0: else sl@0: { sl@0: //copy data to iOutputDataBuffer sl@0: iOutputDataBuffer = HBufC8::NewL(dstBuffer->Data().Length()); sl@0: TPtr8 outputDataBufferPtr = iOutputDataBuffer->Des(); sl@0: outputDataBufferPtr.Append(dstBuffer->Data()); sl@0: sl@0: iTotalDstBytesAdded = iCodecProcessResult.iDstBytesAdded; sl@0: iTotalSrcBytesProcessed = iCodecProcessResult.iSrcBytesProcessed; sl@0: sl@0: //investigate results sl@0: HBufC* filename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrFilename = filename->Des(); sl@0: GetComparisonFilenameFromCodecUidL(aCodecUID.iUid, ptrFilename); sl@0: sl@0: if (!CheckOutputAgainstComparisonFileL(ptrFilename, 0)) sl@0: { sl@0: ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestProcessL CheckOutputAgainstComparisonFileL returned EFalse")); sl@0: testOK = EFalse; sl@0: } sl@0: if (!CheckDstBytesAddedL(0)) sl@0: { sl@0: ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestProcessL CheckDstBytesAddedL returned EFalse")); sl@0: testOK = EFalse; sl@0: } sl@0: if (!CheckSrcBytesProcessedL(0)) sl@0: { sl@0: ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestProcessL CheckSrcBytesProcessedL returned EFalse")); sl@0: testOK = EFalse; sl@0: } sl@0: if (!CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL()) sl@0: { sl@0: ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestProcessL CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL returned EFalse")); sl@0: testOK = EFalse; sl@0: } sl@0: if (!CheckReturnValueL(0)) sl@0: { sl@0: ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestProcessL CheckReturnValue returned EFalse")); sl@0: testOK = EFalse; sl@0: } sl@0: sl@0: //clean up memory sl@0: CleanupStack::PopAndDestroy(); //filename sl@0: delete iOutputDataBuffer; sl@0: iOutputDataBuffer = NULL; sl@0: } sl@0: sl@0: CleanupStack::PopAndDestroy(4); //codec, srcFilename, dstBuffer, srcBuffer sl@0: sl@0: if(!testOK) sl@0: return EFalse; sl@0: else sl@0: return ETrue; sl@0: } sl@0: sl@0: sl@0: /** @xxxx sl@0: * This function tests the functionality of ProcessL for the codec specified. sl@0: * It mimics the datapath by calling ProcessL five times in a loop, checking the sl@0: * return value each time and passing in new buffers accordlingly. sl@0: * sl@0: * @param "TUid aCodecUID" sl@0: * Uid of the codec under test. sl@0: * "TUint aSrcBufferSize" sl@0: * Size of source buffers to test the codec with. sl@0: * "TUint aDstBufferSize" sl@0: * Size of destination buffers to test the codec with. sl@0: * "TUint aSrcBufferLength" sl@0: * Length of source buffer to test the codec with if less than the maxLength. sl@0: * aSrcBufferLength defaults to zero and is not used unless a value is sl@0: * specified.A value should only be specified if the buffer length is less sl@0: * than the maxlength. sl@0: * "TBool aCheckExpectedBytesProcessed" sl@0: * Boolean value to determine whether to check the srcBytesProcessed and sl@0: * dstBytesAdded against their expected values. This defaults to true, sl@0: * but allows for the tests to be bypassed for non-linear codecs where the sl@0: * expected values are difficult to determine. sl@0: * @return "TBool" sl@0: * ETrue if the test passes. sl@0: * EFalse if the test fails. sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL(TUid aCodecUID, TUint aSrcBufferSize, TUint aDstBufferSize, TUint aSrcBufferLength, TBool aCheckExpectedBytesProcessed) sl@0: { sl@0: //create buffers sl@0: CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(aSrcBufferSize); sl@0: CleanupStack::PushL(srcBuffer); sl@0: CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(aDstBufferSize); sl@0: CleanupStack::PushL(dstBuffer); sl@0: sl@0: //read first buffer of data sl@0: HBufC* srcFilename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrSrcFilename = srcFilename->Des(); sl@0: GetSourceFilenameFromCodecUidL(aCodecUID.iUid, ptrSrcFilename); sl@0: TRAPD(srcFileError, FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0)); sl@0: TBool endOfFile = EFalse; sl@0: if (srcFileError == KErrEof) sl@0: endOfFile = ETrue; sl@0: else if (srcFileError) sl@0: User::Leave(srcFileError); sl@0: sl@0: sl@0: //if source buffer has different length to max length, crop data sl@0: if (aSrcBufferLength > 0) sl@0: { sl@0: srcBuffer->Data().SetLength(aSrcBufferLength); sl@0: } sl@0: sl@0: //instantiate codec sl@0: CMMFCodec* codec = CMMFCodec::NewL(aCodecUID); sl@0: CleanupStack::PushL(codec); sl@0: sl@0: TBool testOK = ETrue; sl@0: TRAPD(err, iOutputDataBuffer = HBufC8::NewL(aDstBufferSize*5)); sl@0: User::LeaveIfError(err); sl@0: TPtr8 outputDataBufferPtr = iOutputDataBuffer->Des(); sl@0: sl@0: sl@0: TUint maxIters = 0; sl@0: if(iSingleIteration) sl@0: { sl@0: maxIters = 1; sl@0: } sl@0: else sl@0: { sl@0: maxIters = 5; sl@0: } sl@0: sl@0: for (TUint i=0; iProcessL(*srcBuffer, *dstBuffer)); sl@0: if (err) sl@0: { sl@0: if (err == iExpectedLeaveErrorCode) sl@0: break; sl@0: else sl@0: { sl@0: ERR_PRINTF3(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d Leave occurred in ProcessL, error code %d"), i, err); sl@0: testOK = EFalse; sl@0: break; sl@0: } sl@0: } sl@0: else if (iExpectedLeaveErrorCode) sl@0: { sl@0: ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d A leave was expected in ProcessL, but this didn't occur"), i); sl@0: testOK = EFalse; sl@0: break; sl@0: } sl@0: sl@0: iTotalDstBytesAdded += iCodecProcessResult.iDstBytesAdded; sl@0: iTotalSrcBytesProcessed += iCodecProcessResult.iSrcBytesProcessed; sl@0: sl@0: if (i<4) sl@0: { sl@0: switch (iCodecProcessResult.iStatus) sl@0: { sl@0: case TCodecProcessResult::EProcessComplete: sl@0: { sl@0: outputDataBufferPtr.Append(dstBuffer->Data()); sl@0: dstBuffer->SetPosition(0); sl@0: if (!CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL()) sl@0: { sl@0: ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL returned EFalse"), i); sl@0: testOK = EFalse; sl@0: } sl@0: srcBuffer->SetPosition(0); sl@0: srcBuffer->NextFrame(); sl@0: sl@0: if (!endOfFile) sl@0: { sl@0: TRAP(srcFileError, FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, iTotalSrcBytesProcessed)); sl@0: if (srcFileError == KErrEof) sl@0: endOfFile = ETrue; sl@0: else if (srcFileError) sl@0: User::Leave(srcFileError); sl@0: } sl@0: if (aSrcBufferLength > 0) sl@0: srcBuffer->Data().SetLength(aSrcBufferLength); sl@0: break; sl@0: } sl@0: case TCodecProcessResult::EProcessIncomplete: sl@0: { sl@0: outputDataBufferPtr.Append(dstBuffer->Data()); sl@0: dstBuffer->SetPosition(0); sl@0: if (!CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL()) sl@0: { sl@0: ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL returned EFalse"), i); sl@0: testOK = EFalse; sl@0: } sl@0: srcBuffer->SetPosition(iCodecProcessResult.iSrcBytesProcessed + srcBuffer->Position()); sl@0: break; sl@0: } sl@0: case TCodecProcessResult::EDstNotFilled: sl@0: { sl@0: dstBuffer->SetPosition(iCodecProcessResult.iDstBytesAdded + dstBuffer->Position()); sl@0: sl@0: if (!endOfFile) sl@0: { sl@0: TRAP(srcFileError, FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, iTotalSrcBytesProcessed)); sl@0: if (srcFileError == KErrEof) sl@0: endOfFile = ETrue; sl@0: else if (srcFileError) sl@0: User::Leave(srcFileError); sl@0: } sl@0: if (aSrcBufferLength > 0) sl@0: srcBuffer->Data().SetLength(aSrcBufferLength); sl@0: break; sl@0: } sl@0: default: sl@0: User::Leave(KErrCorrupt); //should never get here sl@0: } sl@0: } sl@0: else //last time sl@0: { sl@0: outputDataBufferPtr.Append(dstBuffer->Data()); sl@0: if (!CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL()) sl@0: { sl@0: ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL returned EFalse"), i); sl@0: testOK = EFalse; sl@0: } sl@0: } sl@0: sl@0: if (!CheckReturnValueL(i)) sl@0: { sl@0: ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d CheckReturnValue returned EFalse"), i); sl@0: testOK = EFalse; sl@0: } sl@0: if (aCheckExpectedBytesProcessed) sl@0: { sl@0: if (!CheckDstBytesAddedL(i)) sl@0: { sl@0: ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d CheckDstBytesAddedL returned EFalse"), i); sl@0: testOK = EFalse; sl@0: } sl@0: if (!CheckSrcBytesProcessedL(i)) sl@0: { sl@0: ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d CheckSrcBytesProcessedL returned EFalse"), i); sl@0: testOK = EFalse; sl@0: } sl@0: } sl@0: sl@0: if (endOfFile) sl@0: break; sl@0: } sl@0: sl@0: if (testOK) sl@0: { sl@0: HBufC* filename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrFilename = filename->Des(); sl@0: GetComparisonFilenameFromCodecUidL(aCodecUID.iUid, ptrFilename); sl@0: sl@0: if (!CheckOutputAgainstComparisonFileL(ptrFilename, 0)) sl@0: { sl@0: ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL CheckOutputAgainstComparisonFileL returned EFalse")); sl@0: testOK = EFalse; sl@0: } sl@0: sl@0: CleanupStack::PopAndDestroy(); //filename sl@0: } sl@0: sl@0: //clean up memory sl@0: delete iOutputDataBuffer; sl@0: iOutputDataBuffer = NULL; sl@0: CleanupStack::PopAndDestroy(4); //codec, srcFilename, dstBuffer, srcBuffer sl@0: sl@0: if(!testOK) sl@0: return EFalse; sl@0: else sl@0: return ETrue; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function tests how the codec handles a reposition. This test is only really sl@0: * relevant to codecs that store data between calls to ProcessL. When a reposition sl@0: * occurs the stored data should be flushed. sl@0: * sl@0: * ProcessL is called 3 times: sl@0: * After the first call the frame number is increased by one; sl@0: * After the second call the output data is checked to ensure that extra data HAS been sl@0: * written to the output buffer; The frame number is set to 5 to mimic a reposition. sl@0: * After the third call the output data is checked to ensure that extra data HAS NOT sl@0: * been written to the output buffer. sl@0: * sl@0: * Note: It is important to use buffer sizes that will force the codec to store extra sl@0: * data and return EProcessComplete or EDstNotFilled each time around the loop. sl@0: * sl@0: * @param "TUid aCodecUID" sl@0: * Uid of the codec under test. sl@0: * "TUint aSrcBufferSize" sl@0: * Size of source buffer to test the codec with. sl@0: * "TUint aDstBufferSize" sl@0: * Size of destination buffer to test the codec with. sl@0: * @return "TBool" sl@0: * ETrue if the test passes. sl@0: * EFalse if the test fails. sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::TestRepositionL(TUid aCodecUID, TUint aSrcBufferSize, TUint aDstBufferSize) sl@0: { sl@0: //create buffers sl@0: CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(aSrcBufferSize); sl@0: CleanupStack::PushL(srcBuffer); sl@0: sl@0: CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(aDstBufferSize); sl@0: CleanupStack::PushL(dstBuffer); sl@0: sl@0: //read first buffer of data sl@0: HBufC* srcFilename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrSrcFilename = srcFilename->Des(); sl@0: GetSourceFilenameFromCodecUidL(aCodecUID.iUid, ptrSrcFilename); sl@0: FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0); sl@0: sl@0: //instantiate codec sl@0: CMMFCodec* codec = NULL; sl@0: TRAPD(err, codec = CMMFCodec::NewL(aCodecUID)); sl@0: if (err) sl@0: { sl@0: ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestRepositionL Leave occurred in NewL, error code %d"), err); sl@0: return EFalse; sl@0: } sl@0: else sl@0: { sl@0: CleanupStack::PushL(codec); sl@0: } sl@0: sl@0: TBool testOK = ETrue; sl@0: iOutputDataBuffer = HBufC8::NewL(aDstBufferSize); sl@0: TPtr8 outputDataBufferPtr = iOutputDataBuffer->Des(); sl@0: sl@0: HBufC* filename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrFilename = filename->Des(); sl@0: GetComparisonFilenameFromCodecUidL(aCodecUID.iUid, ptrFilename); sl@0: sl@0: for (TUint i=0; i<3; i++) sl@0: { sl@0: iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer); sl@0: sl@0: if ((iCodecProcessResult.iStatus == TCodecProcessResult::EProcessComplete) || sl@0: (iCodecProcessResult.iStatus == TCodecProcessResult::EDstNotFilled)) sl@0: { sl@0: switch(i) sl@0: { sl@0: case 0: sl@0: { sl@0: srcBuffer->SetPosition(0); sl@0: srcBuffer->SetFrameNumber(5); sl@0: dstBuffer->SetPosition(0); sl@0: sl@0: break; sl@0: } sl@0: case 1: sl@0: { sl@0: srcBuffer->SetPosition(0); sl@0: srcBuffer->SetFrameNumber(0); sl@0: dstBuffer->SetPosition(0); sl@0: sl@0: outputDataBufferPtr.Copy(dstBuffer->Data()); sl@0: if (CheckOutputAgainstComparisonFileL(ptrFilename, 0)) sl@0: { sl@0: INFO_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestRepositionL CheckOutputAgainstComparisonFileL returned ETrue for LOOP %d."), i); sl@0: INFO_PRINTF1(_L(">> If the codec stores left over data from the previous call to ProcessL, this may indicate that the test is invalid.")); sl@0: INFO_PRINTF1(_L(">> Try using different buffer sizes.")); sl@0: } sl@0: break; sl@0: } sl@0: case 2: sl@0: { sl@0: outputDataBufferPtr.Copy(dstBuffer->Data()); sl@0: if (!CheckOutputAgainstComparisonFileL(ptrFilename, 0)) sl@0: { sl@0: ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestRepositionL CheckOutputAgainstComparisonFileL returned EFalse for LOOP %d"), i); sl@0: testOK = EFalse; sl@0: } sl@0: break; sl@0: } sl@0: default: sl@0: break; sl@0: } sl@0: } sl@0: else sl@0: { sl@0: INFO_PRINTF3(_L(">> CTestStep_MMF_ACOD::TestRepositionL Return code was %d for LOOP %d."), iCodecProcessResult.iStatus, i); sl@0: INFO_PRINTF1(_L(">> This indicates that the test is invalid. Try using different buffer sizes.")); sl@0: break; sl@0: } sl@0: } sl@0: sl@0: //clean up memory sl@0: delete iOutputDataBuffer; sl@0: iOutputDataBuffer = NULL; sl@0: CleanupStack::PopAndDestroy(5); //filename, codec, srcFilename, dstBuffer, srcBuffer sl@0: sl@0: if(!testOK) sl@0: return EFalse; sl@0: else sl@0: return ETrue; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function tests codec instantiation by Uid. sl@0: * sl@0: * @param "TUid aCodecUID" sl@0: * Uid of the codec under test. sl@0: * @return "TBool" sl@0: * ETrue if the test passes. sl@0: * EFalse if the test fails. sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::TestNewL(TUid aCodecUID) sl@0: { sl@0: //create buffers sl@0: CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize); sl@0: CleanupStack::PushL(srcBuffer); sl@0: CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize); sl@0: CleanupStack::PushL(dstBuffer); sl@0: sl@0: //Fill source buffer with data sl@0: HBufC* srcFilename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrSrcFilename = srcFilename->Des(); sl@0: GetSourceFilenameFromCodecUidL(aCodecUID.iUid, ptrSrcFilename); sl@0: FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0); sl@0: sl@0: TBool testOK = ETrue; sl@0: //create codec from uid sl@0: CMMFCodec* codec = NULL; sl@0: TRAPD(err, codec = CMMFCodec::NewL(aCodecUID)); sl@0: if (err) sl@0: { sl@0: ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestNewL Leave occurred in NewL, error code %d"), err); sl@0: testOK = EFalse; sl@0: } sl@0: else sl@0: { sl@0: CleanupStack::PushL(codec); sl@0: sl@0: //Check codec is non-null sl@0: if (!codec) sl@0: { sl@0: ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestNewL NewL returned NULL")); sl@0: testOK = EFalse; sl@0: } sl@0: else sl@0: { sl@0: //Process one buffer of data sl@0: iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer); sl@0: sl@0: //copy data to iOutputDataBuffer sl@0: iOutputDataBuffer = HBufC8::NewL(dstBuffer->Data().Length()); sl@0: TPtr8 outputDataBufferPtr = iOutputDataBuffer->Des(); sl@0: outputDataBufferPtr.Append(dstBuffer->Data()); sl@0: sl@0: //investigate results sl@0: HBufC* filename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrFilename = filename->Des(); sl@0: GetComparisonFilenameFromCodecUidL(aCodecUID.iUid, ptrFilename); sl@0: sl@0: if (!CheckOutputAgainstComparisonFileL(ptrFilename, 0)) sl@0: { sl@0: ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestNewL CheckOutputAgainstComparisonFileL returned EFalse")); sl@0: testOK = EFalse; sl@0: } sl@0: CleanupStack::PopAndDestroy(); //filename sl@0: } sl@0: sl@0: CleanupStack::PopAndDestroy(); //codec sl@0: delete iOutputDataBuffer; sl@0: iOutputDataBuffer = NULL; sl@0: } sl@0: sl@0: CleanupStack::PopAndDestroy(3); //srcFilename, dstBuffer, srcBuffer sl@0: sl@0: if(!testOK) sl@0: return EFalse; sl@0: else sl@0: return ETrue; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function tests codec instantiation by fourCC codes. sl@0: * sl@0: * @param "const TFourCC& aSrcFourCC" sl@0: * Source fourCC code of the codec under test. sl@0: * "const TFourCC& aDstFourCC" sl@0: * Destination fourCC code of the codec under test. sl@0: * @return "TBool" sl@0: * ETrue if the test passes. sl@0: * EFalse if the test fails. sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::TestNewL(const TFourCC& aSrcFourCC, const TFourCC& aDstFourCC) sl@0: { sl@0: //create buffers sl@0: CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize); sl@0: CleanupStack::PushL(srcBuffer); sl@0: CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize); sl@0: CleanupStack::PushL(dstBuffer); sl@0: sl@0: //Fill source buffer with data sl@0: HBufC* srcFilename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrSrcFilename = srcFilename->Des(); sl@0: GetSourceFilenameFromFourCCL(aSrcFourCC, aDstFourCC, ptrSrcFilename); sl@0: FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0); sl@0: sl@0: TBool testOK = ETrue; sl@0: sl@0: //create codec from uid sl@0: CMMFCodec* codec = NULL; sl@0: TRAPD(err, codec = CMMFCodec::NewL(aSrcFourCC, aDstFourCC)); sl@0: if (err) sl@0: { sl@0: ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestNewL Leave occurred in NewL, error code %d"), err); sl@0: testOK = EFalse; sl@0: } sl@0: else sl@0: { sl@0: CleanupStack::PushL(codec); sl@0: sl@0: //Check codec is non-null sl@0: if (!codec) sl@0: { sl@0: ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestNewL NULL CMMFCodec returned from NewL")); sl@0: testOK = EFalse; sl@0: } sl@0: else sl@0: { sl@0: //Process one buffer of data sl@0: iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer); sl@0: sl@0: //copy data to iOutputDataBuffer sl@0: iOutputDataBuffer = HBufC8::NewL(dstBuffer->Data().Length()); sl@0: TPtr8 outputDataBufferPtr = iOutputDataBuffer->Des(); sl@0: outputDataBufferPtr.Append(dstBuffer->Data()); sl@0: sl@0: //investigate results sl@0: HBufC* filename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrFilename = filename->Des(); sl@0: GetComparisonFilenameFromFourCCL(aSrcFourCC, aDstFourCC, ptrFilename); sl@0: sl@0: if (!CheckOutputAgainstComparisonFileL(ptrFilename, 0)) sl@0: { sl@0: ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestNewL CheckOutputAgainstComparisonFileL returned EFalse")); sl@0: testOK = EFalse; sl@0: } sl@0: CleanupStack::PopAndDestroy(); //filename sl@0: } sl@0: sl@0: CleanupStack::PopAndDestroy(); //codec sl@0: delete iOutputDataBuffer; sl@0: iOutputDataBuffer = NULL; sl@0: } sl@0: sl@0: CleanupStack::PopAndDestroy(3); //srcFilename, dstBuffer, srcBuffer sl@0: sl@0: if(!testOK) sl@0: return EFalse; sl@0: else sl@0: return ETrue; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function tests codec instantiation by fourCC codes and preferred supplier. sl@0: * Two new codecs have been created for the purpose of this test. They take the same sl@0: * fourCC codes (AAAA and BBBB) but have different suppliers. sl@0: * sl@0: * @return "TBool" sl@0: * ETrue if the test passes. sl@0: * EFalse if the test fails. sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::TestNewLPreferredSupplierL() sl@0: { sl@0: //create buffers sl@0: CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize); sl@0: CleanupStack::PushL(srcBuffer); sl@0: CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize); sl@0: CleanupStack::PushL(dstBuffer); sl@0: sl@0: //Fill source buffer with data sl@0: HBufC* srcFilename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrSrcFilename = srcFilename->Des(); sl@0: ptrSrcFilename.Copy(KSourceFilesDir); sl@0: ptrSrcFilename.Append(KPreferredSupplierSourceFile); sl@0: FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0); sl@0: sl@0: TBool testOK = ETrue; sl@0: sl@0: //create codec from uid and preferredSupplier sl@0: CMMFCodec* codec = NULL; sl@0: TRAPD(err, codec = CMMFCodec::NewL(KMMFFourCCCodeAAAA, KMMFFourCCCodeBBBB, KPreferredSupplier)); sl@0: if (err) sl@0: { sl@0: ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestNewLPreferredSupplierL Leave occurred in NewL, error code %d"), err); sl@0: testOK = EFalse; sl@0: } sl@0: else sl@0: { sl@0: CleanupStack::PushL(codec); sl@0: sl@0: //Check codec is non-null sl@0: if (!codec) sl@0: { sl@0: ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestNewLPreferredSupplierL NULL CMMFCodec returned from NewL")); sl@0: testOK = EFalse; sl@0: } sl@0: else sl@0: { sl@0: //Process one buffer of data sl@0: iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer); sl@0: sl@0: //copy data to iOutputDataBuffer sl@0: iOutputDataBuffer = HBufC8::NewL(dstBuffer->Data().Length()); sl@0: TPtr8 outputDataBufferPtr = iOutputDataBuffer->Des(); sl@0: outputDataBufferPtr.Append(dstBuffer->Data()); sl@0: sl@0: //investigate results sl@0: HBufC* filename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrFilename = filename->Des(); sl@0: ptrFilename.Copy(KComparisonFilesDir); sl@0: ptrFilename.Append(KPreferredSupplierComparisonFile); sl@0: sl@0: if (!CheckOutputAgainstComparisonFileL(ptrFilename, 0)) sl@0: { sl@0: ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestNewLPreferredSupplierL CheckOutputAgainstComparisonFileL returned EFalse")); sl@0: testOK = EFalse; sl@0: } sl@0: sl@0: CleanupStack::PopAndDestroy(filename); sl@0: } sl@0: sl@0: CleanupStack::PopAndDestroy(codec); sl@0: delete iOutputDataBuffer; sl@0: iOutputDataBuffer = NULL; sl@0: } sl@0: sl@0: CleanupStack::PopAndDestroy(3, srcBuffer); //srcFilename, dstBuffer, srcBuffer sl@0: sl@0: if(!testOK) sl@0: return EFalse; sl@0: else sl@0: return ETrue; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This functionality isn't implemented yet sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::TestMemoryScribbleL(TUid aCodecUID) sl@0: { sl@0: aCodecUID = aCodecUID; sl@0: sl@0: INFO_PRINTF1(_L(">> This test has not been implemented, as it has not yet been determined how to test for memory scribbles.")); sl@0: return ETrue; sl@0: } sl@0: sl@0: sl@0: /** @xxxx sl@0: * This function panics if any memory leaks occur during the calls to NewL or ProcessL. sl@0: * sl@0: * @param "TUid aCodecUID" sl@0: * Uid of codec under test. sl@0: * @return "TBool" sl@0: * ETrue if the test passes. sl@0: * EFalse if the test fails. sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::TestMemoryLeakL(TUid aCodecUID) sl@0: { sl@0: //create buffers sl@0: CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize); sl@0: CleanupStack::PushL(srcBuffer); sl@0: CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize); sl@0: CleanupStack::PushL(dstBuffer); sl@0: sl@0: //Fill source buffer with data sl@0: HBufC* srcFilename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrSrcFilename = srcFilename->Des(); sl@0: GetSourceFilenameFromCodecUidL(aCodecUID.iUid, ptrSrcFilename); sl@0: FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0); sl@0: sl@0: __MM_HEAP_MARK; sl@0: //instantiate codec sl@0: CMMFCodec* codec = CMMFCodec::NewL(aCodecUID); sl@0: CleanupStack::PushL(codec); sl@0: sl@0: iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer); sl@0: sl@0: CleanupStack::PopAndDestroy(4); //codec, srcFilename, dstBuffer, srcBuffer sl@0: sl@0: __MM_HEAP_MARKEND; sl@0: sl@0: return ETrue; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * This function tests how NewL deals with a memory allocation failure. sl@0: * This test will pass if NewL leaves with the correct error code on every sl@0: * memory allocation. sl@0: * sl@0: * @param "TUid aCodecUID" sl@0: * Uid of codec under test. sl@0: * @return "TBool" sl@0: * ETrue if the test passes. sl@0: * EFalse if the test fails. sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::TestNewLOutOfMemoryL(TUid aCodecUID) sl@0: { sl@0: aCodecUID = aCodecUID; sl@0: CMMFCodec* codec = NULL; sl@0: TInt failCount = 1; sl@0: TBool testComplete = EFalse; sl@0: TBool testOK = ETrue; sl@0: sl@0: while (!testComplete) sl@0: { sl@0: TInt err = 0; sl@0: __UHEAP_FAILNEXT(failCount); sl@0: __MM_HEAP_MARK; sl@0: sl@0: TRAP(err, codec = CMMFCodec::NewL(aCodecUID)); sl@0: sl@0: switch (err) sl@0: { sl@0: case KErrNoMemory : sl@0: break; sl@0: case KErrNone : sl@0: { sl@0: //attempt to allocate another cell. If this fails, we have tested all sl@0: //of the memory allocs carried out by NewL. sl@0: TAny *testAlloc = User::Alloc(1); sl@0: if (testAlloc==NULL) sl@0: { sl@0: testComplete = ETrue; sl@0: failCount --; sl@0: } sl@0: else sl@0: User::Free(testAlloc); sl@0: sl@0: delete codec; sl@0: codec = NULL; sl@0: break; sl@0: } sl@0: default: sl@0: { sl@0: testOK = EFalse; sl@0: testComplete = ETrue; sl@0: break; sl@0: } sl@0: } sl@0: sl@0: __MM_HEAP_MARKEND; sl@0: __UHEAP_RESET; sl@0: failCount++; sl@0: } sl@0: sl@0: if(!testOK) sl@0: return EFalse; sl@0: else sl@0: return ETrue; sl@0: } sl@0: sl@0: sl@0: /** @xxxx sl@0: * This function tests how ProcessL would deal with a memory allocation failure. sl@0: * For most of the codecs ProcessL doesn't allocate any memory, so this test will sl@0: * pass when ProcessL succeeds as well as when ProcessL leaves with the correct code. sl@0: * sl@0: * @param "TUid aCodecUID" sl@0: * Uid of codec under test. sl@0: * @return "TBool" sl@0: * ETrue if the test passes. sl@0: * EFalse if the test fails. sl@0: */ sl@0: TBool CTestStep_MMF_ACOD::TestProcessLOutOfMemoryL(TUid aCodecUID) sl@0: { sl@0: //create buffers sl@0: CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize); sl@0: CleanupStack::PushL(srcBuffer); sl@0: CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize); sl@0: CleanupStack::PushL(dstBuffer); sl@0: sl@0: //Fill source buffer with data sl@0: HBufC* srcFilename = HBufC::NewLC(KMaxPath); sl@0: TPtr ptrSrcFilename = srcFilename->Des(); sl@0: GetSourceFilenameFromCodecUidL(aCodecUID.iUid, ptrSrcFilename); sl@0: FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0); sl@0: sl@0: //instantiate codec sl@0: CMMFCodec* codec = CMMFCodec::NewL(aCodecUID); sl@0: CleanupStack::PushL(codec); sl@0: TBool testOK = ETrue; sl@0: TUint failCount = 1; sl@0: TBool testComplete = EFalse; sl@0: sl@0: while (!testComplete) sl@0: { sl@0: __UHEAP_FAILNEXT(failCount); sl@0: __MM_HEAP_MARK; sl@0: TRAPD(err, iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer)); sl@0: sl@0: switch (err) sl@0: { sl@0: case KErrNoMemory : sl@0: break; sl@0: case KErrNone : sl@0: { sl@0: //attempt to allocate another cell. If this fails, we have tested all sl@0: //of the memory allocs carried out by ProcessL. sl@0: TAny *testAlloc = User::Alloc(1); sl@0: if (testAlloc==NULL) sl@0: { sl@0: testComplete = ETrue; sl@0: failCount --; sl@0: } sl@0: else sl@0: User::Free(testAlloc); sl@0: break; sl@0: } sl@0: default: sl@0: { sl@0: testOK = EFalse; sl@0: testComplete = ETrue; sl@0: break; sl@0: } sl@0: } sl@0: sl@0: __MM_HEAP_MARKEND; sl@0: __UHEAP_RESET; sl@0: failCount++; sl@0: } sl@0: sl@0: CleanupStack::PopAndDestroy(4); //codec, srcFilename, dstBuffer, srcBuffer sl@0: sl@0: if(!testOK) sl@0: return EFalse; sl@0: else sl@0: return ETrue; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: // ** TEST MMF_ACOD STEPS *** sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0001::CTest_MMF_ACOD_U_0001() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0001-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * Instantiate a codec by FourCC Codes and preferred supplier sl@0: * @test Req. under test REQ172.6.3 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0001::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewLPreferredSupplierL()); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0002::CTest_MMF_ACOD_U_0002() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0002-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.1 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0002::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodeALAW, KMMFFourCCCodePCM16)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0003::CTest_MMF_ACOD_U_0003() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0003-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.1 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0003::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAlawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0004::CTest_MMF_ACOD_U_0004() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0004-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 100; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0004::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAlawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KAlawToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0005::CTest_MMF_ACOD_U_0005() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0005-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 25; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0005::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAlawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KAlawToPCM16OptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0006::CTest_MMF_ACOD_U_0006() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0006-HP"); sl@0: iHeapSize = 0x20000; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 5000; sl@0: iExpectedDstBytesAdded[i] = 10000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0006::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAlawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0007::CTest_MMF_ACOD_U_0007() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0007-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x800; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0007::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAlawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0008::CTest_MMF_ACOD_U_0008() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0008-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x800; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0008::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAlawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0009::CTest_MMF_ACOD_U_0009() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0009-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x800; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0009::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAlawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KAlawToPCM16OptimumSrc, KAlawToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0010::CTest_MMF_ACOD_U_0010() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0010-HP"); sl@0: // iHeapSize = 0x20000; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0010::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAlawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: INFO_PRINTF1(_L(">> The ALAW to PCM16 codec doesn't currently store data between calls to ProcessL")); sl@0: sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, KAlawToPCM16OptimumSrc, KAlawToPCM16OptimumDst+30)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0011::CTest_MMF_ACOD_U_0011() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0011-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To ALAW Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.3 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0011::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodeALAW)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0012::CTest_MMF_ACOD_U_0012() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0012-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To ALAW Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.3 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0012::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToAlaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0013::CTest_MMF_ACOD_U_0013() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0013-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 25; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To ALAW Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0013::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToAlaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToAlawOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0014::CTest_MMF_ACOD_U_0014() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0014-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 100; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To ALAW Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0014::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToAlaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToAlawOptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0015::CTest_MMF_ACOD_U_0015() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0015-HP"); sl@0: iHeapSize = 0x20000; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 10000; sl@0: iExpectedDstBytesAdded[i] = 5000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To ALAW Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0015::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToAlaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0016::CTest_MMF_ACOD_U_0016() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0016-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x800; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To ALAW Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0016::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToAlaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0017::CTest_MMF_ACOD_U_0017() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0017-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x800; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To ALAW Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0017::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToAlaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0018::CTest_MMF_ACOD_U_0018() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0018-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x800; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To ALAW Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0018::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToAlaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToAlawOptimumSrc, KPCM16ToAlawOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0019::CTest_MMF_ACOD_U_0019() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0019-HP"); sl@0: // iHeapSize = 0x20000; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To ALAW Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0019::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToAlaw}; sl@0: TBool testOK = EFalse; sl@0: sl@0: INFO_PRINTF1(_L(">> The PCM16 to ALAW codec doesn't currently store data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0020::CTest_MMF_ACOD_U_0020() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0020-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.4 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0020::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM8, KMMFFourCCCodePCM16)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0021::CTest_MMF_ACOD_U_0021() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0021-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.4 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0021::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM8ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0022::CTest_MMF_ACOD_U_0022() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0022-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 100; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0022::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM8ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM8ToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0023::CTest_MMF_ACOD_U_0023() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0023-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 25; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0023::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM8ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM8ToPCM16OptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0024::CTest_MMF_ACOD_U_0024() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0024-HP"); sl@0: iHeapSize = 0x20000; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 5000; sl@0: iExpectedDstBytesAdded[i] = 10000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0024::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM8ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0025::CTest_MMF_ACOD_U_0025() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0025-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x800; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0025::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM8ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0026::CTest_MMF_ACOD_U_0026() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0026-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x800; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0026::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM8ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0027::CTest_MMF_ACOD_U_0027() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0027-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x800; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0027::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM8ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM8ToPCM16OptimumSrc, KPCM8ToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0028::CTest_MMF_ACOD_U_0028() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0028-HP"); sl@0: // iHeapSize = 0x20000; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0028::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM8ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: INFO_PRINTF1(_L(">> The PCM8 to PCM16 codec doesn't currently store data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, KPCM8ToPCM16OptimumSrc, KPCM8ToPCM16OptimumDst+30)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0029::CTest_MMF_ACOD_U_0029() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0029-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM8 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0029::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodePCM8)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0030::CTest_MMF_ACOD_U_0030() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0030-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM8 Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0030::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0031::CTest_MMF_ACOD_U_0031() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0031-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 25; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM8 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0031::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToPCM8OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0032::CTest_MMF_ACOD_U_0032() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0032-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 100; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM8 Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0032::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCM8OptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0033::CTest_MMF_ACOD_U_0033() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0033-HP"); sl@0: iHeapSize = 0x20000; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 10000; sl@0: iExpectedDstBytesAdded[i] = 5000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM8 Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0033::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0034::CTest_MMF_ACOD_U_0034() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0034-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x800; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM8 Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0034::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0035::CTest_MMF_ACOD_U_0035() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0035-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x800; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM8 Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0035::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0036::CTest_MMF_ACOD_U_0036() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0036-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x800; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM8 Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0036::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCM8OptimumSrc, KPCM16ToPCM8OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0037::CTest_MMF_ACOD_U_0037() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0037-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM8 Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0037::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8}; sl@0: TBool testOK = EFalse; sl@0: sl@0: INFO_PRINTF1(_L(">> The PCM16 to PCM8 codec doesn't currently store data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0038::CTest_MMF_ACOD_U_0038() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0038-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM16B Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.6 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0038::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodePCM16B)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0039::CTest_MMF_ACOD_U_0039() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0039-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16B To PCM16 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.6 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0039::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16B, KMMFFourCCCodePCM16)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0040::CTest_MMF_ACOD_U_0040() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0040-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 To PCMU16B Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.6 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0040::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCMU16, KMMFFourCCCodePCMU16B)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0041::CTest_MMF_ACOD_U_0041() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0041-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16B To PCMU16 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.6 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0041::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCMU16B, KMMFFourCCCodePCMU16)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0042::CTest_MMF_ACOD_U_0042() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0042-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM16B Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.6 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0042::DoTestStepL() sl@0: { sl@0: //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian}; sl@0: const TUid codecUid = {KMMFUidCodecPCM16toPCM16B}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0043::CTest_MMF_ACOD_U_0043() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0043-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM16B Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0043::DoTestStepL() sl@0: { sl@0: //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian}; sl@0: const TUid codecUid = {KMMFUidCodecPCM16toPCM16B}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToPCM16BOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0044::CTest_MMF_ACOD_U_0044() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0044-HP"); sl@0: iHeapSize = 0x20000; sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM16B Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0044::DoTestStepL() sl@0: { sl@0: //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian}; sl@0: const TUid codecUid = {KMMFUidCodecPCM16toPCM16B}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCM16BOptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0045::CTest_MMF_ACOD_U_0045() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0045-HP"); sl@0: iHeapSize = 0x20000; sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 10000; sl@0: iExpectedDstBytesAdded[i] = 10000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM16B Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0045::DoTestStepL() sl@0: { sl@0: //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian}; sl@0: const TUid codecUid = {KMMFUidCodecPCM16toPCM16B}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0046::CTest_MMF_ACOD_U_0046() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0046-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM16B Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0046::DoTestStepL() sl@0: { sl@0: //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian}; sl@0: const TUid codecUid = {KMMFUidCodecPCM16toPCM16B}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0047::CTest_MMF_ACOD_U_0047() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0047-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM16B Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0047::DoTestStepL() sl@0: { sl@0: //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian}; sl@0: const TUid codecUid = {KMMFUidCodecPCM16toPCM16B}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0048::CTest_MMF_ACOD_U_0048() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0048-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM16B Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0048::DoTestStepL() sl@0: { sl@0: //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian}; sl@0: const TUid codecUid = {KMMFUidCodecPCM16toPCM16B}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCM16BOptimumSrc, KPCM16ToPCM16BOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0049::CTest_MMF_ACOD_U_0049() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0049-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCM16B Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0049::DoTestStepL() sl@0: { sl@0: //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian}; sl@0: const TUid codecUid = {KMMFUidCodecPCM16toPCM16B}; sl@0: TBool testOK = EFalse; sl@0: sl@0: INFO_PRINTF1(_L(">> The PCM16 to PCM16B codec doesn't currently store data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0050::CTest_MMF_ACOD_U_0050() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0050-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16B Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0050::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodePCMU16B)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0051::CTest_MMF_ACOD_U_0051() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0051-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16B Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0051::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0052::CTest_MMF_ACOD_U_0052() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0052-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16B Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0052::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToPCMU16BOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0053::CTest_MMF_ACOD_U_0053() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0053-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16B Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0053::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU16BOptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0054::CTest_MMF_ACOD_U_0054() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0054-HP"); sl@0: iHeapSize = 0x20000; sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 10000; sl@0: iExpectedDstBytesAdded[i] = 10000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16B Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0054::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0055::CTest_MMF_ACOD_U_0055() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0055-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16B Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0055::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0056::CTest_MMF_ACOD_U_0056() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0056-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16B Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0056::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0057::CTest_MMF_ACOD_U_0057() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0057-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16B Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0057::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU16BOptimumSrc, KPCM16ToPCMU16BOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0058::CTest_MMF_ACOD_U_0058() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0058-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16B Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0058::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE}; sl@0: TBool testOK = EFalse; sl@0: sl@0: INFO_PRINTF1(_L(">> The PCM16 to PCMU16B codec doesn't currently store data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0059::CTest_MMF_ACOD_U_0059() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0059-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.7 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0059::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodePCMU16)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0060::CTest_MMF_ACOD_U_0060() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0060-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16 Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.7 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0060::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0061::CTest_MMF_ACOD_U_0061() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0061-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0061::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToPCMU16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0062::CTest_MMF_ACOD_U_0062() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0062-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16 Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0062::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU16OptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0063::CTest_MMF_ACOD_U_0063() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0063-HP"); sl@0: iHeapSize = 0x20000; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 10000; sl@0: iExpectedDstBytesAdded[i] = 10000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16 Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0063::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0064::CTest_MMF_ACOD_U_0064() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0064-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16 Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0064::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0065::CTest_MMF_ACOD_U_0065() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0065-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16 Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0065::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0066::CTest_MMF_ACOD_U_0066() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0066-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16 Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0066::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU16OptimumSrc, KPCM16ToPCMU16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0067::CTest_MMF_ACOD_U_0067() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0067-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU16 Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0067::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: INFO_PRINTF1(_L(">> The PCM16 to PCMU16 codec doesn't currently store data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0068::CTest_MMF_ACOD_U_0068() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0068-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU8 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.8 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0068::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodePCMU8)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0069::CTest_MMF_ACOD_U_0069() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0069-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU8 Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.8 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0069::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0070::CTest_MMF_ACOD_U_0070() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0070-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 25; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU8 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0070::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToPCMU8OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0071::CTest_MMF_ACOD_U_0071() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0071-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 100; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU8 Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0071::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU8OptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0072::CTest_MMF_ACOD_U_0072() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0072-HP"); sl@0: iHeapSize = 0x20000; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 10000; sl@0: iExpectedDstBytesAdded[i] = 5000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU8 Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0072::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0073::CTest_MMF_ACOD_U_0073() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0073-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x800; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU8 Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0073::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0074::CTest_MMF_ACOD_U_0074() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0074-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x800; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU8 Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0074::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0075::CTest_MMF_ACOD_U_0075() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0075-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x800; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU8 Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0075::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU8OptimumSrc, KPCM16ToPCMU8OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0076::CTest_MMF_ACOD_U_0076() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0076-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To PCMU8 Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0076::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8}; sl@0: TBool testOK = EFalse; sl@0: sl@0: INFO_PRINTF1(_L(">> The PCM16 to PCMU8 codec doesn't currently store data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //----------------------------------------------------------------- sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0077::CTest_MMF_ACOD_U_0077() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0077-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16B To PCM16 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.9 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0077::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCMU16B, KMMFFourCCCodePCM16)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0078::CTest_MMF_ACOD_U_0078() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0078-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16B To PCM16 Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.9 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0078::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0079::CTest_MMF_ACOD_U_0079() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0079-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16B To PCM16 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0079::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCMU16BToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0080::CTest_MMF_ACOD_U_0080() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0080-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16B To PCM16 Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0080::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU16BToPCM16OptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0081::CTest_MMF_ACOD_U_0081() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0081-HP"); sl@0: iHeapSize = 0x20000; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 10000; sl@0: iExpectedDstBytesAdded[i] = 10000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16B To PCM16 Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0081::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0082::CTest_MMF_ACOD_U_0082() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0082-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16B To PCM16 Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0082::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0083::CTest_MMF_ACOD_U_0083() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0083-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16B To PCM16 Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0083::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0084::CTest_MMF_ACOD_U_0084() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0084-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16B To PCM16 Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0084::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU16BToPCM16OptimumSrc, KPCMU16BToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0085::CTest_MMF_ACOD_U_0085() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0085-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16B To PCM16 Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0085::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: INFO_PRINTF1(_L(">> The PCMU16B to PCM16 codec doesn't currently store data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0086::CTest_MMF_ACOD_U_0086() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0086-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 To PCM16 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.25 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0086::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCMU16, KMMFFourCCCodePCM16)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0087::CTest_MMF_ACOD_U_0087() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0087-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 To PCM16 Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.25 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0087::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0088::CTest_MMF_ACOD_U_0088() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0088-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 To PCM16 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0088::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCMU16ToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0089::CTest_MMF_ACOD_U_0089() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0089-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 To PCM16 Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0089::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU16ToPCM16OptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0090::CTest_MMF_ACOD_U_0090() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0090-HP"); sl@0: iHeapSize = 0x20000; sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 10000; sl@0: iExpectedDstBytesAdded[i] = 10000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 To PCM16 Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0090::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0091::CTest_MMF_ACOD_U_0091() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0091-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 To PCM16 Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0091::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0092::CTest_MMF_ACOD_U_0092() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0092-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 To PCM16 Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0092::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0093::CTest_MMF_ACOD_U_0093() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0093-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 To PCM16 Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0093::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU16ToPCM16OptimumSrc, KPCMU16ToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0094::CTest_MMF_ACOD_U_0094() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0094-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 To PCM16 Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0094::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: INFO_PRINTF1(_L(">> The PCMU16 to PCM16 codec doesn't currently store data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0095::CTest_MMF_ACOD_U_0095() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0095-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0095::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCMU8, KMMFFourCCCodePCM16)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0096::CTest_MMF_ACOD_U_0096() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0096-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0096::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0097::CTest_MMF_ACOD_U_0097() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0097-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 100; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0097::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCMU8ToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0098::CTest_MMF_ACOD_U_0098() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0098-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 25; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0098::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU8ToPCM16OptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0099::CTest_MMF_ACOD_U_0099() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0099-HP"); sl@0: iHeapSize = 0x20000; sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 5000; sl@0: iExpectedDstBytesAdded[i] = 10000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0099::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0100::CTest_MMF_ACOD_U_0100() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0100-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x800; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0100::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0101::CTest_MMF_ACOD_U_0101() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0101-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x800; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0101::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0102::CTest_MMF_ACOD_U_0102() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0102-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x800; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0102::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU8ToPCM16OptimumSrc, KPCMU8ToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0103::CTest_MMF_ACOD_U_0103() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0103-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0103::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: INFO_PRINTF1(_L(">> The PCMU8 to PCM16 codec doesn't currently store data between calls to ProcessL")); sl@0: sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, KPCMU8ToPCM16OptimumSrc, KPCMU8ToPCM16OptimumDst+30)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0104::CTest_MMF_ACOD_U_0104() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0104-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.13 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0104::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodeMuLAW, KMMFFourCCCodePCM16)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0105::CTest_MMF_ACOD_U_0105() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0105-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.13 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0105::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecMulawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0106::CTest_MMF_ACOD_U_0106() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0106-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 100; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0106::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecMulawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KMulawToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0107::CTest_MMF_ACOD_U_0107() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0107-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 25; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0107::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecMulawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMulawToPCM16OptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0108::CTest_MMF_ACOD_U_0108() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0108-HP"); sl@0: iHeapSize = 0x20000; sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 5000; sl@0: iExpectedDstBytesAdded[i] = 10000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0108::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecMulawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0109::CTest_MMF_ACOD_U_0109() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0109-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x800; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0109::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecMulawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0110::CTest_MMF_ACOD_U_0110() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0110-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x800; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0110::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecMulawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0111::CTest_MMF_ACOD_U_0111() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0111-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x800; sl@0: iExpectedDstBytesAdded[i] = 0x1000; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0111::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecMulawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMulawToPCM16OptimumSrc, KMulawToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0112::CTest_MMF_ACOD_U_0112() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0112-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0112::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecMulawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: INFO_PRINTF1(_L(">> The MULAW To PCM16 codec doesn't currently store data between calls to ProcessL")); sl@0: sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, KMulawToPCM16OptimumSrc, KMulawToPCM16OptimumDst+30)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0113::CTest_MMF_ACOD_U_0113() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0113-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To MULAW Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.15 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0113::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodeMuLAW)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0114::CTest_MMF_ACOD_U_0114() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0114-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To MULAW Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.15 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0114::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToMulaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0115::CTest_MMF_ACOD_U_0115() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0115-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 25; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To MULAW Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0115::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToMulaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToMulawOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0116::CTest_MMF_ACOD_U_0116() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0116-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 100; sl@0: iExpectedDstBytesAdded[i] = 50; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To MULAW Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0116::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToMulaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToMulawOptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0117::CTest_MMF_ACOD_U_0117() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0117-HP"); sl@0: iHeapSize = 0x20000; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 10000; sl@0: iExpectedDstBytesAdded[i] = 5000; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To MULAW Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0117::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToMulaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0118::CTest_MMF_ACOD_U_0118() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0118-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x800; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To MULAW Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0118::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToMulaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0119::CTest_MMF_ACOD_U_0119() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0119-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x800; sl@0: sl@0: if((i%2)==0)//even i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: else //odd i sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To MULAW Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0119::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToMulaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0120::CTest_MMF_ACOD_U_0120() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0120-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x1000; sl@0: iExpectedDstBytesAdded[i] = 0x800; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To MULAW Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0120::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToMulaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToMulawOptimumSrc, KPCM16ToMulawOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0121::CTest_MMF_ACOD_U_0121() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0121-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 To MULAW Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0121::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToMulaw}; sl@0: TBool testOK = EFalse; sl@0: sl@0: INFO_PRINTF1(_L(">> The PCM16 to MULAW codec doesn't currently store data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0122::CTest_MMF_ACOD_U_0122() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0122-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD to PCM16 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.12 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0122::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodeIMAD, KMMFFourCCCodePCM16)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0123::CTest_MMF_ACOD_U_0123() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0123-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD to PCM16 Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.12 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0123::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0124::CTest_MMF_ACOD_U_0124() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0124-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD to PCM16 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0124::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KAdpcmToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0125::CTest_MMF_ACOD_U_0125() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0125-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD to PCM16 Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0125::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KAdpcmToPCM16OptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0126::CTest_MMF_ACOD_U_0126() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0126-HP"); sl@0: iHeapSize = 0x20000; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: if(i<4) sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: else sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD to PCM16 Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0126::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0127::CTest_MMF_ACOD_U_0127() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0127-HP"); sl@0: sl@0: iExpectedReturnValue[0].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[1].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[2].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessComplete; sl@0: iExpectedReturnValue[4].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD to PCM16 Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0127::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0128::CTest_MMF_ACOD_U_0128() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0128-HP"); sl@0: sl@0: iExpectedReturnValue[0].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[1].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[2].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessComplete; sl@0: iExpectedReturnValue[4].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD to PCM16 Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0128::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0129::CTest_MMF_ACOD_U_0129() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0129-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x400; sl@0: iExpectedDstBytesAdded[i] = 0xFC8; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD to PCM16 Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0129::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KAdpcmToPCM16OptimumSrc, KAdpcmToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0130::CTest_MMF_ACOD_U_0130() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0130-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD to PCM16 Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0130::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TUint src = (KAdpcmToPCM16OptimumSrc/4) + 10; sl@0: sl@0: INFO_PRINTF1(_L(">> The IMAD to PCM16 codec stores data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, src, KAdpcmToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0131::CTest_MMF_ACOD_U_0131() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0131-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAD Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.14 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0131::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodeIMAD)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0132::CTest_MMF_ACOD_U_0132() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0132-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAD Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.14 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0132::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0133::CTest_MMF_ACOD_U_0133() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0133-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD to PCM16 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0133::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToAdpcmOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0134::CTest_MMF_ACOD_U_0134() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0134-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAD Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0134::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToAdpcmOptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0135::CTest_MMF_ACOD_U_0135() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0135-HP"); sl@0: iHeapSize = 0x20000; sl@0: iExpectedReturnValue[0].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[1].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[2].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[4].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAD Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0135::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0136::CTest_MMF_ACOD_U_0136() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0136-HP"); sl@0: sl@0: iExpectedReturnValue[0].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[1].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[2].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[4].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAD Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0136::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0137::CTest_MMF_ACOD_U_0137() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0137-HP"); sl@0: sl@0: iExpectedReturnValue[0].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[1].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[2].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[4].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAD Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0137::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0138::CTest_MMF_ACOD_U_0138() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0138-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0xFC8; sl@0: iExpectedDstBytesAdded[i] = 0x400; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAD Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0138::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToAdpcmOptimumSrc, KPCM16ToAdpcmOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0139::CTest_MMF_ACOD_U_0139() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0139-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAD Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0139::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TUint src = (KPCM16ToAdpcmOptimumSrc/4) + 10; sl@0: sl@0: INFO_PRINTF1(_L(">> The PCM16 to IMAD codec stores data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, src, KPCM16ToAdpcmOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0140::CTest_MMF_ACOD_U_0140() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0140-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS to PCM16 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.17 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0140::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodeIMAS, KMMFFourCCCodePCM16)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0141::CTest_MMF_ACOD_U_0141() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0141-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS to PCM16 Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.17 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0141::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0142::CTest_MMF_ACOD_U_0142() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0142-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS to PCM16 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0142::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KStereoAdpcmToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0143::CTest_MMF_ACOD_U_0143() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0143-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS to PCM16 Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0143::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KStereoAdpcmToPCM16OptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0144::CTest_MMF_ACOD_U_0144() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0144-HP"); sl@0: iHeapSize = 0x20000; sl@0: iExpectedReturnValue[0].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[1].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[2].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[3].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[4].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS to PCM16 Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0144::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0145::CTest_MMF_ACOD_U_0145() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0145-HP"); sl@0: sl@0: iExpectedReturnValue[0].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[1].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[2].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessComplete; sl@0: iExpectedReturnValue[4].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS to PCM16 Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0145::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0146::CTest_MMF_ACOD_U_0146() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0146-HP"); sl@0: sl@0: iExpectedReturnValue[0].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[1].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[2].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessComplete; sl@0: iExpectedReturnValue[4].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS to PCM16 Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0146::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0147::CTest_MMF_ACOD_U_0147() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0147-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x400; sl@0: iExpectedDstBytesAdded[i] = 0xF90; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS to PCM16 Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0147::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KStereoAdpcmToPCM16OptimumSrc, KStereoAdpcmToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0148::CTest_MMF_ACOD_U_0148() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0148-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS to PCM16 Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0148::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TUint src = (KStereoAdpcmToPCM16OptimumSrc/4) + 10; sl@0: sl@0: INFO_PRINTF1(_L(">> The IMAS to PCM16 codec stores data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, src, KStereoAdpcmToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0149::CTest_MMF_ACOD_U_0149() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0149-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAS Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.18 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0149::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodeIMAS)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0150::CTest_MMF_ACOD_U_0150() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0150-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAS Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.18 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0150::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0151::CTest_MMF_ACOD_U_0151() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0151-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 50; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS to PCM16 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0151::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToStereoAdpcmOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0152::CTest_MMF_ACOD_U_0152() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0152-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAS Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0152::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToStereoAdpcmOptimumSrc, KSmallBufferSize)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0153::CTest_MMF_ACOD_U_0153() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0153-HP"); sl@0: iHeapSize = 0x20000; sl@0: iExpectedReturnValue[0].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[1].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[2].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: iExpectedReturnValue[4].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAS Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0153::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0154::CTest_MMF_ACOD_U_0154() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0154-HP"); sl@0: sl@0: iExpectedReturnValue[0].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[1].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[2].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessComplete; sl@0: iExpectedReturnValue[4].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAS Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0154::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0155::CTest_MMF_ACOD_U_0155() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0155-HP"); sl@0: sl@0: iExpectedReturnValue[0].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[1].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[2].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessComplete; sl@0: iExpectedReturnValue[4].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAS Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0155::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0156::CTest_MMF_ACOD_U_0156() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0156-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0xF90; sl@0: iExpectedDstBytesAdded[i] = 0x400; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAS Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0156::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToStereoAdpcmOptimumSrc, KPCM16ToStereoAdpcmOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0157::CTest_MMF_ACOD_U_0157() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0157-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAS Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0157::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TUint src = (KPCM16ToStereoAdpcmOptimumSrc/4) + 10; sl@0: sl@0: INFO_PRINTF1(_L(">> The PCM16 to IMAS codec stores data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, src, KPCM16ToStereoAdpcmOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0158::CTest_MMF_ACOD_U_0158() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0158-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 to PCM16 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.19 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0158::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodeGSM610, KMMFFourCCCodePCM16)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0159::CTest_MMF_ACOD_U_0159() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0159-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 to PCM16 Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.19 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0159::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecGSM610ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0160::CTest_MMF_ACOD_U_0160() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0160-HP"); sl@0: iHeapSize = 0x200000; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 to PCM16 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0160::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecGSM610ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSizeGSM, KGSM610ToPCM16OptimumDstGSM, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0161::CTest_MMF_ACOD_U_0161() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0161-HP"); sl@0: iHeapSize = 0x20000; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 to PCM16 Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0161::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecGSM610ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KGSM610ToPCM16OptimumSrcGSM, KSmallBufferSizeGSM, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0162::CTest_MMF_ACOD_U_0162() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0162-HP"); sl@0: iHeapSize = 0x20000; sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 to PCM16 Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0162::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecGSM610ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0163::CTest_MMF_ACOD_U_0163() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0163-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 to PCM16 Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0163::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecGSM610ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0164::CTest_MMF_ACOD_U_0164() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0164-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 to PCM16 Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0164::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecGSM610ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0165::CTest_MMF_ACOD_U_0165() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0165-HP"); sl@0: iSingleIteration = ETrue; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0x104; sl@0: iExpectedDstBytesAdded[i] = 0xA00; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 to PCM16 Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0165::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecGSM610ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KGSM610ToPCM16OptimumSrc, KGSM610ToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0166::CTest_MMF_ACOD_U_0166() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0166-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 to PCM16 Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0166::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecGSM610ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TUint src = (KGSM610ToPCM16OptimumSrc/4) + 10; sl@0: sl@0: INFO_PRINTF1(_L(">> The GSM610 to PCM16 codec stores data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, src, KGSM610ToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0167::CTest_MMF_ACOD_U_0167() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0167-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to GSM610 Instantiate codec by FourCC Codes sl@0: * @test Req. under test REQ172.6.2, REQ172.11.20 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0167::DoTestStepL() sl@0: { sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodeGSM610)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0168::CTest_MMF_ACOD_U_0168() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0168-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to GSM610 Instantiate codec by UID sl@0: * @test Req. under test REQ172.6.1, REQ172.11.20 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0168::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToGSM610}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestNewL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0169::CTest_MMF_ACOD_U_0169() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0169-HP"); sl@0: iHeapSize = 0x20000; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 to PCM16 Pass in small source buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0169::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToGSM610}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSizeGSM, KPCM16ToGSM610OptimumDstGSM, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0170::CTest_MMF_ACOD_U_0170() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0170-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to GSM610 Pass in small dest buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0170::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToGSM610}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToGSM610OptimumSrc, KSmallBufferSize, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0171::CTest_MMF_ACOD_U_0171() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0171-HP"); sl@0: iHeapSize = 0x20000; sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to GSM610 Pass in large buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0171::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToGSM610}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0172::CTest_MMF_ACOD_U_0172() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0172-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to GSM610 Pass in default sized buffers sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0172::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToGSM610}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize, 0, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0173::CTest_MMF_ACOD_U_0173() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0173-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to GSM610 Pass in buffers with different max length and length sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0173::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToGSM610}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize, EFalse)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0174::CTest_MMF_ACOD_U_0174() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0174-HP"); sl@0: iSingleIteration = ETrue; sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0xA00; sl@0: iExpectedDstBytesAdded[i] = 0x104; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to GSM610 Pass in buffers of optimum size sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0174::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToGSM610}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToGSM610OptimumSrc, KPCM16ToGSM610OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0175::CTest_MMF_ACOD_U_0175() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0175-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to GSM610 Reposition source pointer during conversion sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0175::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToGSM610}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TUint src = (KPCM16ToGSM610OptimumSrc/4) + 10; sl@0: sl@0: INFO_PRINTF1(_L(">> The PCM16 to GSM610 codec stores data between calls to ProcessL")); sl@0: TRAPD(err, testOK = TestRepositionL(codecUid, src, KPCM16ToGSM610OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0176::CTest_MMF_ACOD_U_0176() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0176-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * Instantiate codec that doesn't exist sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0176::DoTestStepL() sl@0: { sl@0: // CMMFCodec* codec = NULL; sl@0: // TRAPD(err, codec = CMMFCodec::NewL(KMMFFourCCCodeALAW, KMMFFourCCCodePCMU16B)); sl@0: TRAPD(err, CMMFCodec::NewL(KMMFFourCCCodeALAW, KMMFFourCCCodePCMU16B)); // EABI warning removal - "variable was set but never used" sl@0: sl@0: if (err == KErrNone || err == KErrNotSupported) sl@0: return EPass; sl@0: else sl@0: { sl@0: ERR_PRINTF2(_L(">> CTest_MMF_ACOD_U_0176::DoTestStepL Leave occurred in NewL, error code %d"), err); sl@0: return EFail; sl@0: } sl@0: } sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0177::CTest_MMF_ACOD_U_0177() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0177-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * Instantiate codec from fourCC codes that don't exist sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0177::DoTestStepL() sl@0: { sl@0: const TUint32 KFourCCCodeP1B = 0x42315020; //(' ', 'P', '1', 'B') sl@0: const TUint32 KFourCCCodePS16 = 0x36315350; //('P', 'S', '1', '6') sl@0: sl@0: // CMMFCodec* codec = NULL; sl@0: // TRAPD(err, codec = CMMFCodec::NewL(KFourCCCodeP1B, KFourCCCodePS16)); sl@0: TRAPD(err, CMMFCodec::NewL(KFourCCCodeP1B, KFourCCCodePS16)); // EABI warning removal "variable was set but never used" sl@0: sl@0: if (err == KErrNone || err == KErrNotSupported) sl@0: return EPass; sl@0: else sl@0: { sl@0: ERR_PRINTF2(_L(">> CTest_MMF_ACOD_U_0177::DoTestStepL Leave occurred in NewL, error code %d"), err); sl@0: return EFail; sl@0: } sl@0: } sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0178::CTest_MMF_ACOD_U_0178() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0178-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * Test out of memory in NewL sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0178::DoTestStepL() sl@0: { sl@0: // CMMFCodec* codec = NULL; sl@0: __UHEAP_FAILNEXT(1); sl@0: // TRAPD(err, codec = CMMFCodec::NewL(KMMFFourCCCodePCMU8, KMMFFourCCCodePCM16)); sl@0: TRAPD(err, CMMFCodec::NewL(KMMFFourCCCodePCMU8, KMMFFourCCCodePCM16)); // EABI warning removal - "variable was set but never used" sl@0: sl@0: if (err == KErrNoMemory) sl@0: return EPass; sl@0: else sl@0: { sl@0: ERR_PRINTF2(_L(">> CTest_MMF_ACOD_U_0178::DoTestStepL Leave occurred in NewL, error code %d"), err); sl@0: return EFail; sl@0: } sl@0: } sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0179::CTest_MMF_ACOD_U_0179() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0179-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0179::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAlawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KAlawToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0180::CTest_MMF_ACOD_U_0180() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0180-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0180::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAlawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KAlawToPCM16OptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0181::CTest_MMF_ACOD_U_0181() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0181-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0181::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAlawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0182::CTest_MMF_ACOD_U_0182() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0182-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0182::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAlawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0183::CTest_MMF_ACOD_U_0183() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0183-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * ALAW To PCM16 Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0183::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAlawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0184::CTest_MMF_ACOD_U_0184() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0184-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to ALAW Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0184::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToAlaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToAlawOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0185::CTest_MMF_ACOD_U_0185() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0185-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to ALAW Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0185::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToAlaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToAlawOptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0186::CTest_MMF_ACOD_U_0186() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0186-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to ALAW Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0186::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToAlaw}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0187::CTest_MMF_ACOD_U_0187() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0187-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to ALAW Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0187::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToAlaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0188::CTest_MMF_ACOD_U_0188() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0188-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to ALAW Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0188::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToAlaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0189::CTest_MMF_ACOD_U_0189() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0189-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0189::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM8ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM8ToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0190::CTest_MMF_ACOD_U_0190() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0190-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0190::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM8ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM8ToPCM16OptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0191::CTest_MMF_ACOD_U_0191() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0191-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0191::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM8ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0192::CTest_MMF_ACOD_U_0192() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0192-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0192::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM8ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0193::CTest_MMF_ACOD_U_0193() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0193-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM8 To PCM16 Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0193::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM8ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0194::CTest_MMF_ACOD_U_0194() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0194-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCM8 Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0194::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToPCM8OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0195::CTest_MMF_ACOD_U_0195() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0195-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCM8 Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0195::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCM8OptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0196::CTest_MMF_ACOD_U_0196() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0196-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCM8 Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0196::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0197::CTest_MMF_ACOD_U_0197() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0197-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCM8 Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0197::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0198::CTest_MMF_ACOD_U_0198() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0198-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCM8 Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0198::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0199::CTest_MMF_ACOD_U_0199() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0199-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * Swap Endian Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0199::DoTestStepL() sl@0: { sl@0: //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian}; sl@0: const TUid codecUid = {KMMFUidCodecPCM16toPCM16B}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToPCM16BOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0200::CTest_MMF_ACOD_U_0200() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0200-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * Swap Endian Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0200::DoTestStepL() sl@0: { sl@0: //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian}; sl@0: const TUid codecUid = {KMMFUidCodecPCM16toPCM16B}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCM16BOptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0201::CTest_MMF_ACOD_U_0201() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0201-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * Swap Endian Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0201::DoTestStepL() sl@0: { sl@0: //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian}; sl@0: const TUid codecUid = {KMMFUidCodecPCM16toPCM16B}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0202::CTest_MMF_ACOD_U_0202() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0202-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * Swap Endian Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0202::DoTestStepL() sl@0: { sl@0: //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian}; sl@0: const TUid codecUid = {KMMFUidCodecPCM16toPCM16B}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0203::CTest_MMF_ACOD_U_0203() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0203-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * Swap Endian Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0203::DoTestStepL() sl@0: { sl@0: //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian}; sl@0: const TUid codecUid = {KMMFUidCodecPCM16toPCM16B}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0204::CTest_MMF_ACOD_U_0204() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0204-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU16BE Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0204::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToPCMU16BOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0205::CTest_MMF_ACOD_U_0205() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0205-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU16BE Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0205::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU16BOptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0206::CTest_MMF_ACOD_U_0206() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0206-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU16BE Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0206::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0207::CTest_MMF_ACOD_U_0207() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0207-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU16BE Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0207::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0208::CTest_MMF_ACOD_U_0208() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0208-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU16BE Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0208::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0209::CTest_MMF_ACOD_U_0209() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0209-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU16 Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0209::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToPCMU16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0210::CTest_MMF_ACOD_U_0210() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0210-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU16 Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0210::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU16OptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0211::CTest_MMF_ACOD_U_0211() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0211-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU16 Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0211::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0212::CTest_MMF_ACOD_U_0212() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0212-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU16 Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0212::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0213::CTest_MMF_ACOD_U_0213() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0213-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU16 Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0213::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0214::CTest_MMF_ACOD_U_0214() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0214-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU8 Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0214::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToPCMU8OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0215::CTest_MMF_ACOD_U_0215() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0215-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU8 Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0215::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU8OptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0216::CTest_MMF_ACOD_U_0216() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0216-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU8 Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0216::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0217::CTest_MMF_ACOD_U_0217() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0217-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU8 Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0217::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0218::CTest_MMF_ACOD_U_0218() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0218-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to PCMU8 Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0218::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0219::CTest_MMF_ACOD_U_0219() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0219-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16BE to PCM16 Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0219::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCMU16BToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0220::CTest_MMF_ACOD_U_0220() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0220-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16BE to PCM16 Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0220::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU16BToPCM16OptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0221::CTest_MMF_ACOD_U_0221() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0221-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16BE to PCM16 Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0221::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0222::CTest_MMF_ACOD_U_0222() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0222-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16BE to PCM16 Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0222::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0223::CTest_MMF_ACOD_U_0223() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0223-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16BE to PCM16 Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0223::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0224::CTest_MMF_ACOD_U_0224() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0224-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 to PCM16 Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0224::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCMU16ToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0225::CTest_MMF_ACOD_U_0225() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0225-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 to PCM16 Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0225::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU16ToPCM16OptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0226::CTest_MMF_ACOD_U_0226() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0226-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 to PCM16 Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0226::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0227::CTest_MMF_ACOD_U_0227() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0227-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 to PCM16 Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0227::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0228::CTest_MMF_ACOD_U_0228() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0228-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU16 to PCM16 Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0228::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0229::CTest_MMF_ACOD_U_0229() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0229-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0229::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCMU8ToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0230::CTest_MMF_ACOD_U_0230() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0230-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0230::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU8ToPCM16OptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0231::CTest_MMF_ACOD_U_0231() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0231-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0231::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0232::CTest_MMF_ACOD_U_0232() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0232-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0232::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0233::CTest_MMF_ACOD_U_0233() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0233-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCMU8 To PCM16 Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0233::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0234::CTest_MMF_ACOD_U_0234() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0234-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0234::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecMulawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KMulawToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0235::CTest_MMF_ACOD_U_0235() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0235-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0235::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecMulawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMulawToPCM16OptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0236::CTest_MMF_ACOD_U_0236() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0236-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0236::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecMulawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0237::CTest_MMF_ACOD_U_0237() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0237-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0237::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecMulawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0238::CTest_MMF_ACOD_U_0238() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0238-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * MULAW To PCM16 Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0238::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecMulawToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0239::CTest_MMF_ACOD_U_0239() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0239-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to MULAW Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0239::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToMulaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToMulawOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0240::CTest_MMF_ACOD_U_0240() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0240-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to MULAW Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0240::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToMulaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToMulawOptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0241::CTest_MMF_ACOD_U_0241() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0241-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to MULAW Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0241::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToMulaw}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0242::CTest_MMF_ACOD_U_0242() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0242-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to MULAW Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0242::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToMulaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0243::CTest_MMF_ACOD_U_0243() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0243-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to MULAW Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0243::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToMulaw}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0244::CTest_MMF_ACOD_U_0244() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0244-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD To PCM16 Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0244::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KAdpcmToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0245::CTest_MMF_ACOD_U_0245() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0245-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD To PCM16 Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0245::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KAdpcmToPCM16OptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0246::CTest_MMF_ACOD_U_0246() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0246-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD To PCM16 Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0246::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0247::CTest_MMF_ACOD_U_0247() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0247-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD To PCM16 Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0247::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0248::CTest_MMF_ACOD_U_0248() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0248-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAD To PCM16 Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0248::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0249::CTest_MMF_ACOD_U_0249() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0249-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAD Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0249::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToAdpcmOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0250::CTest_MMF_ACOD_U_0250() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0250-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAD Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0250::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToAdpcmOptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0251::CTest_MMF_ACOD_U_0251() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0251-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAD Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0251::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0252::CTest_MMF_ACOD_U_0252() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0252-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAD Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0252::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0253::CTest_MMF_ACOD_U_0253() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0253-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAD Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0253::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0254::CTest_MMF_ACOD_U_0254() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0254-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS To PCM16 Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0254::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KStereoAdpcmToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0255::CTest_MMF_ACOD_U_0255() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0255-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS To PCM16 Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0255::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KStereoAdpcmToPCM16OptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0256::CTest_MMF_ACOD_U_0256() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0256-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS To PCM16 Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0256::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0257::CTest_MMF_ACOD_U_0257() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0257-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS To PCM16 Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0257::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0258::CTest_MMF_ACOD_U_0258() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0258-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * IMAS To PCM16 Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0258::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0259::CTest_MMF_ACOD_U_0259() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0259-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAS Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0259::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToStereoAdpcmOptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0260::CTest_MMF_ACOD_U_0260() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0260-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAS Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0260::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToStereoAdpcmOptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0261::CTest_MMF_ACOD_U_0261() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0261-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAS Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0261::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0262::CTest_MMF_ACOD_U_0262() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0262-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAS Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0262::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0263::CTest_MMF_ACOD_U_0263() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0263-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to IMAS Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0263::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0264::CTest_MMF_ACOD_U_0264() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0264-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 To PCM16 Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0264::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecGSM610ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KGSM610ToPCM16OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0265::CTest_MMF_ACOD_U_0265() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0265-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 To PCM16 Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0265::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecGSM610ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KGSM610ToPCM16OptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0266::CTest_MMF_ACOD_U_0266() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0266-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 To PCM16 Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0266::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecGSM610ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0267::CTest_MMF_ACOD_U_0267() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0267-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 To PCM16 Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0267::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecGSM610ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0268::CTest_MMF_ACOD_U_0268() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0268-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * GSM610 To PCM16 Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0268::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecGSM610ToPCM16}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0269::CTest_MMF_ACOD_U_0269() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0269-HP"); sl@0: sl@0: for (TUint i=0; i<5; i++) sl@0: { sl@0: iExpectedSrcBytesProcessed[i] = 0; sl@0: iExpectedDstBytesAdded[i] = 0; sl@0: iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled; sl@0: } sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to GSM610 Pass in zero sized source buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0269::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToGSM610}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToGSM610OptimumDst)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0270::CTest_MMF_ACOD_U_0270() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0270-HP"); sl@0: sl@0: iExpectedLeaveErrorCode = KErrArgument; sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to GSM610 Pass in zero sized destination buffer sl@0: * @test Req. under test REQ172.6.4, REQ172.6.5 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0270::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToGSM610}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToGSM610OptimumSrc, 0)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0271::CTest_MMF_ACOD_U_0271() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0271-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to GSM610 Test out of memory sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0271::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToGSM610}; sl@0: TBool testOK = EFalse; sl@0: sl@0: TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid)); sl@0: if (err==KErrNone && testOK) sl@0: TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0272::CTest_MMF_ACOD_U_0272() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0272-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to GSM610 Test for memory leaks sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0272::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToGSM610}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryLeakL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: sl@0: /** @xxxx sl@0: * Constructor sl@0: */ sl@0: CTest_MMF_ACOD_U_0273::CTest_MMF_ACOD_U_0273() sl@0: { sl@0: // store the name of this test case sl@0: // this is the name that is used by the script file sl@0: // Each test step initialises it's own name sl@0: iTestStepName = _L("MM-MMF-ACOD-U-0273-HP"); sl@0: } sl@0: sl@0: /** @xxxx sl@0: * PCM16 to GSM610 Test for memory scribbles sl@0: * @test Req. under test REQ172.11 sl@0: */ sl@0: TVerdict CTest_MMF_ACOD_U_0273::DoTestStepL() sl@0: { sl@0: const TUid codecUid = {KMmfUidCodecPCM16ToGSM610}; sl@0: TBool testOK = EFalse; sl@0: TRAPD(err, testOK = TestMemoryScribbleL(codecUid)); sl@0: sl@0: if (err) sl@0: { sl@0: INFO_PRINTF2(_L("Test left with status %d"), err); sl@0: return EFail; sl@0: } sl@0: else if (!testOK) sl@0: { sl@0: INFO_PRINTF1(_L("Test failed")); sl@0: return EFail; sl@0: } sl@0: else sl@0: return EPass; sl@0: } sl@0: sl@0: //------------------------------------------------------------------ sl@0: