1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfunittest/ACOD/TSU_MMF_ACOD.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,12785 @@
1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +// EPOC includes
1.20 +#include <e32base.h>
1.21 +
1.22 +// Test system includes
1.23 +#include "TSU_MMF_ACOD.h"
1.24 +#include "TSU_MMF_ACODSuite.h"
1.25 +
1.26 +#include <f32file.h>
1.27 +#include <s32file.h>
1.28 +#include <mmf/plugin/mmfcodecimplementationuids.hrh>
1.29 +
1.30 +#ifdef __WINS__
1.31 +//wins directories
1.32 +_LIT(KSourceFilesDir, "c:\\mm\\mmf\\testfiles\\acod\\");
1.33 +_LIT(KComparisonFilesDir, "c:\\mm\\mmf\\ref\\acod\\");
1.34 +#else
1.35 +/*
1.36 +arm4 directories
1.37 +All source and comparison files need to be copied manually onto the flash card.
1.38 +This code assumes the flash card is represented by drive E: on the target board.
1.39 +If this is not the case, the KSourceFilesDir and KComparisonFilesDir strings
1.40 +need to be changed accordingly.
1.41 +*/
1.42 +_LIT(KSourceFilesDir, "e:\\");
1.43 +_LIT(KComparisonFilesDir, "e:\\");
1.44 +#endif
1.45 +
1.46 +//8KHz source files
1.47 +_LIT(KPCM16SourceFile,"PCM16Source.raw");
1.48 +_LIT(KPCM16BSourceFile,"PCM16BSource.raw");
1.49 +_LIT(KPCMU16SourceFile,"PCMU16Source.raw");
1.50 +_LIT(KPCMU16BSourceFile,"PCMU16BSource.raw");
1.51 +_LIT(KStereoPCM16SourceFile,"StereoPCM16Source.raw");
1.52 +_LIT(KPCM8SourceFile,"PCM8Source.raw");
1.53 +_LIT(KPCMU8SourceFile,"PCMU8Source.raw");
1.54 +_LIT(KAlawSourceFile,"AlawSource.raw");
1.55 +_LIT(KMulawSourceFile,"MulawSource.raw");
1.56 +_LIT(KAdpcmSourceFile,"AdpcmSource.raw");
1.57 +_LIT(KStereoAdpcmSourceFile,"StereoAdpcmSource.raw");
1.58 +_LIT(KGSM610SourceFile,"GSM610Source.raw");
1.59 +
1.60 +//comparison files
1.61 +_LIT(KAlawToPCM16ComparisonFile,"AlawToPCM16Comparison.raw");
1.62 +_LIT(KPCM16ToAlawComparisonFile,"PCM16ToAlawComparison.raw");
1.63 +_LIT(KPCM8ToPCM16ComparisonFile,"PCM8ToPCM16Comparison.raw");
1.64 +_LIT(KPCM16ToPCM8ComparisonFile,"PCM16ToPCM8Comparison.raw");
1.65 +_LIT(KPCM16ToPCM16BComparisonFile,"PCM16ToPCM16BComparison.raw");
1.66 +_LIT(KPCM16BToPCM16ComparisonFile,"PCM16BToPCM16Comparison.raw");
1.67 +_LIT(KPCMU16ToPCMU16BComparisonFile,"PCMU16ToPCMU16BComparison.raw");
1.68 +_LIT(KPCMU16BToPCMU16ComparisonFile,"PCMU16BToPCMU16Comparison.raw");
1.69 +_LIT(KPCM16ToPCMU16BComparisonFile,"PCM16ToPCMU16BComparison.raw");
1.70 +_LIT(KPCMU16BToPCM16ComparisonFile,"PCMU16BToPCM16Comparison.raw");
1.71 +_LIT(KPCM16ToPCMU16ComparisonFile,"PCM16ToPCMU16Comparison.raw");
1.72 +_LIT(KPCMU16ToPCM16ComparisonFile,"PCMU16ToPCM16Comparison.raw");
1.73 +_LIT(KPCM16ToPCMU8ComparisonFile,"PCM16ToPCMU8Comparison.raw");
1.74 +_LIT(KPCMU8ToPCM16ComparisonFile,"PCMU8ToPCM16Comparison.raw");
1.75 +_LIT(KAdpcmToPCM16ComparisonFile,"AdpcmToPCM16Comparison.raw");
1.76 +_LIT(KPCM16ToAdpcmComparisonFile,"PCM16ToAdpcmComparison.raw");
1.77 +_LIT(KMulawToPCM16ComparisonFile,"MulawToPCM16Comparison.raw");
1.78 +_LIT(KPCM16ToMulawComparisonFile,"PCM16ToMulawComparison.raw");
1.79 +_LIT(KStereoAdpcmToPCM16ComparisonFile,"StereoAdpcmToPCM16Comparison.raw");
1.80 +_LIT(KPCM16ToStereoAdpcmComparisonFile,"PCM16ToStereoAdpcmComparison.raw");
1.81 +_LIT(KGSM610ToPCM16ComparisonFile,"GSM610ToPCM16Comparison.raw");
1.82 +_LIT(KPCM16ToGSM610ComparisonFile,"PCM16ToGSM610Comparison.raw");
1.83 +
1.84 +_LIT(KPreferredSupplierSourceFile,"AAAASource.raw");
1.85 +_LIT(KPreferredSupplierComparisonFile,"AAAABBBBPrefSuppComparison.raw");
1.86 +_LIT(KPreferredSupplier,"Preferred Supplier Test Codec 1");
1.87 +
1.88 +
1.89 +const TUint32 KMMFFourCCCodeAAAA = 0x41414141; //"AAAA"
1.90 +const TUint32 KMMFFourCCCodeBBBB = 0x42424242; //"BBBB"
1.91 +
1.92 +CTestStep_MMF_ACOD::CTestStep_MMF_ACOD()
1.93 + {
1.94 + iExpectedLeaveErrorCode = KErrNone;
1.95 + iSingleIteration = EFalse;
1.96 + }
1.97 +
1.98 +CTestStep_MMF_ACOD::~CTestStep_MMF_ACOD()
1.99 + {
1.100 + }
1.101 +
1.102 +/** @xxxx
1.103 + * This function gets the correct comparison filename for the codec specified.
1.104 + *
1.105 + * @param "TInt aCodecUID"
1.106 + * Uid of codec.
1.107 + * "TDes& aFilename"
1.108 + * Descriptor to contain the comparison filename string.
1.109 + */
1.110 +void CTestStep_MMF_ACOD::GetComparisonFilenameFromCodecUidL(TInt aCodecUID, TDes& aFilename)
1.111 + {
1.112 + switch(aCodecUID)
1.113 + {
1.114 + case KMmfUidCodecAlawToPCM16:
1.115 + aFilename.Copy(KComparisonFilesDir);
1.116 + aFilename.Append(KAlawToPCM16ComparisonFile);
1.117 + break;
1.118 + case KMmfUidCodecPCM16ToAlaw:
1.119 + aFilename.Copy(KComparisonFilesDir);
1.120 + aFilename.Append(KPCM16ToAlawComparisonFile);
1.121 + break;
1.122 + case KMmfUidCodecPCM8ToPCM16:
1.123 + aFilename.Copy(KComparisonFilesDir);
1.124 + aFilename.Append(KPCM8ToPCM16ComparisonFile);
1.125 + break;
1.126 + case KMmfUidCodecAudioS16ToPCMS8:
1.127 + aFilename.Copy(KComparisonFilesDir);
1.128 + aFilename.Append(KPCM16ToPCM8ComparisonFile);
1.129 + break;
1.130 + //case KMMFUidCodecPCM16SwapEndian:
1.131 + case KMMFUidCodecPCM16toPCM16B:
1.132 + case KMMFUidCodecPCM16BtoPCM16:
1.133 + case KMMFUidCodecPCMU16toPCMU16B:
1.134 + case KMMFUidCodecPCMU16BtoPCMU16:
1.135 + //This file is used for all swap endian tests other than instantiation.
1.136 + //There is no need to test ProcessL for every swap endian combination.
1.137 + aFilename.Copy(KComparisonFilesDir);
1.138 + aFilename.Append(KPCM16ToPCM16BComparisonFile);
1.139 + break;
1.140 + case KMmfUidCodecAudioS16ToPCMU16BE:
1.141 + aFilename.Copy(KComparisonFilesDir);
1.142 + aFilename.Append(KPCM16ToPCMU16BComparisonFile);
1.143 + break;
1.144 + case KMmfUidCodecAudioU16BEToPCMS16:
1.145 + aFilename.Copy(KComparisonFilesDir);
1.146 + aFilename.Append(KPCMU16BToPCM16ComparisonFile);
1.147 + break;
1.148 + case KMmfUidCodecAudioS16ToPCMU16:
1.149 + aFilename.Copy(KComparisonFilesDir);
1.150 + aFilename.Append(KPCM16ToPCMU16ComparisonFile);
1.151 + break;
1.152 + case KMmfUidCodecAudioU16ToPCMS16:
1.153 + aFilename.Copy(KComparisonFilesDir);
1.154 + aFilename.Append(KPCMU16ToPCM16ComparisonFile);
1.155 + break;
1.156 + case KMmfUidCodecAudioS16ToPCMU8:
1.157 + aFilename.Copy(KComparisonFilesDir);
1.158 + aFilename.Append(KPCM16ToPCMU8ComparisonFile);
1.159 + break;
1.160 + case KMmfUidCodecAudioU8ToPCMS16:
1.161 + aFilename.Copy(KComparisonFilesDir);
1.162 + aFilename.Append(KPCMU8ToPCM16ComparisonFile);
1.163 + break;
1.164 + case KMmfUidCodecIMAADPCMToPCM16:
1.165 + aFilename.Copy(KComparisonFilesDir);
1.166 + aFilename.Append(KAdpcmToPCM16ComparisonFile);
1.167 + break;
1.168 + case KMmfUidCodecPCM16ToIMAADPCM:
1.169 + aFilename.Copy(KComparisonFilesDir);
1.170 + aFilename.Append(KPCM16ToAdpcmComparisonFile);
1.171 + break;
1.172 + case KMmfUidCodecMulawToPCM16:
1.173 + aFilename.Copy(KComparisonFilesDir);
1.174 + aFilename.Append(KMulawToPCM16ComparisonFile);
1.175 + break;
1.176 + case KMmfUidCodecPCM16ToMulaw:
1.177 + aFilename.Copy(KComparisonFilesDir);
1.178 + aFilename.Append(KPCM16ToMulawComparisonFile);
1.179 + break;
1.180 + case KMmfUidCodecIMAADPCMToPCM16Stereo:
1.181 + aFilename.Copy(KComparisonFilesDir);
1.182 + aFilename.Append(KStereoAdpcmToPCM16ComparisonFile);
1.183 + break;
1.184 + case KMmfUidCodecPCM16ToIMAADPCMStereo:
1.185 + aFilename.Copy(KComparisonFilesDir);
1.186 + aFilename.Append(KPCM16ToStereoAdpcmComparisonFile);
1.187 + break;
1.188 + case KMmfUidCodecGSM610ToPCM16:
1.189 + aFilename.Copy(KComparisonFilesDir);
1.190 + aFilename.Append(KGSM610ToPCM16ComparisonFile);
1.191 + break;
1.192 + case KMmfUidCodecPCM16ToGSM610:
1.193 + aFilename.Copy(KComparisonFilesDir);
1.194 + aFilename.Append(KPCM16ToGSM610ComparisonFile);
1.195 + break;
1.196 + default:
1.197 + User::Leave(KErrNotSupported);
1.198 + break;
1.199 + }
1.200 + }
1.201 +
1.202 +/** @xxxx
1.203 + * This function gets the correct comparison filename for the fourCC codes specified.
1.204 + *
1.205 + * @param "const TFourCC& aSrcFourCC"
1.206 + * Source fourCC code.
1.207 + * "const TFourCC& aDstFourCC"
1.208 + * Destination fourCC code.
1.209 + * "TDes& aFilename"
1.210 + * Descriptor to contain the comparison filename string.
1.211 + */
1.212 +void CTestStep_MMF_ACOD::GetComparisonFilenameFromFourCCL(const TFourCC& aSrcFourCC, const TFourCC& aDstFourCC, TDes& aFilename)
1.213 + {
1.214 + if (aSrcFourCC == KMMFFourCCCodePCM16)
1.215 + {
1.216 + if (aDstFourCC == KMMFFourCCCodeALAW)
1.217 + {
1.218 + aFilename.Copy(KComparisonFilesDir);
1.219 + aFilename.Append(KPCM16ToAlawComparisonFile);
1.220 + }
1.221 + else if (aDstFourCC == KMMFFourCCCodePCM16B)
1.222 + {
1.223 + aFilename.Copy(KComparisonFilesDir);
1.224 + aFilename.Append(KPCM16ToPCM16BComparisonFile);
1.225 + }
1.226 + else if (aDstFourCC == KMMFFourCCCodePCM8)
1.227 + {
1.228 + aFilename.Copy(KComparisonFilesDir);
1.229 + aFilename.Append(KPCM16ToPCM8ComparisonFile);
1.230 + }
1.231 + else if (aDstFourCC == KMMFFourCCCodePCMU16B)
1.232 + {
1.233 + aFilename.Copy(KComparisonFilesDir);
1.234 + aFilename.Append(KPCM16ToPCMU16BComparisonFile);
1.235 + }
1.236 + else if (aDstFourCC == KMMFFourCCCodePCMU16)
1.237 + {
1.238 + aFilename.Copy(KComparisonFilesDir);
1.239 + aFilename.Append(KPCM16ToPCMU16ComparisonFile);
1.240 + }
1.241 + else if (aDstFourCC == KMMFFourCCCodePCMU8)
1.242 + {
1.243 + aFilename.Copy(KComparisonFilesDir);
1.244 + aFilename.Append(KPCM16ToPCMU8ComparisonFile);
1.245 + }
1.246 + else if (aDstFourCC == KMMFFourCCCodeIMAD)
1.247 + {
1.248 + aFilename.Copy(KComparisonFilesDir);
1.249 + aFilename.Append(KPCM16ToAdpcmComparisonFile);
1.250 + }
1.251 + else if (aDstFourCC == KMMFFourCCCodeMuLAW)
1.252 + {
1.253 + aFilename.Copy(KComparisonFilesDir);
1.254 + aFilename.Append(KPCM16ToMulawComparisonFile);
1.255 + }
1.256 + else if (aDstFourCC == KMMFFourCCCodeIMAS)
1.257 + {
1.258 + aFilename.Copy(KComparisonFilesDir);
1.259 + aFilename.Append(KPCM16ToStereoAdpcmComparisonFile);
1.260 + }
1.261 + else if (aDstFourCC == KMMFFourCCCodeGSM610)
1.262 + {
1.263 + aFilename.Copy(KComparisonFilesDir);
1.264 + aFilename.Append(KPCM16ToGSM610ComparisonFile);
1.265 + }
1.266 + }
1.267 + else if (aDstFourCC == KMMFFourCCCodePCM16)
1.268 + {
1.269 + if (aSrcFourCC == KMMFFourCCCodeALAW)
1.270 + {
1.271 + aFilename.Copy(KComparisonFilesDir);
1.272 + aFilename.Append(KAlawToPCM16ComparisonFile);
1.273 + }
1.274 + if (aSrcFourCC == KMMFFourCCCodePCM8)
1.275 + {
1.276 + aFilename.Copy(KComparisonFilesDir);
1.277 + aFilename.Append(KPCM8ToPCM16ComparisonFile);
1.278 + }
1.279 + if (aSrcFourCC == KMMFFourCCCodePCM16B)
1.280 + {
1.281 + aFilename.Copy(KComparisonFilesDir);
1.282 + aFilename.Append(KPCM16BToPCM16ComparisonFile);
1.283 + }
1.284 + if (aSrcFourCC == KMMFFourCCCodePCMU16B)
1.285 + {
1.286 + aFilename.Copy(KComparisonFilesDir);
1.287 + aFilename.Append(KPCMU16BToPCM16ComparisonFile);
1.288 + }
1.289 + if (aSrcFourCC == KMMFFourCCCodePCMU16)
1.290 + {
1.291 + aFilename.Copy(KComparisonFilesDir);
1.292 + aFilename.Append(KPCMU16ToPCM16ComparisonFile);
1.293 + }
1.294 + if (aSrcFourCC == KMMFFourCCCodePCMU8)
1.295 + {
1.296 + aFilename.Copy(KComparisonFilesDir);
1.297 + aFilename.Append(KPCMU8ToPCM16ComparisonFile);
1.298 + }
1.299 + if (aSrcFourCC == KMMFFourCCCodeIMAD)
1.300 + {
1.301 + aFilename.Copy(KComparisonFilesDir);
1.302 + aFilename.Append(KAdpcmToPCM16ComparisonFile);
1.303 + }
1.304 + if (aSrcFourCC == KMMFFourCCCodeMuLAW)
1.305 + {
1.306 + aFilename.Copy(KComparisonFilesDir);
1.307 + aFilename.Append(KMulawToPCM16ComparisonFile);
1.308 + }
1.309 + if (aSrcFourCC == KMMFFourCCCodeIMAS)
1.310 + {
1.311 + aFilename.Copy(KComparisonFilesDir);
1.312 + aFilename.Append(KStereoAdpcmToPCM16ComparisonFile);
1.313 + }
1.314 + if (aSrcFourCC == KMMFFourCCCodeGSM610)
1.315 + {
1.316 + aFilename.Copy(KComparisonFilesDir);
1.317 + aFilename.Append(KGSM610ToPCM16ComparisonFile);
1.318 + }
1.319 + }
1.320 + else if ((aSrcFourCC == KMMFFourCCCodePCMU16) &&
1.321 + (aDstFourCC == KMMFFourCCCodePCMU16B))
1.322 + {
1.323 + aFilename.Copy(KComparisonFilesDir);
1.324 + aFilename.Append(KPCMU16ToPCMU16BComparisonFile);
1.325 + }
1.326 + else if ((aSrcFourCC == KMMFFourCCCodePCMU16B) &&
1.327 + (aDstFourCC == KMMFFourCCCodePCMU16))
1.328 + {
1.329 + aFilename.Copy(KComparisonFilesDir);
1.330 + aFilename.Append(KPCMU16BToPCMU16ComparisonFile);
1.331 + }
1.332 + else
1.333 + User::Leave(KErrNotSupported);
1.334 + }
1.335 +
1.336 +/** @xxxx
1.337 + * This function gets the correct source filename for the codec specified.
1.338 + *
1.339 + * @param "TInt aCodecUID"
1.340 + * Uid of codec.
1.341 + * "TDes& aFilename"
1.342 + * Descriptor to contain the source filename string.
1.343 + */
1.344 +void CTestStep_MMF_ACOD::GetSourceFilenameFromCodecUidL(TInt aCodecUID, TDes& aFilename)
1.345 + {
1.346 + switch(aCodecUID)
1.347 + {
1.348 + case KMmfUidCodecAlawToPCM16:
1.349 + aFilename.Copy(KSourceFilesDir);
1.350 + aFilename.Append(KAlawSourceFile);
1.351 + break;
1.352 + case KMmfUidCodecPCM16ToAlaw:
1.353 + aFilename.Copy(KSourceFilesDir);
1.354 + aFilename.Append(KPCM16SourceFile);
1.355 + break;
1.356 + case KMmfUidCodecPCM8ToPCM16:
1.357 + aFilename.Copy(KSourceFilesDir);
1.358 + aFilename.Append(KPCM8SourceFile);
1.359 + break;
1.360 + case KMmfUidCodecAudioS16ToPCMS8:
1.361 + aFilename.Copy(KSourceFilesDir);
1.362 + aFilename.Append(KPCM16SourceFile);
1.363 + break;
1.364 + //case KMMFUidCodecPCM16SwapEndian:
1.365 + case KMMFUidCodecPCM16toPCM16B:
1.366 + case KMMFUidCodecPCM16BtoPCM16:
1.367 + case KMMFUidCodecPCMU16toPCMU16B:
1.368 + case KMMFUidCodecPCMU16BtoPCMU16:
1.369 + //this file is used for all swap endian tests other than instantiation.
1.370 + //there is no need to test ProcessL for every swap endian combination.
1.371 + aFilename.Copy(KSourceFilesDir);
1.372 + aFilename.Append(KPCM16SourceFile);
1.373 + break;
1.374 + case KMmfUidCodecAudioS16ToPCMU16BE:
1.375 + aFilename.Copy(KSourceFilesDir);
1.376 + aFilename.Append(KPCM16SourceFile);
1.377 + break;
1.378 + case KMmfUidCodecAudioU16BEToPCMS16:
1.379 + aFilename.Copy(KSourceFilesDir);
1.380 + aFilename.Append(KPCMU16BSourceFile);
1.381 + break;
1.382 + case KMmfUidCodecAudioS16ToPCMU16:
1.383 + aFilename.Copy(KSourceFilesDir);
1.384 + aFilename.Append(KPCM16SourceFile);
1.385 + break;
1.386 + case KMmfUidCodecAudioU16ToPCMS16:
1.387 + aFilename.Copy(KSourceFilesDir);
1.388 + aFilename.Append(KPCMU16SourceFile);
1.389 + break;
1.390 + case KMmfUidCodecAudioS16ToPCMU8:
1.391 + aFilename.Copy(KSourceFilesDir);
1.392 + aFilename.Append(KPCM16SourceFile);
1.393 + break;
1.394 + case KMmfUidCodecAudioU8ToPCMS16:
1.395 + aFilename.Copy(KSourceFilesDir);
1.396 + aFilename.Append(KPCMU8SourceFile);
1.397 + break;
1.398 + case KMmfUidCodecIMAADPCMToPCM16:
1.399 + aFilename.Copy(KSourceFilesDir);
1.400 + aFilename.Append(KAdpcmSourceFile);
1.401 + break;
1.402 + case KMmfUidCodecPCM16ToIMAADPCM:
1.403 + aFilename.Copy(KSourceFilesDir);
1.404 + aFilename.Append(KPCM16SourceFile);
1.405 + break;
1.406 + case KMmfUidCodecMulawToPCM16:
1.407 + aFilename.Copy(KSourceFilesDir);
1.408 + aFilename.Append(KMulawSourceFile);
1.409 + break;
1.410 + case KMmfUidCodecPCM16ToMulaw:
1.411 + aFilename.Copy(KSourceFilesDir);
1.412 + aFilename.Append(KPCM16SourceFile);
1.413 + break;
1.414 + case KMmfUidCodecIMAADPCMToPCM16Stereo:
1.415 + aFilename.Copy(KSourceFilesDir);
1.416 + aFilename.Append(KStereoAdpcmSourceFile);
1.417 + break;
1.418 + case KMmfUidCodecPCM16ToIMAADPCMStereo:
1.419 + aFilename.Copy(KSourceFilesDir);
1.420 + aFilename.Append(KStereoPCM16SourceFile);
1.421 + break;
1.422 + case KMmfUidCodecGSM610ToPCM16:
1.423 + aFilename.Copy(KSourceFilesDir);
1.424 + aFilename.Append(KGSM610SourceFile);
1.425 + break;
1.426 + case KMmfUidCodecPCM16ToGSM610:
1.427 + aFilename.Copy(KSourceFilesDir);
1.428 + aFilename.Append(KPCM16SourceFile);
1.429 + break;
1.430 + default:
1.431 + User::Leave(KErrNotSupported);
1.432 + break;
1.433 + }
1.434 + }
1.435 +
1.436 +/** @xxxx
1.437 + * This function gets the correct source filename for the fourCC codes specified.
1.438 + *
1.439 + * @param "const TFourCC& aSrcFourCC"
1.440 + * Source fourCC code.
1.441 + * "const TFourCC& aDstFourCC"
1.442 + * Destination fourCC code.
1.443 + * "TDes& aFilename"
1.444 + * Descriptor to contain the source filename string.
1.445 + */
1.446 +void CTestStep_MMF_ACOD::GetSourceFilenameFromFourCCL(const TFourCC& aSrcFourCC, const TFourCC& aDstFourCC, TDes& aFilename)
1.447 + {
1.448 + aFilename.Copy(KSourceFilesDir);
1.449 + if (aSrcFourCC == KMMFFourCCCodePCM16)
1.450 + {
1.451 + if (aDstFourCC == KMMFFourCCCodeIMAS)
1.452 + aFilename.Append(KStereoPCM16SourceFile);
1.453 + else
1.454 + aFilename.Append(KPCM16SourceFile);
1.455 + }
1.456 + else if (aSrcFourCC == KMMFFourCCCodeALAW)
1.457 + aFilename.Append(KAlawSourceFile);
1.458 + else if (aSrcFourCC == KMMFFourCCCodePCM8)
1.459 + aFilename.Append(KPCM8SourceFile);
1.460 + else if (aSrcFourCC == KMMFFourCCCodePCM16B)
1.461 + aFilename.Append(KPCM16BSourceFile);
1.462 + else if (aSrcFourCC == KMMFFourCCCodePCMU16B)
1.463 + aFilename.Append(KPCMU16BSourceFile);
1.464 + else if (aSrcFourCC == KMMFFourCCCodePCMU16)
1.465 + aFilename.Append(KPCMU16SourceFile);
1.466 + else if (aSrcFourCC == KMMFFourCCCodePCMU8)
1.467 + aFilename.Append(KPCMU8SourceFile);
1.468 + else if (aSrcFourCC == KMMFFourCCCodeIMAD)
1.469 + aFilename.Append(KAdpcmSourceFile);
1.470 + else if (aSrcFourCC == KMMFFourCCCodeMuLAW)
1.471 + aFilename.Append(KMulawSourceFile);
1.472 + else if (aSrcFourCC == KMMFFourCCCodeIMAS)
1.473 + aFilename.Append(KStereoAdpcmSourceFile);
1.474 + else if (aSrcFourCC == KMMFFourCCCodeGSM610)
1.475 + aFilename.Append(KGSM610SourceFile);
1.476 + else
1.477 + User::Leave(KErrNotSupported);
1.478 + }
1.479 +
1.480 +/** @xxxx
1.481 + * This function checks the data in iOutputDataBuffer against data in a comparison
1.482 + * file.
1.483 + *
1.484 + * @param "const TDesC& aFilename"
1.485 + * Full path of the comparison file to compare against.
1.486 + * "TUint aPosition"
1.487 + * File position from which to read the comparison data.
1.488 + * @return "TBool"
1.489 + * ETrue if the output is the same as the comparison data
1.490 + * EFalse if the output is different to the comparison data
1.491 +*/
1.492 +TBool CTestStep_MMF_ACOD::CheckOutputAgainstComparisonFileL(const TDesC& aFilename, TUint aPosition)
1.493 + {
1.494 + RFs fs;
1.495 + User::LeaveIfError(fs.Connect());
1.496 + CleanupClosePushL(fs);
1.497 +
1.498 + RFile file;
1.499 + User::LeaveIfError(file.Open(fs, aFilename, EFileRead|EFileShareAny));
1.500 + CleanupClosePushL(file);
1.501 +
1.502 + RFileReadStream fileReadStream(file, aPosition);
1.503 + CleanupClosePushL(fileReadStream);
1.504 +
1.505 + //read data from comparison file into descriptor
1.506 + HBufC8* compBuffer = HBufC8::NewL(iOutputDataBuffer->Length());
1.507 + CleanupStack::PushL(compBuffer);
1.508 + TPtr8 compBufferPtr = compBuffer->Des();
1.509 + TRAPD(err, fileReadStream.ReadL(compBufferPtr, iOutputDataBuffer->Length()));
1.510 + if ((err != KErrNone) && (err != KErrEof)) User::LeaveIfError(err); //EOF not an error ?
1.511 +
1.512 + //compare destination buffer with comparison descriptor
1.513 + TInt result = iOutputDataBuffer->Compare(*compBuffer);
1.514 +
1.515 + if (result != 0)
1.516 + INFO_PRINTF3(_L(">> iOutputDataBuffer size is %d, Comparison buffer size is %d"), iOutputDataBuffer->Length(), compBuffer->Length());
1.517 +
1.518 + CleanupStack::PopAndDestroy(4); //compBuffer, fileReadStream, file, fs
1.519 +
1.520 + if (result == 0)
1.521 + return ETrue;
1.522 + else
1.523 + return EFalse;
1.524 + }
1.525 +
1.526 +/** @xxxx
1.527 + * This function checks the number of source bytes processed against
1.528 + * iExpectedSrcBytesProcessed.
1.529 + *
1.530 + * @param "TUint aCount"
1.531 + * Index in the iExpectedSrcBytesProcessed array to check the value against.
1.532 + * @return "TBool"
1.533 + * ETrue if the source bytes processed is as expected.
1.534 + * EFalse if the source bytes processed is not as expected.
1.535 + */
1.536 +TBool CTestStep_MMF_ACOD::CheckSrcBytesProcessedL(TUint aCount)
1.537 + {
1.538 + if (iCodecProcessResult.iSrcBytesProcessed == iExpectedSrcBytesProcessed[aCount])
1.539 + return ETrue;
1.540 + else if (STATIC_CAST(TUint, iFileDataLeft) < iExpectedSrcBytesProcessed[aCount])
1.541 + {
1.542 + INFO_PRINTF4(_L(">> TCodecProcessResult::iSrcBytesProcessed is %d, Not enough source data available in file. iFileDataLeft for LOOP %d is %d"), iCodecProcessResult.iSrcBytesProcessed, aCount, iFileDataLeft);
1.543 + if (iCodecProcessResult.iSrcBytesProcessed == STATIC_CAST(TUint, iFileDataLeft))
1.544 + return ETrue;
1.545 + else
1.546 + return EFalse;
1.547 + }
1.548 + else
1.549 + {
1.550 + INFO_PRINTF4(_L(">> TCodecProcessResult::iSrcBytesProcessed is %d, iExpectedSrcBytesProcessed for LOOP %d is %d"), iCodecProcessResult.iSrcBytesProcessed, aCount, iExpectedSrcBytesProcessed[aCount]);
1.551 + return EFalse;
1.552 + }
1.553 + }
1.554 +
1.555 +/** @xxxx
1.556 + * This function checks the number of destination bytes added against
1.557 + * iExpectedDstBytesAdded.
1.558 + *
1.559 + * @param "TUint aCount"
1.560 + * Index of the iExpectedDstBytesAdded array to check the value against.
1.561 + * @return "TBool"
1.562 + * ETrue if the dest bytes added is as expected.
1.563 + * EFalse if the dest bytes added is not as expected.
1.564 + */
1.565 +TBool CTestStep_MMF_ACOD::CheckDstBytesAddedL(TUint aCount)
1.566 + {
1.567 + if (iCodecProcessResult.iDstBytesAdded == iExpectedDstBytesAdded[aCount])
1.568 + return ETrue;
1.569 + else if (STATIC_CAST(TUint, iFileDataLeft) < iExpectedSrcBytesProcessed[aCount])
1.570 + {
1.571 + INFO_PRINTF4(_L(">> TCodecProcessResult::iDstBytesAdded is %d, Not enough source data available in file. iFileDataLeft for LOOP %d is %d"), iCodecProcessResult.iDstBytesAdded, aCount, iFileDataLeft);
1.572 + return ETrue;
1.573 + }
1.574 + else
1.575 + {
1.576 + INFO_PRINTF4(_L(">> TCodecProcessResult::iDstBytesAdded is %d, iExpectedDstBytesAdded for LOOP %d is %d"), iCodecProcessResult.iDstBytesAdded, aCount, iExpectedDstBytesAdded[aCount]);
1.577 + return EFalse;
1.578 + }
1.579 + }
1.580 +
1.581 +/** @xxxx
1.582 + * This function checks the length of iOutputDataBuffer against iTotalDstBytesAdded.
1.583 + *
1.584 + * @return "TBool"
1.585 + * ETrue if the values are the same.
1.586 + * EFalse if the values are different.
1.587 + */
1.588 +TBool CTestStep_MMF_ACOD::CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL()
1.589 + {
1.590 + if (iOutputDataBuffer->Length() == STATIC_CAST(TInt, iTotalDstBytesAdded))
1.591 + return ETrue;
1.592 + else
1.593 + {
1.594 + INFO_PRINTF3(_L(">> Output Data Buffer Length is %d, iTotalDstBytesAdded is %d"), iOutputDataBuffer->Length(), iTotalDstBytesAdded);
1.595 + return EFalse;
1.596 + }
1.597 + }
1.598 +
1.599 +/** @xxxx
1.600 + * Checks the current return value against iExpectedReturnValue.
1.601 + *
1.602 + * @param "TUint aCount"
1.603 + * Index of the iExpectedReturnValue array to check the value against.
1.604 + * @return "TBool"
1.605 + * ETrue if the return value is as expected.
1.606 + * EFalse if the return value is not as expected.
1.607 + */
1.608 +TBool CTestStep_MMF_ACOD::CheckReturnValueL(TUint aCount)
1.609 + {
1.610 + if (aCount >= 5)
1.611 + User::Leave(KErrArgument);
1.612 +
1.613 + if (iCodecProcessResult.iStatus == iExpectedReturnValue[aCount].iStatus)
1.614 + {
1.615 + return ETrue;
1.616 + }
1.617 + else
1.618 + {
1.619 + INFO_PRINTF4(_L(">> TCodecProcessResult::iStatus is %d, iExpectedReturnValue for LOOP %d is %d"), iCodecProcessResult.iStatus, aCount, iExpectedReturnValue[aCount].iStatus);
1.620 + return EFalse;
1.621 + }
1.622 + }
1.623 +
1.624 +/** @xxxx
1.625 + * This function fills the source buffer with data from the file specified.
1.626 + *
1.627 + * @param "CMMFBuffer* aSrcBuffer"
1.628 + * Buffer to contain the data read from the source file.
1.629 + * "const TDesC& aFileName"
1.630 + * Name of source file to use.
1.631 + * "TUint aPosition"
1.632 + * Position in the file from which to read the data.
1.633 + */
1.634 +void CTestStep_MMF_ACOD::FillSourceBufferFromSourceFileL(CMMFBuffer* aSrcBuffer, const TDesC& aFilename, TUint aPosition)
1.635 + {
1.636 + RFs fs;
1.637 + User::LeaveIfError(fs.Connect());
1.638 + CleanupClosePushL(fs);
1.639 +
1.640 + RFile file;
1.641 + User::LeaveIfError(file.Open(fs, aFilename, EFileRead|EFileShareAny));
1.642 + CleanupClosePushL(file);
1.643 +
1.644 + iFileDataLeft = 0;
1.645 + file.Size(iFileDataLeft);
1.646 + if (STATIC_CAST(TInt, aPosition) < iFileDataLeft)
1.647 + iFileDataLeft -= aPosition;
1.648 + else User::Leave(KErrEof);
1.649 +
1.650 + RFileReadStream fileReadStream(file, aPosition);
1.651 + CleanupClosePushL(fileReadStream);
1.652 +
1.653 + TInt srcBufferLength = STATIC_CAST(CMMFDataBuffer*, aSrcBuffer)->Data().MaxLength();
1.654 +
1.655 + //read data from source file into source buffer
1.656 + if(iFileDataLeft < srcBufferLength)
1.657 + fileReadStream.ReadL(STATIC_CAST(CMMFDataBuffer*, aSrcBuffer)->Data(), iFileDataLeft);
1.658 + else
1.659 + fileReadStream.ReadL(STATIC_CAST(CMMFDataBuffer*, aSrcBuffer)->Data());
1.660 +
1.661 + CleanupStack::PopAndDestroy(3); //filereadstream, file, fs
1.662 + }
1.663 +
1.664 +/** @xxxx
1.665 + * This function tests the functionality of ProcessL for the codec specified.
1.666 + *
1.667 + * @param "TUid aCodecUID"
1.668 + * Uid of the codec under test.
1.669 + * "TUint aSrcBufferSize"
1.670 + * Size of source buffer to test the codec with.
1.671 + * "TUint aDstBufferSize"
1.672 + * Size of destination buffer to test the codec with.
1.673 + * "TUint aSrcBufferLength"
1.674 + * Length of source buffer to test the codec with if less than the maxLength.
1.675 + * aSrcBufferLength defaults to zero. It is not used unless a value is
1.676 + * specified. A value should only be specified in cases where the buffer
1.677 + * length is less than the maxlength.
1.678 + * @return "TBool"
1.679 + * ETrue if the test passes.
1.680 + * EFalse if the test fails.
1.681 + */
1.682 +TBool CTestStep_MMF_ACOD::TestProcessL(TUid aCodecUID, TUint aSrcBufferSize, TUint aDstBufferSize, TUint aSrcBufferLength)
1.683 + {
1.684 + //create buffers
1.685 + CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(aSrcBufferSize);
1.686 + CleanupStack::PushL(srcBuffer);
1.687 + CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(aDstBufferSize);
1.688 + CleanupStack::PushL(dstBuffer);
1.689 +
1.690 + //Fill source buffer with data
1.691 + HBufC* srcFilename = HBufC::NewLC(KMaxPath);
1.692 + TPtr ptrSrcFilename = srcFilename->Des();
1.693 + GetSourceFilenameFromCodecUidL(aCodecUID.iUid, ptrSrcFilename);
1.694 + FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0);
1.695 +
1.696 + //if source buffer has different length to max length, crop data
1.697 + if (aSrcBufferLength > 0)
1.698 + {
1.699 + srcBuffer->Data().SetLength(aSrcBufferLength);
1.700 + }
1.701 +
1.702 + //instantiate codec
1.703 + CMMFCodec* codec = CMMFCodec::NewL(aCodecUID);
1.704 + CleanupStack::PushL(codec);
1.705 +
1.706 + TBool testOK = ETrue;
1.707 + TRAPD(err, iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer));
1.708 + if (err)
1.709 + {
1.710 + ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessL Leave occurred in ProcessL, error code %d"), err);
1.711 + testOK = EFalse;
1.712 + }
1.713 + else
1.714 + {
1.715 + //copy data to iOutputDataBuffer
1.716 + iOutputDataBuffer = HBufC8::NewL(dstBuffer->Data().Length());
1.717 + TPtr8 outputDataBufferPtr = iOutputDataBuffer->Des();
1.718 + outputDataBufferPtr.Append(dstBuffer->Data());
1.719 +
1.720 + iTotalDstBytesAdded = iCodecProcessResult.iDstBytesAdded;
1.721 + iTotalSrcBytesProcessed = iCodecProcessResult.iSrcBytesProcessed;
1.722 +
1.723 + //investigate results
1.724 + HBufC* filename = HBufC::NewLC(KMaxPath);
1.725 + TPtr ptrFilename = filename->Des();
1.726 + GetComparisonFilenameFromCodecUidL(aCodecUID.iUid, ptrFilename);
1.727 +
1.728 + if (!CheckOutputAgainstComparisonFileL(ptrFilename, 0))
1.729 + {
1.730 + ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestProcessL CheckOutputAgainstComparisonFileL returned EFalse"));
1.731 + testOK = EFalse;
1.732 + }
1.733 + if (!CheckDstBytesAddedL(0))
1.734 + {
1.735 + ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestProcessL CheckDstBytesAddedL returned EFalse"));
1.736 + testOK = EFalse;
1.737 + }
1.738 + if (!CheckSrcBytesProcessedL(0))
1.739 + {
1.740 + ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestProcessL CheckSrcBytesProcessedL returned EFalse"));
1.741 + testOK = EFalse;
1.742 + }
1.743 + if (!CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL())
1.744 + {
1.745 + ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestProcessL CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL returned EFalse"));
1.746 + testOK = EFalse;
1.747 + }
1.748 + if (!CheckReturnValueL(0))
1.749 + {
1.750 + ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestProcessL CheckReturnValue returned EFalse"));
1.751 + testOK = EFalse;
1.752 + }
1.753 +
1.754 + //clean up memory
1.755 + CleanupStack::PopAndDestroy(); //filename
1.756 + delete iOutputDataBuffer;
1.757 + iOutputDataBuffer = NULL;
1.758 + }
1.759 +
1.760 + CleanupStack::PopAndDestroy(4); //codec, srcFilename, dstBuffer, srcBuffer
1.761 +
1.762 + if(!testOK)
1.763 + return EFalse;
1.764 + else
1.765 + return ETrue;
1.766 + }
1.767 +
1.768 +
1.769 +/** @xxxx
1.770 + * This function tests the functionality of ProcessL for the codec specified.
1.771 + * It mimics the datapath by calling ProcessL five times in a loop, checking the
1.772 + * return value each time and passing in new buffers accordlingly.
1.773 + *
1.774 + * @param "TUid aCodecUID"
1.775 + * Uid of the codec under test.
1.776 + * "TUint aSrcBufferSize"
1.777 + * Size of source buffers to test the codec with.
1.778 + * "TUint aDstBufferSize"
1.779 + * Size of destination buffers to test the codec with.
1.780 + * "TUint aSrcBufferLength"
1.781 + * Length of source buffer to test the codec with if less than the maxLength.
1.782 + * aSrcBufferLength defaults to zero and is not used unless a value is
1.783 + * specified.A value should only be specified if the buffer length is less
1.784 + * than the maxlength.
1.785 + * "TBool aCheckExpectedBytesProcessed"
1.786 + * Boolean value to determine whether to check the srcBytesProcessed and
1.787 + * dstBytesAdded against their expected values. This defaults to true,
1.788 + * but allows for the tests to be bypassed for non-linear codecs where the
1.789 + * expected values are difficult to determine.
1.790 + * @return "TBool"
1.791 + * ETrue if the test passes.
1.792 + * EFalse if the test fails.
1.793 + */
1.794 +TBool CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL(TUid aCodecUID, TUint aSrcBufferSize, TUint aDstBufferSize, TUint aSrcBufferLength, TBool aCheckExpectedBytesProcessed)
1.795 + {
1.796 + //create buffers
1.797 + CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(aSrcBufferSize);
1.798 + CleanupStack::PushL(srcBuffer);
1.799 + CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(aDstBufferSize);
1.800 + CleanupStack::PushL(dstBuffer);
1.801 +
1.802 + //read first buffer of data
1.803 + HBufC* srcFilename = HBufC::NewLC(KMaxPath);
1.804 + TPtr ptrSrcFilename = srcFilename->Des();
1.805 + GetSourceFilenameFromCodecUidL(aCodecUID.iUid, ptrSrcFilename);
1.806 + TRAPD(srcFileError, FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0));
1.807 + TBool endOfFile = EFalse;
1.808 + if (srcFileError == KErrEof)
1.809 + endOfFile = ETrue;
1.810 + else if (srcFileError)
1.811 + User::Leave(srcFileError);
1.812 +
1.813 +
1.814 + //if source buffer has different length to max length, crop data
1.815 + if (aSrcBufferLength > 0)
1.816 + {
1.817 + srcBuffer->Data().SetLength(aSrcBufferLength);
1.818 + }
1.819 +
1.820 + //instantiate codec
1.821 + CMMFCodec* codec = CMMFCodec::NewL(aCodecUID);
1.822 + CleanupStack::PushL(codec);
1.823 +
1.824 + TBool testOK = ETrue;
1.825 + TRAPD(err, iOutputDataBuffer = HBufC8::NewL(aDstBufferSize*5));
1.826 + User::LeaveIfError(err);
1.827 + TPtr8 outputDataBufferPtr = iOutputDataBuffer->Des();
1.828 +
1.829 +
1.830 + TUint maxIters = 0;
1.831 + if(iSingleIteration)
1.832 + {
1.833 + maxIters = 1;
1.834 + }
1.835 + else
1.836 + {
1.837 + maxIters = 5;
1.838 + }
1.839 +
1.840 + for (TUint i=0; i</*5*/maxIters; i++)
1.841 + {
1.842 + TRAPD(err, iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer));
1.843 + if (err)
1.844 + {
1.845 + if (err == iExpectedLeaveErrorCode)
1.846 + break;
1.847 + else
1.848 + {
1.849 + ERR_PRINTF3(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d Leave occurred in ProcessL, error code %d"), i, err);
1.850 + testOK = EFalse;
1.851 + break;
1.852 + }
1.853 + }
1.854 + else if (iExpectedLeaveErrorCode)
1.855 + {
1.856 + ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d A leave was expected in ProcessL, but this didn't occur"), i);
1.857 + testOK = EFalse;
1.858 + break;
1.859 + }
1.860 +
1.861 + iTotalDstBytesAdded += iCodecProcessResult.iDstBytesAdded;
1.862 + iTotalSrcBytesProcessed += iCodecProcessResult.iSrcBytesProcessed;
1.863 +
1.864 + if (i<4)
1.865 + {
1.866 + switch (iCodecProcessResult.iStatus)
1.867 + {
1.868 + case TCodecProcessResult::EProcessComplete:
1.869 + {
1.870 + outputDataBufferPtr.Append(dstBuffer->Data());
1.871 + dstBuffer->SetPosition(0);
1.872 + if (!CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL())
1.873 + {
1.874 + ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL returned EFalse"), i);
1.875 + testOK = EFalse;
1.876 + }
1.877 + srcBuffer->SetPosition(0);
1.878 + srcBuffer->NextFrame();
1.879 +
1.880 + if (!endOfFile)
1.881 + {
1.882 + TRAP(srcFileError, FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, iTotalSrcBytesProcessed));
1.883 + if (srcFileError == KErrEof)
1.884 + endOfFile = ETrue;
1.885 + else if (srcFileError)
1.886 + User::Leave(srcFileError);
1.887 + }
1.888 + if (aSrcBufferLength > 0)
1.889 + srcBuffer->Data().SetLength(aSrcBufferLength);
1.890 + break;
1.891 + }
1.892 + case TCodecProcessResult::EProcessIncomplete:
1.893 + {
1.894 + outputDataBufferPtr.Append(dstBuffer->Data());
1.895 + dstBuffer->SetPosition(0);
1.896 + if (!CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL())
1.897 + {
1.898 + ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL returned EFalse"), i);
1.899 + testOK = EFalse;
1.900 + }
1.901 + srcBuffer->SetPosition(iCodecProcessResult.iSrcBytesProcessed + srcBuffer->Position());
1.902 + break;
1.903 + }
1.904 + case TCodecProcessResult::EDstNotFilled:
1.905 + {
1.906 + dstBuffer->SetPosition(iCodecProcessResult.iDstBytesAdded + dstBuffer->Position());
1.907 +
1.908 + if (!endOfFile)
1.909 + {
1.910 + TRAP(srcFileError, FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, iTotalSrcBytesProcessed));
1.911 + if (srcFileError == KErrEof)
1.912 + endOfFile = ETrue;
1.913 + else if (srcFileError)
1.914 + User::Leave(srcFileError);
1.915 + }
1.916 + if (aSrcBufferLength > 0)
1.917 + srcBuffer->Data().SetLength(aSrcBufferLength);
1.918 + break;
1.919 + }
1.920 + default:
1.921 + User::Leave(KErrCorrupt); //should never get here
1.922 + }
1.923 + }
1.924 + else //last time
1.925 + {
1.926 + outputDataBufferPtr.Append(dstBuffer->Data());
1.927 + if (!CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL())
1.928 + {
1.929 + ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d CheckOutputDataBufferSizeAgainstTotalDstBytesAddedL returned EFalse"), i);
1.930 + testOK = EFalse;
1.931 + }
1.932 + }
1.933 +
1.934 + if (!CheckReturnValueL(i))
1.935 + {
1.936 + ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d CheckReturnValue returned EFalse"), i);
1.937 + testOK = EFalse;
1.938 + }
1.939 + if (aCheckExpectedBytesProcessed)
1.940 + {
1.941 + if (!CheckDstBytesAddedL(i))
1.942 + {
1.943 + ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d CheckDstBytesAddedL returned EFalse"), i);
1.944 + testOK = EFalse;
1.945 + }
1.946 + if (!CheckSrcBytesProcessedL(i))
1.947 + {
1.948 + ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL LOOP %d CheckSrcBytesProcessedL returned EFalse"), i);
1.949 + testOK = EFalse;
1.950 + }
1.951 + }
1.952 +
1.953 + if (endOfFile)
1.954 + break;
1.955 + }
1.956 +
1.957 + if (testOK)
1.958 + {
1.959 + HBufC* filename = HBufC::NewLC(KMaxPath);
1.960 + TPtr ptrFilename = filename->Des();
1.961 + GetComparisonFilenameFromCodecUidL(aCodecUID.iUid, ptrFilename);
1.962 +
1.963 + if (!CheckOutputAgainstComparisonFileL(ptrFilename, 0))
1.964 + {
1.965 + ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestProcessLLoopFiveTimesL CheckOutputAgainstComparisonFileL returned EFalse"));
1.966 + testOK = EFalse;
1.967 + }
1.968 +
1.969 + CleanupStack::PopAndDestroy(); //filename
1.970 + }
1.971 +
1.972 + //clean up memory
1.973 + delete iOutputDataBuffer;
1.974 + iOutputDataBuffer = NULL;
1.975 + CleanupStack::PopAndDestroy(4); //codec, srcFilename, dstBuffer, srcBuffer
1.976 +
1.977 + if(!testOK)
1.978 + return EFalse;
1.979 + else
1.980 + return ETrue;
1.981 + }
1.982 +
1.983 +/** @xxxx
1.984 + * This function tests how the codec handles a reposition. This test is only really
1.985 + * relevant to codecs that store data between calls to ProcessL. When a reposition
1.986 + * occurs the stored data should be flushed.
1.987 + *
1.988 + * ProcessL is called 3 times:
1.989 + * After the first call the frame number is increased by one;
1.990 + * After the second call the output data is checked to ensure that extra data HAS been
1.991 + * written to the output buffer; The frame number is set to 5 to mimic a reposition.
1.992 + * After the third call the output data is checked to ensure that extra data HAS NOT
1.993 + * been written to the output buffer.
1.994 + *
1.995 + * Note: It is important to use buffer sizes that will force the codec to store extra
1.996 + * data and return EProcessComplete or EDstNotFilled each time around the loop.
1.997 + *
1.998 + * @param "TUid aCodecUID"
1.999 + * Uid of the codec under test.
1.1000 + * "TUint aSrcBufferSize"
1.1001 + * Size of source buffer to test the codec with.
1.1002 + * "TUint aDstBufferSize"
1.1003 + * Size of destination buffer to test the codec with.
1.1004 + * @return "TBool"
1.1005 + * ETrue if the test passes.
1.1006 + * EFalse if the test fails.
1.1007 + */
1.1008 +TBool CTestStep_MMF_ACOD::TestRepositionL(TUid aCodecUID, TUint aSrcBufferSize, TUint aDstBufferSize)
1.1009 + {
1.1010 + //create buffers
1.1011 + CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(aSrcBufferSize);
1.1012 + CleanupStack::PushL(srcBuffer);
1.1013 +
1.1014 + CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(aDstBufferSize);
1.1015 + CleanupStack::PushL(dstBuffer);
1.1016 +
1.1017 + //read first buffer of data
1.1018 + HBufC* srcFilename = HBufC::NewLC(KMaxPath);
1.1019 + TPtr ptrSrcFilename = srcFilename->Des();
1.1020 + GetSourceFilenameFromCodecUidL(aCodecUID.iUid, ptrSrcFilename);
1.1021 + FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0);
1.1022 +
1.1023 + //instantiate codec
1.1024 + CMMFCodec* codec = NULL;
1.1025 + TRAPD(err, codec = CMMFCodec::NewL(aCodecUID));
1.1026 + if (err)
1.1027 + {
1.1028 + ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestRepositionL Leave occurred in NewL, error code %d"), err);
1.1029 + return EFalse;
1.1030 + }
1.1031 + else
1.1032 + {
1.1033 + CleanupStack::PushL(codec);
1.1034 + }
1.1035 +
1.1036 + TBool testOK = ETrue;
1.1037 + iOutputDataBuffer = HBufC8::NewL(aDstBufferSize);
1.1038 + TPtr8 outputDataBufferPtr = iOutputDataBuffer->Des();
1.1039 +
1.1040 + HBufC* filename = HBufC::NewLC(KMaxPath);
1.1041 + TPtr ptrFilename = filename->Des();
1.1042 + GetComparisonFilenameFromCodecUidL(aCodecUID.iUid, ptrFilename);
1.1043 +
1.1044 + for (TUint i=0; i<3; i++)
1.1045 + {
1.1046 + iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer);
1.1047 +
1.1048 + if ((iCodecProcessResult.iStatus == TCodecProcessResult::EProcessComplete) ||
1.1049 + (iCodecProcessResult.iStatus == TCodecProcessResult::EDstNotFilled))
1.1050 + {
1.1051 + switch(i)
1.1052 + {
1.1053 + case 0:
1.1054 + {
1.1055 + srcBuffer->SetPosition(0);
1.1056 + srcBuffer->SetFrameNumber(5);
1.1057 + dstBuffer->SetPosition(0);
1.1058 +
1.1059 + break;
1.1060 + }
1.1061 + case 1:
1.1062 + {
1.1063 + srcBuffer->SetPosition(0);
1.1064 + srcBuffer->SetFrameNumber(0);
1.1065 + dstBuffer->SetPosition(0);
1.1066 +
1.1067 + outputDataBufferPtr.Copy(dstBuffer->Data());
1.1068 + if (CheckOutputAgainstComparisonFileL(ptrFilename, 0))
1.1069 + {
1.1070 + INFO_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestRepositionL CheckOutputAgainstComparisonFileL returned ETrue for LOOP %d."), i);
1.1071 + INFO_PRINTF1(_L(">> If the codec stores left over data from the previous call to ProcessL, this may indicate that the test is invalid."));
1.1072 + INFO_PRINTF1(_L(">> Try using different buffer sizes."));
1.1073 + }
1.1074 + break;
1.1075 + }
1.1076 + case 2:
1.1077 + {
1.1078 + outputDataBufferPtr.Copy(dstBuffer->Data());
1.1079 + if (!CheckOutputAgainstComparisonFileL(ptrFilename, 0))
1.1080 + {
1.1081 + ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestRepositionL CheckOutputAgainstComparisonFileL returned EFalse for LOOP %d"), i);
1.1082 + testOK = EFalse;
1.1083 + }
1.1084 + break;
1.1085 + }
1.1086 + default:
1.1087 + break;
1.1088 + }
1.1089 + }
1.1090 + else
1.1091 + {
1.1092 + INFO_PRINTF3(_L(">> CTestStep_MMF_ACOD::TestRepositionL Return code was %d for LOOP %d."), iCodecProcessResult.iStatus, i);
1.1093 + INFO_PRINTF1(_L(">> This indicates that the test is invalid. Try using different buffer sizes."));
1.1094 + break;
1.1095 + }
1.1096 + }
1.1097 +
1.1098 + //clean up memory
1.1099 + delete iOutputDataBuffer;
1.1100 + iOutputDataBuffer = NULL;
1.1101 + CleanupStack::PopAndDestroy(5); //filename, codec, srcFilename, dstBuffer, srcBuffer
1.1102 +
1.1103 + if(!testOK)
1.1104 + return EFalse;
1.1105 + else
1.1106 + return ETrue;
1.1107 + }
1.1108 +
1.1109 +/** @xxxx
1.1110 + * This function tests codec instantiation by Uid.
1.1111 + *
1.1112 + * @param "TUid aCodecUID"
1.1113 + * Uid of the codec under test.
1.1114 + * @return "TBool"
1.1115 + * ETrue if the test passes.
1.1116 + * EFalse if the test fails.
1.1117 + */
1.1118 +TBool CTestStep_MMF_ACOD::TestNewL(TUid aCodecUID)
1.1119 + {
1.1120 + //create buffers
1.1121 + CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize);
1.1122 + CleanupStack::PushL(srcBuffer);
1.1123 + CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize);
1.1124 + CleanupStack::PushL(dstBuffer);
1.1125 +
1.1126 + //Fill source buffer with data
1.1127 + HBufC* srcFilename = HBufC::NewLC(KMaxPath);
1.1128 + TPtr ptrSrcFilename = srcFilename->Des();
1.1129 + GetSourceFilenameFromCodecUidL(aCodecUID.iUid, ptrSrcFilename);
1.1130 + FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0);
1.1131 +
1.1132 + TBool testOK = ETrue;
1.1133 + //create codec from uid
1.1134 + CMMFCodec* codec = NULL;
1.1135 + TRAPD(err, codec = CMMFCodec::NewL(aCodecUID));
1.1136 + if (err)
1.1137 + {
1.1138 + ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestNewL Leave occurred in NewL, error code %d"), err);
1.1139 + testOK = EFalse;
1.1140 + }
1.1141 + else
1.1142 + {
1.1143 + CleanupStack::PushL(codec);
1.1144 +
1.1145 + //Check codec is non-null
1.1146 + if (!codec)
1.1147 + {
1.1148 + ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestNewL NewL returned NULL"));
1.1149 + testOK = EFalse;
1.1150 + }
1.1151 + else
1.1152 + {
1.1153 + //Process one buffer of data
1.1154 + iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer);
1.1155 +
1.1156 + //copy data to iOutputDataBuffer
1.1157 + iOutputDataBuffer = HBufC8::NewL(dstBuffer->Data().Length());
1.1158 + TPtr8 outputDataBufferPtr = iOutputDataBuffer->Des();
1.1159 + outputDataBufferPtr.Append(dstBuffer->Data());
1.1160 +
1.1161 + //investigate results
1.1162 + HBufC* filename = HBufC::NewLC(KMaxPath);
1.1163 + TPtr ptrFilename = filename->Des();
1.1164 + GetComparisonFilenameFromCodecUidL(aCodecUID.iUid, ptrFilename);
1.1165 +
1.1166 + if (!CheckOutputAgainstComparisonFileL(ptrFilename, 0))
1.1167 + {
1.1168 + ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestNewL CheckOutputAgainstComparisonFileL returned EFalse"));
1.1169 + testOK = EFalse;
1.1170 + }
1.1171 + CleanupStack::PopAndDestroy(); //filename
1.1172 + }
1.1173 +
1.1174 + CleanupStack::PopAndDestroy(); //codec
1.1175 + delete iOutputDataBuffer;
1.1176 + iOutputDataBuffer = NULL;
1.1177 + }
1.1178 +
1.1179 + CleanupStack::PopAndDestroy(3); //srcFilename, dstBuffer, srcBuffer
1.1180 +
1.1181 + if(!testOK)
1.1182 + return EFalse;
1.1183 + else
1.1184 + return ETrue;
1.1185 + }
1.1186 +
1.1187 +/** @xxxx
1.1188 + * This function tests codec instantiation by fourCC codes.
1.1189 + *
1.1190 + * @param "const TFourCC& aSrcFourCC"
1.1191 + * Source fourCC code of the codec under test.
1.1192 + * "const TFourCC& aDstFourCC"
1.1193 + * Destination fourCC code of the codec under test.
1.1194 + * @return "TBool"
1.1195 + * ETrue if the test passes.
1.1196 + * EFalse if the test fails.
1.1197 + */
1.1198 +TBool CTestStep_MMF_ACOD::TestNewL(const TFourCC& aSrcFourCC, const TFourCC& aDstFourCC)
1.1199 + {
1.1200 + //create buffers
1.1201 + CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize);
1.1202 + CleanupStack::PushL(srcBuffer);
1.1203 + CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize);
1.1204 + CleanupStack::PushL(dstBuffer);
1.1205 +
1.1206 + //Fill source buffer with data
1.1207 + HBufC* srcFilename = HBufC::NewLC(KMaxPath);
1.1208 + TPtr ptrSrcFilename = srcFilename->Des();
1.1209 + GetSourceFilenameFromFourCCL(aSrcFourCC, aDstFourCC, ptrSrcFilename);
1.1210 + FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0);
1.1211 +
1.1212 + TBool testOK = ETrue;
1.1213 +
1.1214 + //create codec from uid
1.1215 + CMMFCodec* codec = NULL;
1.1216 + TRAPD(err, codec = CMMFCodec::NewL(aSrcFourCC, aDstFourCC));
1.1217 + if (err)
1.1218 + {
1.1219 + ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestNewL Leave occurred in NewL, error code %d"), err);
1.1220 + testOK = EFalse;
1.1221 + }
1.1222 + else
1.1223 + {
1.1224 + CleanupStack::PushL(codec);
1.1225 +
1.1226 + //Check codec is non-null
1.1227 + if (!codec)
1.1228 + {
1.1229 + ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestNewL NULL CMMFCodec returned from NewL"));
1.1230 + testOK = EFalse;
1.1231 + }
1.1232 + else
1.1233 + {
1.1234 + //Process one buffer of data
1.1235 + iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer);
1.1236 +
1.1237 + //copy data to iOutputDataBuffer
1.1238 + iOutputDataBuffer = HBufC8::NewL(dstBuffer->Data().Length());
1.1239 + TPtr8 outputDataBufferPtr = iOutputDataBuffer->Des();
1.1240 + outputDataBufferPtr.Append(dstBuffer->Data());
1.1241 +
1.1242 + //investigate results
1.1243 + HBufC* filename = HBufC::NewLC(KMaxPath);
1.1244 + TPtr ptrFilename = filename->Des();
1.1245 + GetComparisonFilenameFromFourCCL(aSrcFourCC, aDstFourCC, ptrFilename);
1.1246 +
1.1247 + if (!CheckOutputAgainstComparisonFileL(ptrFilename, 0))
1.1248 + {
1.1249 + ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestNewL CheckOutputAgainstComparisonFileL returned EFalse"));
1.1250 + testOK = EFalse;
1.1251 + }
1.1252 + CleanupStack::PopAndDestroy(); //filename
1.1253 + }
1.1254 +
1.1255 + CleanupStack::PopAndDestroy(); //codec
1.1256 + delete iOutputDataBuffer;
1.1257 + iOutputDataBuffer = NULL;
1.1258 + }
1.1259 +
1.1260 + CleanupStack::PopAndDestroy(3); //srcFilename, dstBuffer, srcBuffer
1.1261 +
1.1262 + if(!testOK)
1.1263 + return EFalse;
1.1264 + else
1.1265 + return ETrue;
1.1266 + }
1.1267 +
1.1268 +/** @xxxx
1.1269 + * This function tests codec instantiation by fourCC codes and preferred supplier.
1.1270 + * Two new codecs have been created for the purpose of this test. They take the same
1.1271 + * fourCC codes (AAAA and BBBB) but have different suppliers.
1.1272 + *
1.1273 + * @return "TBool"
1.1274 + * ETrue if the test passes.
1.1275 + * EFalse if the test fails.
1.1276 + */
1.1277 +TBool CTestStep_MMF_ACOD::TestNewLPreferredSupplierL()
1.1278 + {
1.1279 + //create buffers
1.1280 + CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize);
1.1281 + CleanupStack::PushL(srcBuffer);
1.1282 + CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize);
1.1283 + CleanupStack::PushL(dstBuffer);
1.1284 +
1.1285 + //Fill source buffer with data
1.1286 + HBufC* srcFilename = HBufC::NewLC(KMaxPath);
1.1287 + TPtr ptrSrcFilename = srcFilename->Des();
1.1288 + ptrSrcFilename.Copy(KSourceFilesDir);
1.1289 + ptrSrcFilename.Append(KPreferredSupplierSourceFile);
1.1290 + FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0);
1.1291 +
1.1292 + TBool testOK = ETrue;
1.1293 +
1.1294 + //create codec from uid and preferredSupplier
1.1295 + CMMFCodec* codec = NULL;
1.1296 + TRAPD(err, codec = CMMFCodec::NewL(KMMFFourCCCodeAAAA, KMMFFourCCCodeBBBB, KPreferredSupplier));
1.1297 + if (err)
1.1298 + {
1.1299 + ERR_PRINTF2(_L(">> CTestStep_MMF_ACOD::TestNewLPreferredSupplierL Leave occurred in NewL, error code %d"), err);
1.1300 + testOK = EFalse;
1.1301 + }
1.1302 + else
1.1303 + {
1.1304 + CleanupStack::PushL(codec);
1.1305 +
1.1306 + //Check codec is non-null
1.1307 + if (!codec)
1.1308 + {
1.1309 + ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestNewLPreferredSupplierL NULL CMMFCodec returned from NewL"));
1.1310 + testOK = EFalse;
1.1311 + }
1.1312 + else
1.1313 + {
1.1314 + //Process one buffer of data
1.1315 + iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer);
1.1316 +
1.1317 + //copy data to iOutputDataBuffer
1.1318 + iOutputDataBuffer = HBufC8::NewL(dstBuffer->Data().Length());
1.1319 + TPtr8 outputDataBufferPtr = iOutputDataBuffer->Des();
1.1320 + outputDataBufferPtr.Append(dstBuffer->Data());
1.1321 +
1.1322 + //investigate results
1.1323 + HBufC* filename = HBufC::NewLC(KMaxPath);
1.1324 + TPtr ptrFilename = filename->Des();
1.1325 + ptrFilename.Copy(KComparisonFilesDir);
1.1326 + ptrFilename.Append(KPreferredSupplierComparisonFile);
1.1327 +
1.1328 + if (!CheckOutputAgainstComparisonFileL(ptrFilename, 0))
1.1329 + {
1.1330 + ERR_PRINTF1(_L(">> CTestStep_MMF_ACOD::TestNewLPreferredSupplierL CheckOutputAgainstComparisonFileL returned EFalse"));
1.1331 + testOK = EFalse;
1.1332 + }
1.1333 +
1.1334 + CleanupStack::PopAndDestroy(filename);
1.1335 + }
1.1336 +
1.1337 + CleanupStack::PopAndDestroy(codec);
1.1338 + delete iOutputDataBuffer;
1.1339 + iOutputDataBuffer = NULL;
1.1340 + }
1.1341 +
1.1342 + CleanupStack::PopAndDestroy(3, srcBuffer); //srcFilename, dstBuffer, srcBuffer
1.1343 +
1.1344 + if(!testOK)
1.1345 + return EFalse;
1.1346 + else
1.1347 + return ETrue;
1.1348 + }
1.1349 +
1.1350 +/** @xxxx
1.1351 + * This functionality isn't implemented yet
1.1352 + */
1.1353 +TBool CTestStep_MMF_ACOD::TestMemoryScribbleL(TUid aCodecUID)
1.1354 + {
1.1355 + aCodecUID = aCodecUID;
1.1356 +
1.1357 + INFO_PRINTF1(_L(">> This test has not been implemented, as it has not yet been determined how to test for memory scribbles."));
1.1358 + return ETrue;
1.1359 + }
1.1360 +
1.1361 +
1.1362 +/** @xxxx
1.1363 + * This function panics if any memory leaks occur during the calls to NewL or ProcessL.
1.1364 + *
1.1365 + * @param "TUid aCodecUID"
1.1366 + * Uid of codec under test.
1.1367 + * @return "TBool"
1.1368 + * ETrue if the test passes.
1.1369 + * EFalse if the test fails.
1.1370 + */
1.1371 +TBool CTestStep_MMF_ACOD::TestMemoryLeakL(TUid aCodecUID)
1.1372 + {
1.1373 + //create buffers
1.1374 + CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize);
1.1375 + CleanupStack::PushL(srcBuffer);
1.1376 + CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize);
1.1377 + CleanupStack::PushL(dstBuffer);
1.1378 +
1.1379 + //Fill source buffer with data
1.1380 + HBufC* srcFilename = HBufC::NewLC(KMaxPath);
1.1381 + TPtr ptrSrcFilename = srcFilename->Des();
1.1382 + GetSourceFilenameFromCodecUidL(aCodecUID.iUid, ptrSrcFilename);
1.1383 + FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0);
1.1384 +
1.1385 + __MM_HEAP_MARK;
1.1386 + //instantiate codec
1.1387 + CMMFCodec* codec = CMMFCodec::NewL(aCodecUID);
1.1388 + CleanupStack::PushL(codec);
1.1389 +
1.1390 + iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer);
1.1391 +
1.1392 + CleanupStack::PopAndDestroy(4); //codec, srcFilename, dstBuffer, srcBuffer
1.1393 +
1.1394 + __MM_HEAP_MARKEND;
1.1395 +
1.1396 + return ETrue;
1.1397 + }
1.1398 +
1.1399 +/** @xxxx
1.1400 + * This function tests how NewL deals with a memory allocation failure.
1.1401 + * This test will pass if NewL leaves with the correct error code on every
1.1402 + * memory allocation.
1.1403 + *
1.1404 + * @param "TUid aCodecUID"
1.1405 + * Uid of codec under test.
1.1406 + * @return "TBool"
1.1407 + * ETrue if the test passes.
1.1408 + * EFalse if the test fails.
1.1409 + */
1.1410 +TBool CTestStep_MMF_ACOD::TestNewLOutOfMemoryL(TUid aCodecUID)
1.1411 + {
1.1412 + aCodecUID = aCodecUID;
1.1413 + CMMFCodec* codec = NULL;
1.1414 + TInt failCount = 1;
1.1415 + TBool testComplete = EFalse;
1.1416 + TBool testOK = ETrue;
1.1417 +
1.1418 + while (!testComplete)
1.1419 + {
1.1420 + TInt err = 0;
1.1421 + __UHEAP_FAILNEXT(failCount);
1.1422 + __MM_HEAP_MARK;
1.1423 +
1.1424 + TRAP(err, codec = CMMFCodec::NewL(aCodecUID));
1.1425 +
1.1426 + switch (err)
1.1427 + {
1.1428 + case KErrNoMemory :
1.1429 + break;
1.1430 + case KErrNone :
1.1431 + {
1.1432 + //attempt to allocate another cell. If this fails, we have tested all
1.1433 + //of the memory allocs carried out by NewL.
1.1434 + TAny *testAlloc = User::Alloc(1);
1.1435 + if (testAlloc==NULL)
1.1436 + {
1.1437 + testComplete = ETrue;
1.1438 + failCount --;
1.1439 + }
1.1440 + else
1.1441 + User::Free(testAlloc);
1.1442 +
1.1443 + delete codec;
1.1444 + codec = NULL;
1.1445 + break;
1.1446 + }
1.1447 + default:
1.1448 + {
1.1449 + testOK = EFalse;
1.1450 + testComplete = ETrue;
1.1451 + break;
1.1452 + }
1.1453 + }
1.1454 +
1.1455 + __MM_HEAP_MARKEND;
1.1456 + __UHEAP_RESET;
1.1457 + failCount++;
1.1458 + }
1.1459 +
1.1460 + if(!testOK)
1.1461 + return EFalse;
1.1462 + else
1.1463 + return ETrue;
1.1464 + }
1.1465 +
1.1466 +
1.1467 +/** @xxxx
1.1468 + * This function tests how ProcessL would deal with a memory allocation failure.
1.1469 + * For most of the codecs ProcessL doesn't allocate any memory, so this test will
1.1470 + * pass when ProcessL succeeds as well as when ProcessL leaves with the correct code.
1.1471 + *
1.1472 + * @param "TUid aCodecUID"
1.1473 + * Uid of codec under test.
1.1474 + * @return "TBool"
1.1475 + * ETrue if the test passes.
1.1476 + * EFalse if the test fails.
1.1477 + */
1.1478 +TBool CTestStep_MMF_ACOD::TestProcessLOutOfMemoryL(TUid aCodecUID)
1.1479 + {
1.1480 + //create buffers
1.1481 + CMMFDataBuffer *srcBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize);
1.1482 + CleanupStack::PushL(srcBuffer);
1.1483 + CMMFDataBuffer *dstBuffer = CMMFDataBuffer::NewL(KDefaultBufferSize);
1.1484 + CleanupStack::PushL(dstBuffer);
1.1485 +
1.1486 + //Fill source buffer with data
1.1487 + HBufC* srcFilename = HBufC::NewLC(KMaxPath);
1.1488 + TPtr ptrSrcFilename = srcFilename->Des();
1.1489 + GetSourceFilenameFromCodecUidL(aCodecUID.iUid, ptrSrcFilename);
1.1490 + FillSourceBufferFromSourceFileL(srcBuffer, ptrSrcFilename, 0);
1.1491 +
1.1492 + //instantiate codec
1.1493 + CMMFCodec* codec = CMMFCodec::NewL(aCodecUID);
1.1494 + CleanupStack::PushL(codec);
1.1495 + TBool testOK = ETrue;
1.1496 + TUint failCount = 1;
1.1497 + TBool testComplete = EFalse;
1.1498 +
1.1499 + while (!testComplete)
1.1500 + {
1.1501 + __UHEAP_FAILNEXT(failCount);
1.1502 + __MM_HEAP_MARK;
1.1503 + TRAPD(err, iCodecProcessResult = codec->ProcessL(*srcBuffer, *dstBuffer));
1.1504 +
1.1505 + switch (err)
1.1506 + {
1.1507 + case KErrNoMemory :
1.1508 + break;
1.1509 + case KErrNone :
1.1510 + {
1.1511 + //attempt to allocate another cell. If this fails, we have tested all
1.1512 + //of the memory allocs carried out by ProcessL.
1.1513 + TAny *testAlloc = User::Alloc(1);
1.1514 + if (testAlloc==NULL)
1.1515 + {
1.1516 + testComplete = ETrue;
1.1517 + failCount --;
1.1518 + }
1.1519 + else
1.1520 + User::Free(testAlloc);
1.1521 + break;
1.1522 + }
1.1523 + default:
1.1524 + {
1.1525 + testOK = EFalse;
1.1526 + testComplete = ETrue;
1.1527 + break;
1.1528 + }
1.1529 + }
1.1530 +
1.1531 + __MM_HEAP_MARKEND;
1.1532 + __UHEAP_RESET;
1.1533 + failCount++;
1.1534 + }
1.1535 +
1.1536 + CleanupStack::PopAndDestroy(4); //codec, srcFilename, dstBuffer, srcBuffer
1.1537 +
1.1538 + if(!testOK)
1.1539 + return EFalse;
1.1540 + else
1.1541 + return ETrue;
1.1542 + }
1.1543 +
1.1544 +//------------------------------------------------------------------
1.1545 +// ** TEST MMF_ACOD STEPS ***
1.1546 +
1.1547 +//------------------------------------------------------------------
1.1548 +
1.1549 +/** @xxxx
1.1550 + * Constructor
1.1551 + */
1.1552 +CTest_MMF_ACOD_U_0001::CTest_MMF_ACOD_U_0001()
1.1553 + {
1.1554 + // store the name of this test case
1.1555 + // this is the name that is used by the script file
1.1556 + // Each test step initialises it's own name
1.1557 + iTestStepName = _L("MM-MMF-ACOD-U-0001-HP");
1.1558 + }
1.1559 +
1.1560 +/** @xxxx
1.1561 + * Instantiate a codec by FourCC Codes and preferred supplier
1.1562 + * @test Req. under test REQ172.6.3
1.1563 + */
1.1564 +TVerdict CTest_MMF_ACOD_U_0001::DoTestStepL()
1.1565 + {
1.1566 + TBool testOK = EFalse;
1.1567 + TRAPD(err, testOK = TestNewLPreferredSupplierL());
1.1568 +
1.1569 + if (err)
1.1570 + {
1.1571 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.1572 + return EFail;
1.1573 + }
1.1574 + else if (!testOK)
1.1575 + {
1.1576 + INFO_PRINTF1(_L("Test failed"));
1.1577 + return EFail;
1.1578 + }
1.1579 + else
1.1580 + return EPass;
1.1581 + }
1.1582 +//------------------------------------------------------------------
1.1583 +
1.1584 +/** @xxxx
1.1585 + * Constructor
1.1586 + */
1.1587 +CTest_MMF_ACOD_U_0002::CTest_MMF_ACOD_U_0002()
1.1588 + {
1.1589 + // store the name of this test case
1.1590 + // this is the name that is used by the script file
1.1591 + // Each test step initialises it's own name
1.1592 + iTestStepName = _L("MM-MMF-ACOD-U-0002-HP");
1.1593 + }
1.1594 +
1.1595 +/** @xxxx
1.1596 + * ALAW To PCM16 Instantiate codec by FourCC Codes
1.1597 + * @test Req. under test REQ172.6.2, REQ172.11.1
1.1598 + */
1.1599 +TVerdict CTest_MMF_ACOD_U_0002::DoTestStepL()
1.1600 + {
1.1601 + TBool testOK = EFalse;
1.1602 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodeALAW, KMMFFourCCCodePCM16));
1.1603 +
1.1604 + if (err)
1.1605 + {
1.1606 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.1607 + return EFail;
1.1608 + }
1.1609 + else if (!testOK)
1.1610 + {
1.1611 + INFO_PRINTF1(_L("Test failed"));
1.1612 + return EFail;
1.1613 + }
1.1614 + else
1.1615 + return EPass;
1.1616 + }
1.1617 +
1.1618 +//------------------------------------------------------------------
1.1619 +
1.1620 +/** @xxxx
1.1621 + * Constructor
1.1622 + */
1.1623 +CTest_MMF_ACOD_U_0003::CTest_MMF_ACOD_U_0003()
1.1624 + {
1.1625 + // store the name of this test case
1.1626 + // this is the name that is used by the script file
1.1627 + // Each test step initialises it's own name
1.1628 + iTestStepName = _L("MM-MMF-ACOD-U-0003-HP");
1.1629 + }
1.1630 +
1.1631 +/** @xxxx
1.1632 + * ALAW To PCM16 Instantiate codec by UID
1.1633 + * @test Req. under test REQ172.6.1, REQ172.11.1
1.1634 + */
1.1635 +TVerdict CTest_MMF_ACOD_U_0003::DoTestStepL()
1.1636 + {
1.1637 + const TUid codecUid = {KMmfUidCodecAlawToPCM16};
1.1638 + TBool testOK = EFalse;
1.1639 + TRAPD(err, testOK = TestNewL(codecUid));
1.1640 +
1.1641 + if (err)
1.1642 + {
1.1643 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.1644 + return EFail;
1.1645 + }
1.1646 + else if (!testOK)
1.1647 + {
1.1648 + INFO_PRINTF1(_L("Test failed"));
1.1649 + return EFail;
1.1650 + }
1.1651 + else
1.1652 + return EPass;
1.1653 + }
1.1654 +
1.1655 +//------------------------------------------------------------------
1.1656 +
1.1657 +/** @xxxx
1.1658 + * Constructor
1.1659 + */
1.1660 +CTest_MMF_ACOD_U_0004::CTest_MMF_ACOD_U_0004()
1.1661 + {
1.1662 + // store the name of this test case
1.1663 + // this is the name that is used by the script file
1.1664 + // Each test step initialises it's own name
1.1665 + iTestStepName = _L("MM-MMF-ACOD-U-0004-HP");
1.1666 +
1.1667 + for (TUint i=0; i<5; i++)
1.1668 + {
1.1669 + iExpectedSrcBytesProcessed[i] = 50;
1.1670 + iExpectedDstBytesAdded[i] = 100;
1.1671 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.1672 + }
1.1673 + }
1.1674 +
1.1675 +/** @xxxx
1.1676 + * ALAW To PCM16 Pass in small source buffers
1.1677 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.1678 + */
1.1679 +TVerdict CTest_MMF_ACOD_U_0004::DoTestStepL()
1.1680 + {
1.1681 + const TUid codecUid = {KMmfUidCodecAlawToPCM16};
1.1682 + TBool testOK = EFalse;
1.1683 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KAlawToPCM16OptimumDst));
1.1684 +
1.1685 + if (err)
1.1686 + {
1.1687 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.1688 + return EFail;
1.1689 + }
1.1690 + else if (!testOK)
1.1691 + {
1.1692 + INFO_PRINTF1(_L("Test failed"));
1.1693 + return EFail;
1.1694 + }
1.1695 + else
1.1696 + return EPass;
1.1697 + }
1.1698 +
1.1699 +//------------------------------------------------------------------
1.1700 +
1.1701 +/** @xxxx
1.1702 + * Constructor
1.1703 + */
1.1704 +CTest_MMF_ACOD_U_0005::CTest_MMF_ACOD_U_0005()
1.1705 + {
1.1706 + // store the name of this test case
1.1707 + // this is the name that is used by the script file
1.1708 + // Each test step initialises it's own name
1.1709 + iTestStepName = _L("MM-MMF-ACOD-U-0005-HP");
1.1710 +
1.1711 + for (TUint i=0; i<5; i++)
1.1712 + {
1.1713 + iExpectedSrcBytesProcessed[i] = 25;
1.1714 + iExpectedDstBytesAdded[i] = 50;
1.1715 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.1716 + }
1.1717 + }
1.1718 +
1.1719 +/** @xxxx
1.1720 + * ALAW To PCM16 Pass in small dest buffers
1.1721 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.1722 + */
1.1723 +TVerdict CTest_MMF_ACOD_U_0005::DoTestStepL()
1.1724 + {
1.1725 + const TUid codecUid = {KMmfUidCodecAlawToPCM16};
1.1726 + TBool testOK = EFalse;
1.1727 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KAlawToPCM16OptimumSrc, KSmallBufferSize));
1.1728 +
1.1729 + if (err)
1.1730 + {
1.1731 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.1732 + return EFail;
1.1733 + }
1.1734 + else if (!testOK)
1.1735 + {
1.1736 + INFO_PRINTF1(_L("Test failed"));
1.1737 + return EFail;
1.1738 + }
1.1739 + else
1.1740 + return EPass;
1.1741 + }
1.1742 +
1.1743 +//------------------------------------------------------------------
1.1744 +
1.1745 +/** @xxxx
1.1746 + * Constructor
1.1747 + */
1.1748 +CTest_MMF_ACOD_U_0006::CTest_MMF_ACOD_U_0006()
1.1749 + {
1.1750 + // store the name of this test case
1.1751 + // this is the name that is used by the script file
1.1752 + // Each test step initialises it's own name
1.1753 + iTestStepName = _L("MM-MMF-ACOD-U-0006-HP");
1.1754 + iHeapSize = 0x20000;
1.1755 +
1.1756 + for (TUint i=0; i<5; i++)
1.1757 + {
1.1758 + iExpectedSrcBytesProcessed[i] = 5000;
1.1759 + iExpectedDstBytesAdded[i] = 10000;
1.1760 +
1.1761 + if((i%2)==0)//even i
1.1762 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.1763 + else //odd i
1.1764 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.1765 + }
1.1766 + }
1.1767 +
1.1768 +/** @xxxx
1.1769 + * ALAW To PCM16 Pass in large buffers
1.1770 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.1771 + */
1.1772 +TVerdict CTest_MMF_ACOD_U_0006::DoTestStepL()
1.1773 + {
1.1774 + const TUid codecUid = {KMmfUidCodecAlawToPCM16};
1.1775 + TBool testOK = EFalse;
1.1776 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize));
1.1777 +
1.1778 + if (err)
1.1779 + {
1.1780 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.1781 + return EFail;
1.1782 + }
1.1783 + else if (!testOK)
1.1784 + {
1.1785 + INFO_PRINTF1(_L("Test failed"));
1.1786 + return EFail;
1.1787 + }
1.1788 + else
1.1789 + return EPass;
1.1790 + }
1.1791 +
1.1792 +//------------------------------------------------------------------
1.1793 +
1.1794 +/** @xxxx
1.1795 + * Constructor
1.1796 + */
1.1797 +CTest_MMF_ACOD_U_0007::CTest_MMF_ACOD_U_0007()
1.1798 + {
1.1799 + // store the name of this test case
1.1800 + // this is the name that is used by the script file
1.1801 + // Each test step initialises it's own name
1.1802 + iTestStepName = _L("MM-MMF-ACOD-U-0007-HP");
1.1803 +
1.1804 + for (TUint i=0; i<5; i++)
1.1805 + {
1.1806 + iExpectedSrcBytesProcessed[i] = 0x800;
1.1807 + iExpectedDstBytesAdded[i] = 0x1000;
1.1808 +
1.1809 + if((i%2)==0)//even i
1.1810 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.1811 + else //odd i
1.1812 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.1813 + }
1.1814 + }
1.1815 +
1.1816 +/** @xxxx
1.1817 + * ALAW To PCM16 Pass in default sized buffers
1.1818 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.1819 + */
1.1820 +TVerdict CTest_MMF_ACOD_U_0007::DoTestStepL()
1.1821 + {
1.1822 + const TUid codecUid = {KMmfUidCodecAlawToPCM16};
1.1823 + TBool testOK = EFalse;
1.1824 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize));
1.1825 +
1.1826 + if (err)
1.1827 + {
1.1828 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.1829 + return EFail;
1.1830 + }
1.1831 + else if (!testOK)
1.1832 + {
1.1833 + INFO_PRINTF1(_L("Test failed"));
1.1834 + return EFail;
1.1835 + }
1.1836 + else
1.1837 + return EPass;
1.1838 + }
1.1839 +
1.1840 +//------------------------------------------------------------------
1.1841 +
1.1842 +/** @xxxx
1.1843 + * Constructor
1.1844 + */
1.1845 +CTest_MMF_ACOD_U_0008::CTest_MMF_ACOD_U_0008()
1.1846 + {
1.1847 + // store the name of this test case
1.1848 + // this is the name that is used by the script file
1.1849 + // Each test step initialises it's own name
1.1850 + iTestStepName = _L("MM-MMF-ACOD-U-0008-HP");
1.1851 +
1.1852 + for (TUint i=0; i<5; i++)
1.1853 + {
1.1854 + iExpectedSrcBytesProcessed[i] = 0x800;
1.1855 + iExpectedDstBytesAdded[i] = 0x1000;
1.1856 +
1.1857 + if((i%2)==0)//even i
1.1858 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.1859 + else //odd i
1.1860 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.1861 + }
1.1862 + }
1.1863 +
1.1864 +/** @xxxx
1.1865 + * ALAW To PCM16 Pass in buffers with different max length and length
1.1866 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.1867 + */
1.1868 +TVerdict CTest_MMF_ACOD_U_0008::DoTestStepL()
1.1869 + {
1.1870 + const TUid codecUid = {KMmfUidCodecAlawToPCM16};
1.1871 + TBool testOK = EFalse;
1.1872 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize));
1.1873 +
1.1874 + if (err)
1.1875 + {
1.1876 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.1877 + return EFail;
1.1878 + }
1.1879 + else if (!testOK)
1.1880 + {
1.1881 + INFO_PRINTF1(_L("Test failed"));
1.1882 + return EFail;
1.1883 + }
1.1884 + else
1.1885 + return EPass;
1.1886 + }
1.1887 +
1.1888 +//------------------------------------------------------------------
1.1889 +
1.1890 +/** @xxxx
1.1891 + * Constructor
1.1892 + */
1.1893 +CTest_MMF_ACOD_U_0009::CTest_MMF_ACOD_U_0009()
1.1894 + {
1.1895 + // store the name of this test case
1.1896 + // this is the name that is used by the script file
1.1897 + // Each test step initialises it's own name
1.1898 + iTestStepName = _L("MM-MMF-ACOD-U-0009-HP");
1.1899 +
1.1900 + for (TUint i=0; i<5; i++)
1.1901 + {
1.1902 + iExpectedSrcBytesProcessed[i] = 0x800;
1.1903 + iExpectedDstBytesAdded[i] = 0x1000;
1.1904 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.1905 + }
1.1906 + }
1.1907 +
1.1908 +/** @xxxx
1.1909 + * ALAW To PCM16 Pass in buffers of optimum size
1.1910 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.1911 + */
1.1912 +TVerdict CTest_MMF_ACOD_U_0009::DoTestStepL()
1.1913 + {
1.1914 + const TUid codecUid = {KMmfUidCodecAlawToPCM16};
1.1915 + TBool testOK = EFalse;
1.1916 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KAlawToPCM16OptimumSrc, KAlawToPCM16OptimumDst));
1.1917 +
1.1918 + if (err)
1.1919 + {
1.1920 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.1921 + return EFail;
1.1922 + }
1.1923 + else if (!testOK)
1.1924 + {
1.1925 + INFO_PRINTF1(_L("Test failed"));
1.1926 + return EFail;
1.1927 + }
1.1928 + else
1.1929 + return EPass;
1.1930 + }
1.1931 +
1.1932 +//------------------------------------------------------------------
1.1933 +
1.1934 +/** @xxxx
1.1935 + * Constructor
1.1936 + */
1.1937 +CTest_MMF_ACOD_U_0010::CTest_MMF_ACOD_U_0010()
1.1938 + {
1.1939 + // store the name of this test case
1.1940 + // this is the name that is used by the script file
1.1941 + // Each test step initialises it's own name
1.1942 + iTestStepName = _L("MM-MMF-ACOD-U-0010-HP");
1.1943 +// iHeapSize = 0x20000;
1.1944 + }
1.1945 +
1.1946 +/** @xxxx
1.1947 + * ALAW To PCM16 Reposition source pointer during conversion
1.1948 + * @test Req. under test REQ172.11
1.1949 + */
1.1950 +TVerdict CTest_MMF_ACOD_U_0010::DoTestStepL()
1.1951 + {
1.1952 + const TUid codecUid = {KMmfUidCodecAlawToPCM16};
1.1953 + TBool testOK = EFalse;
1.1954 + INFO_PRINTF1(_L(">> The ALAW to PCM16 codec doesn't currently store data between calls to ProcessL"));
1.1955 +
1.1956 + TRAPD(err, testOK = TestRepositionL(codecUid, KAlawToPCM16OptimumSrc, KAlawToPCM16OptimumDst+30));
1.1957 +
1.1958 + if (err)
1.1959 + {
1.1960 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.1961 + return EFail;
1.1962 + }
1.1963 + else if (!testOK)
1.1964 + {
1.1965 + INFO_PRINTF1(_L("Test failed"));
1.1966 + return EFail;
1.1967 + }
1.1968 + else
1.1969 + return EPass;
1.1970 + }
1.1971 +
1.1972 +//------------------------------------------------------------------
1.1973 +
1.1974 +/** @xxxx
1.1975 + * Constructor
1.1976 + */
1.1977 +CTest_MMF_ACOD_U_0011::CTest_MMF_ACOD_U_0011()
1.1978 + {
1.1979 + // store the name of this test case
1.1980 + // this is the name that is used by the script file
1.1981 + // Each test step initialises it's own name
1.1982 + iTestStepName = _L("MM-MMF-ACOD-U-0011-HP");
1.1983 + }
1.1984 +
1.1985 +/** @xxxx
1.1986 + * PCM16 To ALAW Instantiate codec by FourCC Codes
1.1987 + * @test Req. under test REQ172.6.2, REQ172.11.3
1.1988 + */
1.1989 +TVerdict CTest_MMF_ACOD_U_0011::DoTestStepL()
1.1990 + {
1.1991 + TBool testOK = EFalse;
1.1992 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodeALAW));
1.1993 +
1.1994 + if (err)
1.1995 + {
1.1996 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.1997 + return EFail;
1.1998 + }
1.1999 + else if (!testOK)
1.2000 + {
1.2001 + INFO_PRINTF1(_L("Test failed"));
1.2002 + return EFail;
1.2003 + }
1.2004 + else
1.2005 + return EPass;
1.2006 + }
1.2007 +
1.2008 +//------------------------------------------------------------------
1.2009 +
1.2010 +/** @xxxx
1.2011 + * Constructor
1.2012 + */
1.2013 +CTest_MMF_ACOD_U_0012::CTest_MMF_ACOD_U_0012()
1.2014 + {
1.2015 + // store the name of this test case
1.2016 + // this is the name that is used by the script file
1.2017 + // Each test step initialises it's own name
1.2018 + iTestStepName = _L("MM-MMF-ACOD-U-0012-HP");
1.2019 + }
1.2020 +
1.2021 +/** @xxxx
1.2022 + * PCM16 To ALAW Instantiate codec by UID
1.2023 + * @test Req. under test REQ172.6.1, REQ172.11.3
1.2024 + */
1.2025 +TVerdict CTest_MMF_ACOD_U_0012::DoTestStepL()
1.2026 + {
1.2027 + const TUid codecUid = {KMmfUidCodecPCM16ToAlaw};
1.2028 + TBool testOK = EFalse;
1.2029 + TRAPD(err, testOK = TestNewL(codecUid));
1.2030 +
1.2031 + if (err)
1.2032 + {
1.2033 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2034 + return EFail;
1.2035 + }
1.2036 + else if (!testOK)
1.2037 + {
1.2038 + INFO_PRINTF1(_L("Test failed"));
1.2039 + return EFail;
1.2040 + }
1.2041 + else
1.2042 + return EPass;
1.2043 + }
1.2044 +
1.2045 +//------------------------------------------------------------------
1.2046 +
1.2047 +/** @xxxx
1.2048 + * Constructor
1.2049 + */
1.2050 +CTest_MMF_ACOD_U_0013::CTest_MMF_ACOD_U_0013()
1.2051 + {
1.2052 + // store the name of this test case
1.2053 + // this is the name that is used by the script file
1.2054 + // Each test step initialises it's own name
1.2055 + iTestStepName = _L("MM-MMF-ACOD-U-0013-HP");
1.2056 +
1.2057 + for (TUint i=0; i<5; i++)
1.2058 + {
1.2059 + iExpectedSrcBytesProcessed[i] = 50;
1.2060 + iExpectedDstBytesAdded[i] = 25;
1.2061 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.2062 + }
1.2063 + }
1.2064 +
1.2065 +/** @xxxx
1.2066 + * PCM16 To ALAW Pass in small source buffers
1.2067 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2068 + */
1.2069 +TVerdict CTest_MMF_ACOD_U_0013::DoTestStepL()
1.2070 + {
1.2071 + const TUid codecUid = {KMmfUidCodecPCM16ToAlaw};
1.2072 + TBool testOK = EFalse;
1.2073 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToAlawOptimumDst));
1.2074 +
1.2075 + if (err)
1.2076 + {
1.2077 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2078 + return EFail;
1.2079 + }
1.2080 + else if (!testOK)
1.2081 + {
1.2082 + INFO_PRINTF1(_L("Test failed"));
1.2083 + return EFail;
1.2084 + }
1.2085 + else
1.2086 + return EPass;
1.2087 + }
1.2088 +
1.2089 +//------------------------------------------------------------------
1.2090 +
1.2091 +/** @xxxx
1.2092 + * Constructor
1.2093 + */
1.2094 +CTest_MMF_ACOD_U_0014::CTest_MMF_ACOD_U_0014()
1.2095 + {
1.2096 + // store the name of this test case
1.2097 + // this is the name that is used by the script file
1.2098 + // Each test step initialises it's own name
1.2099 + iTestStepName = _L("MM-MMF-ACOD-U-0014-HP");
1.2100 +
1.2101 + for (TUint i=0; i<5; i++)
1.2102 + {
1.2103 + iExpectedSrcBytesProcessed[i] = 100;
1.2104 + iExpectedDstBytesAdded[i] = 50;
1.2105 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.2106 + }
1.2107 + }
1.2108 +
1.2109 +/** @xxxx
1.2110 + * PCM16 To ALAW Pass in small dest buffers
1.2111 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2112 + */
1.2113 +TVerdict CTest_MMF_ACOD_U_0014::DoTestStepL()
1.2114 + {
1.2115 + const TUid codecUid = {KMmfUidCodecPCM16ToAlaw};
1.2116 + TBool testOK = EFalse;
1.2117 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToAlawOptimumSrc, KSmallBufferSize));
1.2118 +
1.2119 + if (err)
1.2120 + {
1.2121 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2122 + return EFail;
1.2123 + }
1.2124 + else if (!testOK)
1.2125 + {
1.2126 + INFO_PRINTF1(_L("Test failed"));
1.2127 + return EFail;
1.2128 + }
1.2129 + else
1.2130 + return EPass;
1.2131 + }
1.2132 +
1.2133 +//------------------------------------------------------------------
1.2134 +
1.2135 +/** @xxxx
1.2136 + * Constructor
1.2137 + */
1.2138 +CTest_MMF_ACOD_U_0015::CTest_MMF_ACOD_U_0015()
1.2139 + {
1.2140 + // store the name of this test case
1.2141 + // this is the name that is used by the script file
1.2142 + // Each test step initialises it's own name
1.2143 + iTestStepName = _L("MM-MMF-ACOD-U-0015-HP");
1.2144 + iHeapSize = 0x20000;
1.2145 +
1.2146 + for (TUint i=0; i<5; i++)
1.2147 + {
1.2148 + iExpectedSrcBytesProcessed[i] = 10000;
1.2149 + iExpectedDstBytesAdded[i] = 5000;
1.2150 +
1.2151 + if((i%2)==0)//even i
1.2152 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.2153 + else //odd i
1.2154 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.2155 + }
1.2156 + }
1.2157 +
1.2158 +/** @xxxx
1.2159 + * PCM16 To ALAW Pass in large buffers
1.2160 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2161 + */
1.2162 +TVerdict CTest_MMF_ACOD_U_0015::DoTestStepL()
1.2163 + {
1.2164 + const TUid codecUid = {KMmfUidCodecPCM16ToAlaw};
1.2165 + TBool testOK = EFalse;
1.2166 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize));
1.2167 +
1.2168 + if (err)
1.2169 + {
1.2170 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2171 + return EFail;
1.2172 + }
1.2173 + else if (!testOK)
1.2174 + {
1.2175 + INFO_PRINTF1(_L("Test failed"));
1.2176 + return EFail;
1.2177 + }
1.2178 + else
1.2179 + return EPass;
1.2180 + }
1.2181 +
1.2182 +//------------------------------------------------------------------
1.2183 +
1.2184 +/** @xxxx
1.2185 + * Constructor
1.2186 + */
1.2187 +CTest_MMF_ACOD_U_0016::CTest_MMF_ACOD_U_0016()
1.2188 + {
1.2189 + // store the name of this test case
1.2190 + // this is the name that is used by the script file
1.2191 + // Each test step initialises it's own name
1.2192 + iTestStepName = _L("MM-MMF-ACOD-U-0016-HP");
1.2193 +
1.2194 + for (TUint i=0; i<5; i++)
1.2195 + {
1.2196 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.2197 + iExpectedDstBytesAdded[i] = 0x800;
1.2198 +
1.2199 + if((i%2)==0)//even i
1.2200 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.2201 + else //odd i
1.2202 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.2203 + }
1.2204 + }
1.2205 +
1.2206 +/** @xxxx
1.2207 + * PCM16 To ALAW Pass in default sized buffers
1.2208 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2209 + */
1.2210 +TVerdict CTest_MMF_ACOD_U_0016::DoTestStepL()
1.2211 + {
1.2212 + const TUid codecUid = {KMmfUidCodecPCM16ToAlaw};
1.2213 + TBool testOK = EFalse;
1.2214 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize));
1.2215 +
1.2216 + if (err)
1.2217 + {
1.2218 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2219 + return EFail;
1.2220 + }
1.2221 + else if (!testOK)
1.2222 + {
1.2223 + INFO_PRINTF1(_L("Test failed"));
1.2224 + return EFail;
1.2225 + }
1.2226 + else
1.2227 + return EPass;
1.2228 + }
1.2229 +
1.2230 +//------------------------------------------------------------------
1.2231 +
1.2232 +/** @xxxx
1.2233 + * Constructor
1.2234 + */
1.2235 +CTest_MMF_ACOD_U_0017::CTest_MMF_ACOD_U_0017()
1.2236 + {
1.2237 + // store the name of this test case
1.2238 + // this is the name that is used by the script file
1.2239 + // Each test step initialises it's own name
1.2240 + iTestStepName = _L("MM-MMF-ACOD-U-0017-HP");
1.2241 +
1.2242 + for (TUint i=0; i<5; i++)
1.2243 + {
1.2244 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.2245 + iExpectedDstBytesAdded[i] = 0x800;
1.2246 +
1.2247 + if((i%2)==0)//even i
1.2248 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.2249 + else //odd i
1.2250 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.2251 + }
1.2252 + }
1.2253 +
1.2254 +/** @xxxx
1.2255 + * PCM16 To ALAW Pass in buffers with different max length and length
1.2256 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2257 + */
1.2258 +TVerdict CTest_MMF_ACOD_U_0017::DoTestStepL()
1.2259 + {
1.2260 + const TUid codecUid = {KMmfUidCodecPCM16ToAlaw};
1.2261 + TBool testOK = EFalse;
1.2262 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize));
1.2263 +
1.2264 + if (err)
1.2265 + {
1.2266 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2267 + return EFail;
1.2268 + }
1.2269 + else if (!testOK)
1.2270 + {
1.2271 + INFO_PRINTF1(_L("Test failed"));
1.2272 + return EFail;
1.2273 + }
1.2274 + else
1.2275 + return EPass;
1.2276 + }
1.2277 +
1.2278 +//------------------------------------------------------------------
1.2279 +
1.2280 +/** @xxxx
1.2281 + * Constructor
1.2282 + */
1.2283 +CTest_MMF_ACOD_U_0018::CTest_MMF_ACOD_U_0018()
1.2284 + {
1.2285 + // store the name of this test case
1.2286 + // this is the name that is used by the script file
1.2287 + // Each test step initialises it's own name
1.2288 + iTestStepName = _L("MM-MMF-ACOD-U-0018-HP");
1.2289 +
1.2290 + for (TUint i=0; i<5; i++)
1.2291 + {
1.2292 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.2293 + iExpectedDstBytesAdded[i] = 0x800;
1.2294 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.2295 + }
1.2296 + }
1.2297 +
1.2298 +/** @xxxx
1.2299 + * PCM16 To ALAW Pass in buffers of optimum size
1.2300 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2301 + */
1.2302 +TVerdict CTest_MMF_ACOD_U_0018::DoTestStepL()
1.2303 + {
1.2304 + const TUid codecUid = {KMmfUidCodecPCM16ToAlaw};
1.2305 + TBool testOK = EFalse;
1.2306 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToAlawOptimumSrc, KPCM16ToAlawOptimumDst));
1.2307 +
1.2308 + if (err)
1.2309 + {
1.2310 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2311 + return EFail;
1.2312 + }
1.2313 + else if (!testOK)
1.2314 + {
1.2315 + INFO_PRINTF1(_L("Test failed"));
1.2316 + return EFail;
1.2317 + }
1.2318 + else
1.2319 + return EPass;
1.2320 + }
1.2321 +
1.2322 +//------------------------------------------------------------------
1.2323 +
1.2324 +/** @xxxx
1.2325 + * Constructor
1.2326 + */
1.2327 +CTest_MMF_ACOD_U_0019::CTest_MMF_ACOD_U_0019()
1.2328 + {
1.2329 + // store the name of this test case
1.2330 + // this is the name that is used by the script file
1.2331 + // Each test step initialises it's own name
1.2332 + iTestStepName = _L("MM-MMF-ACOD-U-0019-HP");
1.2333 +// iHeapSize = 0x20000;
1.2334 + }
1.2335 +
1.2336 +/** @xxxx
1.2337 + * PCM16 To ALAW Reposition source pointer during conversion
1.2338 + * @test Req. under test REQ172.11
1.2339 + */
1.2340 +TVerdict CTest_MMF_ACOD_U_0019::DoTestStepL()
1.2341 + {
1.2342 + const TUid codecUid = {KMmfUidCodecPCM16ToAlaw};
1.2343 + TBool testOK = EFalse;
1.2344 +
1.2345 + INFO_PRINTF1(_L(">> The PCM16 to ALAW codec doesn't currently store data between calls to ProcessL"));
1.2346 + TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30));
1.2347 +
1.2348 + if (err)
1.2349 + {
1.2350 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2351 + return EFail;
1.2352 + }
1.2353 + else if (!testOK)
1.2354 + {
1.2355 + INFO_PRINTF1(_L("Test failed"));
1.2356 + return EFail;
1.2357 + }
1.2358 + else
1.2359 + return EPass;
1.2360 + }
1.2361 +
1.2362 +//------------------------------------------------------------------
1.2363 +
1.2364 +/** @xxxx
1.2365 + * Constructor
1.2366 + */
1.2367 +CTest_MMF_ACOD_U_0020::CTest_MMF_ACOD_U_0020()
1.2368 + {
1.2369 + // store the name of this test case
1.2370 + // this is the name that is used by the script file
1.2371 + // Each test step initialises it's own name
1.2372 + iTestStepName = _L("MM-MMF-ACOD-U-0020-HP");
1.2373 + }
1.2374 +
1.2375 +/** @xxxx
1.2376 + * PCM8 To PCM16 Instantiate codec by FourCC Codes
1.2377 + * @test Req. under test REQ172.6.2, REQ172.11.4
1.2378 + */
1.2379 +TVerdict CTest_MMF_ACOD_U_0020::DoTestStepL()
1.2380 + {
1.2381 + TBool testOK = EFalse;
1.2382 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM8, KMMFFourCCCodePCM16));
1.2383 +
1.2384 + if (err)
1.2385 + {
1.2386 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2387 + return EFail;
1.2388 + }
1.2389 + else if (!testOK)
1.2390 + {
1.2391 + INFO_PRINTF1(_L("Test failed"));
1.2392 + return EFail;
1.2393 + }
1.2394 + else
1.2395 + return EPass;
1.2396 + }
1.2397 +
1.2398 +//------------------------------------------------------------------
1.2399 +
1.2400 +/** @xxxx
1.2401 + * Constructor
1.2402 + */
1.2403 +CTest_MMF_ACOD_U_0021::CTest_MMF_ACOD_U_0021()
1.2404 + {
1.2405 + // store the name of this test case
1.2406 + // this is the name that is used by the script file
1.2407 + // Each test step initialises it's own name
1.2408 + iTestStepName = _L("MM-MMF-ACOD-U-0021-HP");
1.2409 + }
1.2410 +
1.2411 +/** @xxxx
1.2412 + * PCM8 To PCM16 Instantiate codec by UID
1.2413 + * @test Req. under test REQ172.6.1, REQ172.11.4
1.2414 + */
1.2415 +TVerdict CTest_MMF_ACOD_U_0021::DoTestStepL()
1.2416 + {
1.2417 + const TUid codecUid = {KMmfUidCodecPCM8ToPCM16};
1.2418 + TBool testOK = EFalse;
1.2419 + TRAPD(err, testOK = TestNewL(codecUid));
1.2420 +
1.2421 + if (err)
1.2422 + {
1.2423 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2424 + return EFail;
1.2425 + }
1.2426 + else if (!testOK)
1.2427 + {
1.2428 + INFO_PRINTF1(_L("Test failed"));
1.2429 + return EFail;
1.2430 + }
1.2431 + else
1.2432 + return EPass;
1.2433 + }
1.2434 +
1.2435 +//------------------------------------------------------------------
1.2436 +
1.2437 +/** @xxxx
1.2438 + * Constructor
1.2439 + */
1.2440 +CTest_MMF_ACOD_U_0022::CTest_MMF_ACOD_U_0022()
1.2441 + {
1.2442 + // store the name of this test case
1.2443 + // this is the name that is used by the script file
1.2444 + // Each test step initialises it's own name
1.2445 + iTestStepName = _L("MM-MMF-ACOD-U-0022-HP");
1.2446 +
1.2447 + for (TUint i=0; i<5; i++)
1.2448 + {
1.2449 + iExpectedSrcBytesProcessed[i] = 50;
1.2450 + iExpectedDstBytesAdded[i] = 100;
1.2451 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.2452 + }
1.2453 + }
1.2454 +
1.2455 +/** @xxxx
1.2456 + * PCM8 To PCM16 Pass in small source buffers
1.2457 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2458 + */
1.2459 +TVerdict CTest_MMF_ACOD_U_0022::DoTestStepL()
1.2460 + {
1.2461 + const TUid codecUid = {KMmfUidCodecPCM8ToPCM16};
1.2462 + TBool testOK = EFalse;
1.2463 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM8ToPCM16OptimumDst));
1.2464 +
1.2465 + if (err)
1.2466 + {
1.2467 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2468 + return EFail;
1.2469 + }
1.2470 + else if (!testOK)
1.2471 + {
1.2472 + INFO_PRINTF1(_L("Test failed"));
1.2473 + return EFail;
1.2474 + }
1.2475 + else
1.2476 + return EPass;
1.2477 + }
1.2478 +
1.2479 +//------------------------------------------------------------------
1.2480 +
1.2481 +/** @xxxx
1.2482 + * Constructor
1.2483 + */
1.2484 +CTest_MMF_ACOD_U_0023::CTest_MMF_ACOD_U_0023()
1.2485 + {
1.2486 + // store the name of this test case
1.2487 + // this is the name that is used by the script file
1.2488 + // Each test step initialises it's own name
1.2489 + iTestStepName = _L("MM-MMF-ACOD-U-0023-HP");
1.2490 +
1.2491 + for (TUint i=0; i<5; i++)
1.2492 + {
1.2493 + iExpectedSrcBytesProcessed[i] = 25;
1.2494 + iExpectedDstBytesAdded[i] = 50;
1.2495 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.2496 + }
1.2497 + }
1.2498 +
1.2499 +/** @xxxx
1.2500 + * PCM8 To PCM16 Pass in small dest buffers
1.2501 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2502 + */
1.2503 +TVerdict CTest_MMF_ACOD_U_0023::DoTestStepL()
1.2504 + {
1.2505 + const TUid codecUid = {KMmfUidCodecPCM8ToPCM16};
1.2506 + TBool testOK = EFalse;
1.2507 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM8ToPCM16OptimumSrc, KSmallBufferSize));
1.2508 +
1.2509 + if (err)
1.2510 + {
1.2511 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2512 + return EFail;
1.2513 + }
1.2514 + else if (!testOK)
1.2515 + {
1.2516 + INFO_PRINTF1(_L("Test failed"));
1.2517 + return EFail;
1.2518 + }
1.2519 + else
1.2520 + return EPass;
1.2521 + }
1.2522 +
1.2523 +//------------------------------------------------------------------
1.2524 +
1.2525 +/** @xxxx
1.2526 + * Constructor
1.2527 + */
1.2528 +CTest_MMF_ACOD_U_0024::CTest_MMF_ACOD_U_0024()
1.2529 + {
1.2530 + // store the name of this test case
1.2531 + // this is the name that is used by the script file
1.2532 + // Each test step initialises it's own name
1.2533 + iTestStepName = _L("MM-MMF-ACOD-U-0024-HP");
1.2534 + iHeapSize = 0x20000;
1.2535 +
1.2536 + for (TUint i=0; i<5; i++)
1.2537 + {
1.2538 + iExpectedSrcBytesProcessed[i] = 5000;
1.2539 + iExpectedDstBytesAdded[i] = 10000;
1.2540 +
1.2541 + if((i%2)==0)//even i
1.2542 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.2543 + else //odd i
1.2544 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.2545 + }
1.2546 + }
1.2547 +
1.2548 +/** @xxxx
1.2549 + * PCM8 To PCM16 Pass in large buffers
1.2550 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2551 + */
1.2552 +TVerdict CTest_MMF_ACOD_U_0024::DoTestStepL()
1.2553 + {
1.2554 + const TUid codecUid = {KMmfUidCodecPCM8ToPCM16};
1.2555 + TBool testOK = EFalse;
1.2556 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize));
1.2557 +
1.2558 + if (err)
1.2559 + {
1.2560 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2561 + return EFail;
1.2562 + }
1.2563 + else if (!testOK)
1.2564 + {
1.2565 + INFO_PRINTF1(_L("Test failed"));
1.2566 + return EFail;
1.2567 + }
1.2568 + else
1.2569 + return EPass;
1.2570 + }
1.2571 +
1.2572 +//------------------------------------------------------------------
1.2573 +
1.2574 +/** @xxxx
1.2575 + * Constructor
1.2576 + */
1.2577 +CTest_MMF_ACOD_U_0025::CTest_MMF_ACOD_U_0025()
1.2578 + {
1.2579 + // store the name of this test case
1.2580 + // this is the name that is used by the script file
1.2581 + // Each test step initialises it's own name
1.2582 + iTestStepName = _L("MM-MMF-ACOD-U-0025-HP");
1.2583 +
1.2584 + for (TUint i=0; i<5; i++)
1.2585 + {
1.2586 + iExpectedSrcBytesProcessed[i] = 0x800;
1.2587 + iExpectedDstBytesAdded[i] = 0x1000;
1.2588 +
1.2589 + if((i%2)==0)//even i
1.2590 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.2591 + else //odd i
1.2592 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.2593 + }
1.2594 + }
1.2595 +
1.2596 +/** @xxxx
1.2597 + * PCM8 To PCM16 Pass in default sized buffers
1.2598 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2599 + */
1.2600 +TVerdict CTest_MMF_ACOD_U_0025::DoTestStepL()
1.2601 + {
1.2602 + const TUid codecUid = {KMmfUidCodecPCM8ToPCM16};
1.2603 + TBool testOK = EFalse;
1.2604 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize));
1.2605 +
1.2606 + if (err)
1.2607 + {
1.2608 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2609 + return EFail;
1.2610 + }
1.2611 + else if (!testOK)
1.2612 + {
1.2613 + INFO_PRINTF1(_L("Test failed"));
1.2614 + return EFail;
1.2615 + }
1.2616 + else
1.2617 + return EPass;
1.2618 + }
1.2619 +
1.2620 +//------------------------------------------------------------------
1.2621 +
1.2622 +/** @xxxx
1.2623 + * Constructor
1.2624 + */
1.2625 +CTest_MMF_ACOD_U_0026::CTest_MMF_ACOD_U_0026()
1.2626 + {
1.2627 + // store the name of this test case
1.2628 + // this is the name that is used by the script file
1.2629 + // Each test step initialises it's own name
1.2630 + iTestStepName = _L("MM-MMF-ACOD-U-0026-HP");
1.2631 +
1.2632 + for (TUint i=0; i<5; i++)
1.2633 + {
1.2634 + iExpectedSrcBytesProcessed[i] = 0x800;
1.2635 + iExpectedDstBytesAdded[i] = 0x1000;
1.2636 +
1.2637 + if((i%2)==0)//even i
1.2638 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.2639 + else //odd i
1.2640 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.2641 + }
1.2642 + }
1.2643 +
1.2644 +/** @xxxx
1.2645 + * PCM8 To PCM16 Pass in buffers with different max length and length
1.2646 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2647 + */
1.2648 +TVerdict CTest_MMF_ACOD_U_0026::DoTestStepL()
1.2649 + {
1.2650 + const TUid codecUid = {KMmfUidCodecPCM8ToPCM16};
1.2651 + TBool testOK = EFalse;
1.2652 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize));
1.2653 +
1.2654 + if (err)
1.2655 + {
1.2656 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2657 + return EFail;
1.2658 + }
1.2659 + else if (!testOK)
1.2660 + {
1.2661 + INFO_PRINTF1(_L("Test failed"));
1.2662 + return EFail;
1.2663 + }
1.2664 + else
1.2665 + return EPass;
1.2666 + }
1.2667 +
1.2668 +//------------------------------------------------------------------
1.2669 +
1.2670 +/** @xxxx
1.2671 + * Constructor
1.2672 + */
1.2673 +CTest_MMF_ACOD_U_0027::CTest_MMF_ACOD_U_0027()
1.2674 + {
1.2675 + // store the name of this test case
1.2676 + // this is the name that is used by the script file
1.2677 + // Each test step initialises it's own name
1.2678 + iTestStepName = _L("MM-MMF-ACOD-U-0027-HP");
1.2679 +
1.2680 + for (TUint i=0; i<5; i++)
1.2681 + {
1.2682 + iExpectedSrcBytesProcessed[i] = 0x800;
1.2683 + iExpectedDstBytesAdded[i] = 0x1000;
1.2684 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.2685 + }
1.2686 + }
1.2687 +
1.2688 +/** @xxxx
1.2689 + * PCM8 To PCM16 Pass in buffers of optimum size
1.2690 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2691 + */
1.2692 +TVerdict CTest_MMF_ACOD_U_0027::DoTestStepL()
1.2693 + {
1.2694 + const TUid codecUid = {KMmfUidCodecPCM8ToPCM16};
1.2695 + TBool testOK = EFalse;
1.2696 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM8ToPCM16OptimumSrc, KPCM8ToPCM16OptimumDst));
1.2697 +
1.2698 + if (err)
1.2699 + {
1.2700 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2701 + return EFail;
1.2702 + }
1.2703 + else if (!testOK)
1.2704 + {
1.2705 + INFO_PRINTF1(_L("Test failed"));
1.2706 + return EFail;
1.2707 + }
1.2708 + else
1.2709 + return EPass;
1.2710 + }
1.2711 +
1.2712 +//------------------------------------------------------------------
1.2713 +
1.2714 +/** @xxxx
1.2715 + * Constructor
1.2716 + */
1.2717 +CTest_MMF_ACOD_U_0028::CTest_MMF_ACOD_U_0028()
1.2718 + {
1.2719 + // store the name of this test case
1.2720 + // this is the name that is used by the script file
1.2721 + // Each test step initialises it's own name
1.2722 + iTestStepName = _L("MM-MMF-ACOD-U-0028-HP");
1.2723 +// iHeapSize = 0x20000;
1.2724 + }
1.2725 +
1.2726 +/** @xxxx
1.2727 + * PCM8 To PCM16 Reposition source pointer during conversion
1.2728 + * @test Req. under test REQ172.11
1.2729 + */
1.2730 +TVerdict CTest_MMF_ACOD_U_0028::DoTestStepL()
1.2731 + {
1.2732 + const TUid codecUid = {KMmfUidCodecPCM8ToPCM16};
1.2733 + TBool testOK = EFalse;
1.2734 +
1.2735 + INFO_PRINTF1(_L(">> The PCM8 to PCM16 codec doesn't currently store data between calls to ProcessL"));
1.2736 + TRAPD(err, testOK = TestRepositionL(codecUid, KPCM8ToPCM16OptimumSrc, KPCM8ToPCM16OptimumDst+30));
1.2737 +
1.2738 + if (err)
1.2739 + {
1.2740 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2741 + return EFail;
1.2742 + }
1.2743 + else if (!testOK)
1.2744 + {
1.2745 + INFO_PRINTF1(_L("Test failed"));
1.2746 + return EFail;
1.2747 + }
1.2748 + else
1.2749 + return EPass;
1.2750 + }
1.2751 +
1.2752 +//------------------------------------------------------------------
1.2753 +
1.2754 +/** @xxxx
1.2755 + * Constructor
1.2756 + */
1.2757 +CTest_MMF_ACOD_U_0029::CTest_MMF_ACOD_U_0029()
1.2758 + {
1.2759 + // store the name of this test case
1.2760 + // this is the name that is used by the script file
1.2761 + // Each test step initialises it's own name
1.2762 + iTestStepName = _L("MM-MMF-ACOD-U-0029-HP");
1.2763 + }
1.2764 +
1.2765 +/** @xxxx
1.2766 + * PCM16 To PCM8 Instantiate codec by FourCC Codes
1.2767 + * @test Req. under test REQ172.6.2, REQ172.11.5
1.2768 + */
1.2769 +TVerdict CTest_MMF_ACOD_U_0029::DoTestStepL()
1.2770 + {
1.2771 + TBool testOK = EFalse;
1.2772 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodePCM8));
1.2773 +
1.2774 + if (err)
1.2775 + {
1.2776 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2777 + return EFail;
1.2778 + }
1.2779 + else if (!testOK)
1.2780 + {
1.2781 + INFO_PRINTF1(_L("Test failed"));
1.2782 + return EFail;
1.2783 + }
1.2784 + else
1.2785 + return EPass;
1.2786 + }
1.2787 +
1.2788 +//------------------------------------------------------------------
1.2789 +
1.2790 +/** @xxxx
1.2791 + * Constructor
1.2792 + */
1.2793 +CTest_MMF_ACOD_U_0030::CTest_MMF_ACOD_U_0030()
1.2794 + {
1.2795 + // store the name of this test case
1.2796 + // this is the name that is used by the script file
1.2797 + // Each test step initialises it's own name
1.2798 + iTestStepName = _L("MM-MMF-ACOD-U-0030-HP");
1.2799 + }
1.2800 +
1.2801 +/** @xxxx
1.2802 + * PCM16 To PCM8 Instantiate codec by UID
1.2803 + * @test Req. under test REQ172.6.1, REQ172.11.5
1.2804 + */
1.2805 +TVerdict CTest_MMF_ACOD_U_0030::DoTestStepL()
1.2806 + {
1.2807 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8};
1.2808 + TBool testOK = EFalse;
1.2809 + TRAPD(err, testOK = TestNewL(codecUid));
1.2810 +
1.2811 + if (err)
1.2812 + {
1.2813 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2814 + return EFail;
1.2815 + }
1.2816 + else if (!testOK)
1.2817 + {
1.2818 + INFO_PRINTF1(_L("Test failed"));
1.2819 + return EFail;
1.2820 + }
1.2821 + else
1.2822 + return EPass;
1.2823 + }
1.2824 +
1.2825 +//------------------------------------------------------------------
1.2826 +
1.2827 +/** @xxxx
1.2828 + * Constructor
1.2829 + */
1.2830 +CTest_MMF_ACOD_U_0031::CTest_MMF_ACOD_U_0031()
1.2831 + {
1.2832 + // store the name of this test case
1.2833 + // this is the name that is used by the script file
1.2834 + // Each test step initialises it's own name
1.2835 + iTestStepName = _L("MM-MMF-ACOD-U-0031-HP");
1.2836 +
1.2837 + for (TUint i=0; i<5; i++)
1.2838 + {
1.2839 + iExpectedSrcBytesProcessed[i] = 50;
1.2840 + iExpectedDstBytesAdded[i] = 25;
1.2841 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.2842 + }
1.2843 + }
1.2844 +
1.2845 +/** @xxxx
1.2846 + * PCM16 To PCM8 Pass in small source buffers
1.2847 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2848 + */
1.2849 +TVerdict CTest_MMF_ACOD_U_0031::DoTestStepL()
1.2850 + {
1.2851 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8};
1.2852 + TBool testOK = EFalse;
1.2853 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToPCM8OptimumDst));
1.2854 +
1.2855 + if (err)
1.2856 + {
1.2857 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2858 + return EFail;
1.2859 + }
1.2860 + else if (!testOK)
1.2861 + {
1.2862 + INFO_PRINTF1(_L("Test failed"));
1.2863 + return EFail;
1.2864 + }
1.2865 + else
1.2866 + return EPass;
1.2867 + }
1.2868 +
1.2869 +//------------------------------------------------------------------
1.2870 +
1.2871 +/** @xxxx
1.2872 + * Constructor
1.2873 + */
1.2874 +CTest_MMF_ACOD_U_0032::CTest_MMF_ACOD_U_0032()
1.2875 + {
1.2876 + // store the name of this test case
1.2877 + // this is the name that is used by the script file
1.2878 + // Each test step initialises it's own name
1.2879 + iTestStepName = _L("MM-MMF-ACOD-U-0032-HP");
1.2880 +
1.2881 + for (TUint i=0; i<5; i++)
1.2882 + {
1.2883 + iExpectedSrcBytesProcessed[i] = 100;
1.2884 + iExpectedDstBytesAdded[i] = 50;
1.2885 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.2886 + }
1.2887 + }
1.2888 +
1.2889 +/** @xxxx
1.2890 + * PCM16 To PCM8 Pass in small dest buffers
1.2891 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2892 + */
1.2893 +TVerdict CTest_MMF_ACOD_U_0032::DoTestStepL()
1.2894 + {
1.2895 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8};
1.2896 + TBool testOK = EFalse;
1.2897 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCM8OptimumSrc, KSmallBufferSize));
1.2898 +
1.2899 + if (err)
1.2900 + {
1.2901 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2902 + return EFail;
1.2903 + }
1.2904 + else if (!testOK)
1.2905 + {
1.2906 + INFO_PRINTF1(_L("Test failed"));
1.2907 + return EFail;
1.2908 + }
1.2909 + else
1.2910 + return EPass;
1.2911 + }
1.2912 +
1.2913 +//------------------------------------------------------------------
1.2914 +
1.2915 +/** @xxxx
1.2916 + * Constructor
1.2917 + */
1.2918 +CTest_MMF_ACOD_U_0033::CTest_MMF_ACOD_U_0033()
1.2919 + {
1.2920 + // store the name of this test case
1.2921 + // this is the name that is used by the script file
1.2922 + // Each test step initialises it's own name
1.2923 + iTestStepName = _L("MM-MMF-ACOD-U-0033-HP");
1.2924 + iHeapSize = 0x20000;
1.2925 +
1.2926 + for (TUint i=0; i<5; i++)
1.2927 + {
1.2928 + iExpectedSrcBytesProcessed[i] = 10000;
1.2929 + iExpectedDstBytesAdded[i] = 5000;
1.2930 +
1.2931 + if((i%2)==0)//even i
1.2932 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.2933 + else //odd i
1.2934 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.2935 + }
1.2936 + }
1.2937 +
1.2938 +/** @xxxx
1.2939 + * PCM16 To PCM8 Pass in large buffers
1.2940 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2941 + */
1.2942 +TVerdict CTest_MMF_ACOD_U_0033::DoTestStepL()
1.2943 + {
1.2944 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8};
1.2945 + TBool testOK = EFalse;
1.2946 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize));
1.2947 +
1.2948 + if (err)
1.2949 + {
1.2950 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2951 + return EFail;
1.2952 + }
1.2953 + else if (!testOK)
1.2954 + {
1.2955 + INFO_PRINTF1(_L("Test failed"));
1.2956 + return EFail;
1.2957 + }
1.2958 + else
1.2959 + return EPass;
1.2960 + }
1.2961 +
1.2962 +//------------------------------------------------------------------
1.2963 +
1.2964 +/** @xxxx
1.2965 + * Constructor
1.2966 + */
1.2967 +CTest_MMF_ACOD_U_0034::CTest_MMF_ACOD_U_0034()
1.2968 + {
1.2969 + // store the name of this test case
1.2970 + // this is the name that is used by the script file
1.2971 + // Each test step initialises it's own name
1.2972 + iTestStepName = _L("MM-MMF-ACOD-U-0034-HP");
1.2973 +
1.2974 + for (TUint i=0; i<5; i++)
1.2975 + {
1.2976 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.2977 + iExpectedDstBytesAdded[i] = 0x800;
1.2978 +
1.2979 + if((i%2)==0)//even i
1.2980 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.2981 + else //odd i
1.2982 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.2983 + }
1.2984 + }
1.2985 +
1.2986 +/** @xxxx
1.2987 + * PCM16 To PCM8 Pass in default sized buffers
1.2988 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.2989 + */
1.2990 +TVerdict CTest_MMF_ACOD_U_0034::DoTestStepL()
1.2991 + {
1.2992 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8};
1.2993 + TBool testOK = EFalse;
1.2994 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize));
1.2995 +
1.2996 + if (err)
1.2997 + {
1.2998 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.2999 + return EFail;
1.3000 + }
1.3001 + else if (!testOK)
1.3002 + {
1.3003 + INFO_PRINTF1(_L("Test failed"));
1.3004 + return EFail;
1.3005 + }
1.3006 + else
1.3007 + return EPass;
1.3008 + }
1.3009 +
1.3010 +//------------------------------------------------------------------
1.3011 +
1.3012 +/** @xxxx
1.3013 + * Constructor
1.3014 + */
1.3015 +CTest_MMF_ACOD_U_0035::CTest_MMF_ACOD_U_0035()
1.3016 + {
1.3017 + // store the name of this test case
1.3018 + // this is the name that is used by the script file
1.3019 + // Each test step initialises it's own name
1.3020 + iTestStepName = _L("MM-MMF-ACOD-U-0035-HP");
1.3021 +
1.3022 + for (TUint i=0; i<5; i++)
1.3023 + {
1.3024 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.3025 + iExpectedDstBytesAdded[i] = 0x800;
1.3026 +
1.3027 + if((i%2)==0)//even i
1.3028 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.3029 + else //odd i
1.3030 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.3031 + }
1.3032 + }
1.3033 +
1.3034 +/** @xxxx
1.3035 + * PCM16 To PCM8 Pass in buffers with different max length and length
1.3036 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3037 + */
1.3038 +TVerdict CTest_MMF_ACOD_U_0035::DoTestStepL()
1.3039 + {
1.3040 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8};
1.3041 + TBool testOK = EFalse;
1.3042 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize));
1.3043 +
1.3044 + if (err)
1.3045 + {
1.3046 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3047 + return EFail;
1.3048 + }
1.3049 + else if (!testOK)
1.3050 + {
1.3051 + INFO_PRINTF1(_L("Test failed"));
1.3052 + return EFail;
1.3053 + }
1.3054 + else
1.3055 + return EPass;
1.3056 + }
1.3057 +
1.3058 +//------------------------------------------------------------------
1.3059 +
1.3060 +/** @xxxx
1.3061 + * Constructor
1.3062 + */
1.3063 +CTest_MMF_ACOD_U_0036::CTest_MMF_ACOD_U_0036()
1.3064 + {
1.3065 + // store the name of this test case
1.3066 + // this is the name that is used by the script file
1.3067 + // Each test step initialises it's own name
1.3068 + iTestStepName = _L("MM-MMF-ACOD-U-0036-HP");
1.3069 +
1.3070 + for (TUint i=0; i<5; i++)
1.3071 + {
1.3072 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.3073 + iExpectedDstBytesAdded[i] = 0x800;
1.3074 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.3075 + }
1.3076 + }
1.3077 +
1.3078 +/** @xxxx
1.3079 + * PCM16 To PCM8 Pass in buffers of optimum size
1.3080 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3081 + */
1.3082 +TVerdict CTest_MMF_ACOD_U_0036::DoTestStepL()
1.3083 + {
1.3084 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8};
1.3085 + TBool testOK = EFalse;
1.3086 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCM8OptimumSrc, KPCM16ToPCM8OptimumDst));
1.3087 +
1.3088 + if (err)
1.3089 + {
1.3090 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3091 + return EFail;
1.3092 + }
1.3093 + else if (!testOK)
1.3094 + {
1.3095 + INFO_PRINTF1(_L("Test failed"));
1.3096 + return EFail;
1.3097 + }
1.3098 + else
1.3099 + return EPass;
1.3100 + }
1.3101 +
1.3102 +//------------------------------------------------------------------
1.3103 +
1.3104 +/** @xxxx
1.3105 + * Constructor
1.3106 + */
1.3107 +CTest_MMF_ACOD_U_0037::CTest_MMF_ACOD_U_0037()
1.3108 + {
1.3109 + // store the name of this test case
1.3110 + // this is the name that is used by the script file
1.3111 + // Each test step initialises it's own name
1.3112 + iTestStepName = _L("MM-MMF-ACOD-U-0037-HP");
1.3113 + }
1.3114 +
1.3115 +/** @xxxx
1.3116 + * PCM16 To PCM8 Reposition source pointer during conversion
1.3117 + * @test Req. under test REQ172.11
1.3118 + */
1.3119 +TVerdict CTest_MMF_ACOD_U_0037::DoTestStepL()
1.3120 + {
1.3121 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8};
1.3122 + TBool testOK = EFalse;
1.3123 +
1.3124 + INFO_PRINTF1(_L(">> The PCM16 to PCM8 codec doesn't currently store data between calls to ProcessL"));
1.3125 + TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30));
1.3126 +
1.3127 + if (err)
1.3128 + {
1.3129 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3130 + return EFail;
1.3131 + }
1.3132 + else if (!testOK)
1.3133 + {
1.3134 + INFO_PRINTF1(_L("Test failed"));
1.3135 + return EFail;
1.3136 + }
1.3137 + else
1.3138 + return EPass;
1.3139 + }
1.3140 +
1.3141 +//------------------------------------------------------------------
1.3142 +
1.3143 +/** @xxxx
1.3144 + * Constructor
1.3145 + */
1.3146 +CTest_MMF_ACOD_U_0038::CTest_MMF_ACOD_U_0038()
1.3147 + {
1.3148 + // store the name of this test case
1.3149 + // this is the name that is used by the script file
1.3150 + // Each test step initialises it's own name
1.3151 + iTestStepName = _L("MM-MMF-ACOD-U-0038-HP");
1.3152 + }
1.3153 +
1.3154 +/** @xxxx
1.3155 + * PCM16 To PCM16B Instantiate codec by FourCC Codes
1.3156 + * @test Req. under test REQ172.6.2, REQ172.11.6
1.3157 + */
1.3158 +TVerdict CTest_MMF_ACOD_U_0038::DoTestStepL()
1.3159 + {
1.3160 + TBool testOK = EFalse;
1.3161 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodePCM16B));
1.3162 +
1.3163 + if (err)
1.3164 + {
1.3165 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3166 + return EFail;
1.3167 + }
1.3168 + else if (!testOK)
1.3169 + {
1.3170 + INFO_PRINTF1(_L("Test failed"));
1.3171 + return EFail;
1.3172 + }
1.3173 + else
1.3174 + return EPass;
1.3175 + }
1.3176 +
1.3177 +//------------------------------------------------------------------
1.3178 +
1.3179 +/** @xxxx
1.3180 + * Constructor
1.3181 + */
1.3182 +CTest_MMF_ACOD_U_0039::CTest_MMF_ACOD_U_0039()
1.3183 + {
1.3184 + // store the name of this test case
1.3185 + // this is the name that is used by the script file
1.3186 + // Each test step initialises it's own name
1.3187 + iTestStepName = _L("MM-MMF-ACOD-U-0039-HP");
1.3188 + }
1.3189 +
1.3190 +/** @xxxx
1.3191 + * PCM16B To PCM16 Instantiate codec by FourCC Codes
1.3192 + * @test Req. under test REQ172.6.2, REQ172.11.6
1.3193 + */
1.3194 +TVerdict CTest_MMF_ACOD_U_0039::DoTestStepL()
1.3195 + {
1.3196 + TBool testOK = EFalse;
1.3197 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16B, KMMFFourCCCodePCM16));
1.3198 +
1.3199 + if (err)
1.3200 + {
1.3201 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3202 + return EFail;
1.3203 + }
1.3204 + else if (!testOK)
1.3205 + {
1.3206 + INFO_PRINTF1(_L("Test failed"));
1.3207 + return EFail;
1.3208 + }
1.3209 + else
1.3210 + return EPass;
1.3211 + }
1.3212 +
1.3213 +//------------------------------------------------------------------
1.3214 +
1.3215 +/** @xxxx
1.3216 + * Constructor
1.3217 + */
1.3218 +CTest_MMF_ACOD_U_0040::CTest_MMF_ACOD_U_0040()
1.3219 + {
1.3220 + // store the name of this test case
1.3221 + // this is the name that is used by the script file
1.3222 + // Each test step initialises it's own name
1.3223 + iTestStepName = _L("MM-MMF-ACOD-U-0040-HP");
1.3224 + }
1.3225 +
1.3226 +/** @xxxx
1.3227 + * PCMU16 To PCMU16B Instantiate codec by FourCC Codes
1.3228 + * @test Req. under test REQ172.6.2, REQ172.11.6
1.3229 + */
1.3230 +TVerdict CTest_MMF_ACOD_U_0040::DoTestStepL()
1.3231 + {
1.3232 + TBool testOK = EFalse;
1.3233 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCMU16, KMMFFourCCCodePCMU16B));
1.3234 +
1.3235 + if (err)
1.3236 + {
1.3237 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3238 + return EFail;
1.3239 + }
1.3240 + else if (!testOK)
1.3241 + {
1.3242 + INFO_PRINTF1(_L("Test failed"));
1.3243 + return EFail;
1.3244 + }
1.3245 + else
1.3246 + return EPass;
1.3247 + }
1.3248 +
1.3249 +//------------------------------------------------------------------
1.3250 +
1.3251 +/** @xxxx
1.3252 + * Constructor
1.3253 + */
1.3254 +CTest_MMF_ACOD_U_0041::CTest_MMF_ACOD_U_0041()
1.3255 + {
1.3256 + // store the name of this test case
1.3257 + // this is the name that is used by the script file
1.3258 + // Each test step initialises it's own name
1.3259 + iTestStepName = _L("MM-MMF-ACOD-U-0041-HP");
1.3260 + }
1.3261 +
1.3262 +/** @xxxx
1.3263 + * PCMU16B To PCMU16 Instantiate codec by FourCC Codes
1.3264 + * @test Req. under test REQ172.6.2, REQ172.11.6
1.3265 + */
1.3266 +TVerdict CTest_MMF_ACOD_U_0041::DoTestStepL()
1.3267 + {
1.3268 + TBool testOK = EFalse;
1.3269 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCMU16B, KMMFFourCCCodePCMU16));
1.3270 +
1.3271 + if (err)
1.3272 + {
1.3273 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3274 + return EFail;
1.3275 + }
1.3276 + else if (!testOK)
1.3277 + {
1.3278 + INFO_PRINTF1(_L("Test failed"));
1.3279 + return EFail;
1.3280 + }
1.3281 + else
1.3282 + return EPass;
1.3283 + }
1.3284 +
1.3285 +//------------------------------------------------------------------
1.3286 +
1.3287 +/** @xxxx
1.3288 + * Constructor
1.3289 + */
1.3290 +CTest_MMF_ACOD_U_0042::CTest_MMF_ACOD_U_0042()
1.3291 + {
1.3292 + // store the name of this test case
1.3293 + // this is the name that is used by the script file
1.3294 + // Each test step initialises it's own name
1.3295 + iTestStepName = _L("MM-MMF-ACOD-U-0042-HP");
1.3296 + }
1.3297 +
1.3298 +/** @xxxx
1.3299 + * PCM16 To PCM16B Instantiate codec by UID
1.3300 + * @test Req. under test REQ172.6.1, REQ172.11.6
1.3301 + */
1.3302 +TVerdict CTest_MMF_ACOD_U_0042::DoTestStepL()
1.3303 + {
1.3304 + //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian};
1.3305 + const TUid codecUid = {KMMFUidCodecPCM16toPCM16B};
1.3306 + TBool testOK = EFalse;
1.3307 + TRAPD(err, testOK = TestNewL(codecUid));
1.3308 +
1.3309 + if (err)
1.3310 + {
1.3311 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3312 + return EFail;
1.3313 + }
1.3314 + else if (!testOK)
1.3315 + {
1.3316 + INFO_PRINTF1(_L("Test failed"));
1.3317 + return EFail;
1.3318 + }
1.3319 + else
1.3320 + return EPass;
1.3321 + }
1.3322 +
1.3323 +//------------------------------------------------------------------
1.3324 +
1.3325 +/** @xxxx
1.3326 + * Constructor
1.3327 + */
1.3328 +CTest_MMF_ACOD_U_0043::CTest_MMF_ACOD_U_0043()
1.3329 + {
1.3330 + // store the name of this test case
1.3331 + // this is the name that is used by the script file
1.3332 + // Each test step initialises it's own name
1.3333 + iTestStepName = _L("MM-MMF-ACOD-U-0043-HP");
1.3334 +
1.3335 + for (TUint i=0; i<5; i++)
1.3336 + {
1.3337 + iExpectedSrcBytesProcessed[i] = 50;
1.3338 + iExpectedDstBytesAdded[i] = 50;
1.3339 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.3340 + }
1.3341 + }
1.3342 +
1.3343 +/** @xxxx
1.3344 + * PCM16 To PCM16B Pass in small source buffers
1.3345 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3346 + */
1.3347 +TVerdict CTest_MMF_ACOD_U_0043::DoTestStepL()
1.3348 + {
1.3349 + //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian};
1.3350 + const TUid codecUid = {KMMFUidCodecPCM16toPCM16B};
1.3351 + TBool testOK = EFalse;
1.3352 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToPCM16BOptimumDst));
1.3353 +
1.3354 + if (err)
1.3355 + {
1.3356 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3357 + return EFail;
1.3358 + }
1.3359 + else if (!testOK)
1.3360 + {
1.3361 + INFO_PRINTF1(_L("Test failed"));
1.3362 + return EFail;
1.3363 + }
1.3364 + else
1.3365 + return EPass;
1.3366 + }
1.3367 +
1.3368 +//------------------------------------------------------------------
1.3369 +
1.3370 +/** @xxxx
1.3371 + * Constructor
1.3372 + */
1.3373 +CTest_MMF_ACOD_U_0044::CTest_MMF_ACOD_U_0044()
1.3374 + {
1.3375 + // store the name of this test case
1.3376 + // this is the name that is used by the script file
1.3377 + // Each test step initialises it's own name
1.3378 + iTestStepName = _L("MM-MMF-ACOD-U-0044-HP");
1.3379 + iHeapSize = 0x20000;
1.3380 + for (TUint i=0; i<5; i++)
1.3381 + {
1.3382 + iExpectedSrcBytesProcessed[i] = 50;
1.3383 + iExpectedDstBytesAdded[i] = 50;
1.3384 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.3385 + }
1.3386 + }
1.3387 +
1.3388 +/** @xxxx
1.3389 + * PCM16 To PCM16B Pass in small dest buffers
1.3390 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3391 + */
1.3392 +TVerdict CTest_MMF_ACOD_U_0044::DoTestStepL()
1.3393 + {
1.3394 + //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian};
1.3395 + const TUid codecUid = {KMMFUidCodecPCM16toPCM16B};
1.3396 + TBool testOK = EFalse;
1.3397 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCM16BOptimumSrc, KSmallBufferSize));
1.3398 +
1.3399 + if (err)
1.3400 + {
1.3401 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3402 + return EFail;
1.3403 + }
1.3404 + else if (!testOK)
1.3405 + {
1.3406 + INFO_PRINTF1(_L("Test failed"));
1.3407 + return EFail;
1.3408 + }
1.3409 + else
1.3410 + return EPass;
1.3411 + }
1.3412 +
1.3413 +//------------------------------------------------------------------
1.3414 +
1.3415 +/** @xxxx
1.3416 + * Constructor
1.3417 + */
1.3418 +CTest_MMF_ACOD_U_0045::CTest_MMF_ACOD_U_0045()
1.3419 + {
1.3420 + // store the name of this test case
1.3421 + // this is the name that is used by the script file
1.3422 + // Each test step initialises it's own name
1.3423 + iTestStepName = _L("MM-MMF-ACOD-U-0045-HP");
1.3424 + iHeapSize = 0x20000;
1.3425 + for (TUint i=0; i<5; i++)
1.3426 + {
1.3427 + iExpectedSrcBytesProcessed[i] = 10000;
1.3428 + iExpectedDstBytesAdded[i] = 10000;
1.3429 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.3430 + }
1.3431 + }
1.3432 +
1.3433 +/** @xxxx
1.3434 + * PCM16 To PCM16B Pass in large buffers
1.3435 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3436 + */
1.3437 +TVerdict CTest_MMF_ACOD_U_0045::DoTestStepL()
1.3438 + {
1.3439 + //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian};
1.3440 + const TUid codecUid = {KMMFUidCodecPCM16toPCM16B};
1.3441 + TBool testOK = EFalse;
1.3442 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize));
1.3443 +
1.3444 + if (err)
1.3445 + {
1.3446 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3447 + return EFail;
1.3448 + }
1.3449 + else if (!testOK)
1.3450 + {
1.3451 + INFO_PRINTF1(_L("Test failed"));
1.3452 + return EFail;
1.3453 + }
1.3454 + else
1.3455 + return EPass;
1.3456 + }
1.3457 +
1.3458 +//------------------------------------------------------------------
1.3459 +
1.3460 +/** @xxxx
1.3461 + * Constructor
1.3462 + */
1.3463 +CTest_MMF_ACOD_U_0046::CTest_MMF_ACOD_U_0046()
1.3464 + {
1.3465 + // store the name of this test case
1.3466 + // this is the name that is used by the script file
1.3467 + // Each test step initialises it's own name
1.3468 + iTestStepName = _L("MM-MMF-ACOD-U-0046-HP");
1.3469 +
1.3470 + for (TUint i=0; i<5; i++)
1.3471 + {
1.3472 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.3473 + iExpectedDstBytesAdded[i] = 0x1000;
1.3474 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.3475 + }
1.3476 + }
1.3477 +
1.3478 +/** @xxxx
1.3479 + * PCM16 To PCM16B Pass in default sized buffers
1.3480 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3481 + */
1.3482 +TVerdict CTest_MMF_ACOD_U_0046::DoTestStepL()
1.3483 + {
1.3484 + //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian};
1.3485 + const TUid codecUid = {KMMFUidCodecPCM16toPCM16B};
1.3486 + TBool testOK = EFalse;
1.3487 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize));
1.3488 +
1.3489 + if (err)
1.3490 + {
1.3491 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3492 + return EFail;
1.3493 + }
1.3494 + else if (!testOK)
1.3495 + {
1.3496 + INFO_PRINTF1(_L("Test failed"));
1.3497 + return EFail;
1.3498 + }
1.3499 + else
1.3500 + return EPass;
1.3501 + }
1.3502 +
1.3503 +//------------------------------------------------------------------
1.3504 +
1.3505 +/** @xxxx
1.3506 + * Constructor
1.3507 + */
1.3508 +CTest_MMF_ACOD_U_0047::CTest_MMF_ACOD_U_0047()
1.3509 + {
1.3510 + // store the name of this test case
1.3511 + // this is the name that is used by the script file
1.3512 + // Each test step initialises it's own name
1.3513 + iTestStepName = _L("MM-MMF-ACOD-U-0047-HP");
1.3514 +
1.3515 + for (TUint i=0; i<5; i++)
1.3516 + {
1.3517 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.3518 + iExpectedDstBytesAdded[i] = 0x1000;
1.3519 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.3520 + }
1.3521 + }
1.3522 +
1.3523 +/** @xxxx
1.3524 + * PCM16 To PCM16B Pass in buffers with different max length and length
1.3525 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3526 + */
1.3527 +TVerdict CTest_MMF_ACOD_U_0047::DoTestStepL()
1.3528 + {
1.3529 + //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian};
1.3530 + const TUid codecUid = {KMMFUidCodecPCM16toPCM16B};
1.3531 + TBool testOK = EFalse;
1.3532 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize));
1.3533 +
1.3534 + if (err)
1.3535 + {
1.3536 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3537 + return EFail;
1.3538 + }
1.3539 + else if (!testOK)
1.3540 + {
1.3541 + INFO_PRINTF1(_L("Test failed"));
1.3542 + return EFail;
1.3543 + }
1.3544 + else
1.3545 + return EPass;
1.3546 + }
1.3547 +
1.3548 +//------------------------------------------------------------------
1.3549 +
1.3550 +/** @xxxx
1.3551 + * Constructor
1.3552 + */
1.3553 +CTest_MMF_ACOD_U_0048::CTest_MMF_ACOD_U_0048()
1.3554 + {
1.3555 + // store the name of this test case
1.3556 + // this is the name that is used by the script file
1.3557 + // Each test step initialises it's own name
1.3558 + iTestStepName = _L("MM-MMF-ACOD-U-0048-HP");
1.3559 +
1.3560 + for (TUint i=0; i<5; i++)
1.3561 + {
1.3562 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.3563 + iExpectedDstBytesAdded[i] = 0x1000;
1.3564 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.3565 + }
1.3566 + }
1.3567 +
1.3568 +/** @xxxx
1.3569 + * PCM16 To PCM16B Pass in buffers of optimum size
1.3570 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3571 + */
1.3572 +TVerdict CTest_MMF_ACOD_U_0048::DoTestStepL()
1.3573 + {
1.3574 + //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian};
1.3575 + const TUid codecUid = {KMMFUidCodecPCM16toPCM16B};
1.3576 + TBool testOK = EFalse;
1.3577 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCM16BOptimumSrc, KPCM16ToPCM16BOptimumDst));
1.3578 +
1.3579 + if (err)
1.3580 + {
1.3581 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3582 + return EFail;
1.3583 + }
1.3584 + else if (!testOK)
1.3585 + {
1.3586 + INFO_PRINTF1(_L("Test failed"));
1.3587 + return EFail;
1.3588 + }
1.3589 + else
1.3590 + return EPass;
1.3591 + }
1.3592 +
1.3593 +//------------------------------------------------------------------
1.3594 +
1.3595 +/** @xxxx
1.3596 + * Constructor
1.3597 + */
1.3598 +CTest_MMF_ACOD_U_0049::CTest_MMF_ACOD_U_0049()
1.3599 + {
1.3600 + // store the name of this test case
1.3601 + // this is the name that is used by the script file
1.3602 + // Each test step initialises it's own name
1.3603 + iTestStepName = _L("MM-MMF-ACOD-U-0049-HP");
1.3604 + }
1.3605 +
1.3606 +/** @xxxx
1.3607 + * PCM16 To PCM16B Reposition source pointer during conversion
1.3608 + * @test Req. under test REQ172.11
1.3609 + */
1.3610 +TVerdict CTest_MMF_ACOD_U_0049::DoTestStepL()
1.3611 + {
1.3612 + //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian};
1.3613 + const TUid codecUid = {KMMFUidCodecPCM16toPCM16B};
1.3614 + TBool testOK = EFalse;
1.3615 +
1.3616 + INFO_PRINTF1(_L(">> The PCM16 to PCM16B codec doesn't currently store data between calls to ProcessL"));
1.3617 + TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30));
1.3618 +
1.3619 + if (err)
1.3620 + {
1.3621 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3622 + return EFail;
1.3623 + }
1.3624 + else if (!testOK)
1.3625 + {
1.3626 + INFO_PRINTF1(_L("Test failed"));
1.3627 + return EFail;
1.3628 + }
1.3629 + else
1.3630 + return EPass;
1.3631 + }
1.3632 +
1.3633 +//------------------------------------------------------------------
1.3634 +
1.3635 +/** @xxxx
1.3636 + * Constructor
1.3637 + */
1.3638 +CTest_MMF_ACOD_U_0050::CTest_MMF_ACOD_U_0050()
1.3639 + {
1.3640 + // store the name of this test case
1.3641 + // this is the name that is used by the script file
1.3642 + // Each test step initialises it's own name
1.3643 + iTestStepName = _L("MM-MMF-ACOD-U-0050-HP");
1.3644 + }
1.3645 +
1.3646 +/** @xxxx
1.3647 + * PCM16 To PCMU16B Instantiate codec by FourCC Codes
1.3648 + * @test Req. under test REQ172.6.2
1.3649 + */
1.3650 +TVerdict CTest_MMF_ACOD_U_0050::DoTestStepL()
1.3651 + {
1.3652 + TBool testOK = EFalse;
1.3653 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodePCMU16B));
1.3654 +
1.3655 + if (err)
1.3656 + {
1.3657 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3658 + return EFail;
1.3659 + }
1.3660 + else if (!testOK)
1.3661 + {
1.3662 + INFO_PRINTF1(_L("Test failed"));
1.3663 + return EFail;
1.3664 + }
1.3665 + else
1.3666 + return EPass;
1.3667 + }
1.3668 +
1.3669 +//------------------------------------------------------------------
1.3670 +
1.3671 +/** @xxxx
1.3672 + * Constructor
1.3673 + */
1.3674 +CTest_MMF_ACOD_U_0051::CTest_MMF_ACOD_U_0051()
1.3675 + {
1.3676 + // store the name of this test case
1.3677 + // this is the name that is used by the script file
1.3678 + // Each test step initialises it's own name
1.3679 + iTestStepName = _L("MM-MMF-ACOD-U-0051-HP");
1.3680 + }
1.3681 +
1.3682 +/** @xxxx
1.3683 + * PCM16 To PCMU16B Instantiate codec by UID
1.3684 + * @test Req. under test REQ172.6.1
1.3685 + */
1.3686 +TVerdict CTest_MMF_ACOD_U_0051::DoTestStepL()
1.3687 + {
1.3688 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE};
1.3689 + TBool testOK = EFalse;
1.3690 + TRAPD(err, testOK = TestNewL(codecUid));
1.3691 +
1.3692 + if (err)
1.3693 + {
1.3694 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3695 + return EFail;
1.3696 + }
1.3697 + else if (!testOK)
1.3698 + {
1.3699 + INFO_PRINTF1(_L("Test failed"));
1.3700 + return EFail;
1.3701 + }
1.3702 + else
1.3703 + return EPass;
1.3704 + }
1.3705 +
1.3706 +//------------------------------------------------------------------
1.3707 +
1.3708 +/** @xxxx
1.3709 + * Constructor
1.3710 + */
1.3711 +CTest_MMF_ACOD_U_0052::CTest_MMF_ACOD_U_0052()
1.3712 + {
1.3713 + // store the name of this test case
1.3714 + // this is the name that is used by the script file
1.3715 + // Each test step initialises it's own name
1.3716 + iTestStepName = _L("MM-MMF-ACOD-U-0052-HP");
1.3717 +
1.3718 + for (TUint i=0; i<5; i++)
1.3719 + {
1.3720 + iExpectedSrcBytesProcessed[i] = 50;
1.3721 + iExpectedDstBytesAdded[i] = 50;
1.3722 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.3723 + }
1.3724 + }
1.3725 +
1.3726 +/** @xxxx
1.3727 + * PCM16 To PCMU16B Pass in small source buffers
1.3728 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3729 + */
1.3730 +TVerdict CTest_MMF_ACOD_U_0052::DoTestStepL()
1.3731 + {
1.3732 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE};
1.3733 + TBool testOK = EFalse;
1.3734 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToPCMU16BOptimumDst));
1.3735 +
1.3736 + if (err)
1.3737 + {
1.3738 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3739 + return EFail;
1.3740 + }
1.3741 + else if (!testOK)
1.3742 + {
1.3743 + INFO_PRINTF1(_L("Test failed"));
1.3744 + return EFail;
1.3745 + }
1.3746 + else
1.3747 + return EPass;
1.3748 + }
1.3749 +
1.3750 +//------------------------------------------------------------------
1.3751 +
1.3752 +/** @xxxx
1.3753 + * Constructor
1.3754 + */
1.3755 +CTest_MMF_ACOD_U_0053::CTest_MMF_ACOD_U_0053()
1.3756 + {
1.3757 + // store the name of this test case
1.3758 + // this is the name that is used by the script file
1.3759 + // Each test step initialises it's own name
1.3760 + iTestStepName = _L("MM-MMF-ACOD-U-0053-HP");
1.3761 +
1.3762 + for (TUint i=0; i<5; i++)
1.3763 + {
1.3764 + iExpectedSrcBytesProcessed[i] = 50;
1.3765 + iExpectedDstBytesAdded[i] = 50;
1.3766 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.3767 + }
1.3768 + }
1.3769 +
1.3770 +/** @xxxx
1.3771 + * PCM16 To PCMU16B Pass in small dest buffers
1.3772 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3773 + */
1.3774 +TVerdict CTest_MMF_ACOD_U_0053::DoTestStepL()
1.3775 + {
1.3776 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE};
1.3777 + TBool testOK = EFalse;
1.3778 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU16BOptimumSrc, KSmallBufferSize));
1.3779 +
1.3780 + if (err)
1.3781 + {
1.3782 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3783 + return EFail;
1.3784 + }
1.3785 + else if (!testOK)
1.3786 + {
1.3787 + INFO_PRINTF1(_L("Test failed"));
1.3788 + return EFail;
1.3789 + }
1.3790 + else
1.3791 + return EPass;
1.3792 + }
1.3793 +
1.3794 +//------------------------------------------------------------------
1.3795 +
1.3796 +/** @xxxx
1.3797 + * Constructor
1.3798 + */
1.3799 +CTest_MMF_ACOD_U_0054::CTest_MMF_ACOD_U_0054()
1.3800 + {
1.3801 + // store the name of this test case
1.3802 + // this is the name that is used by the script file
1.3803 + // Each test step initialises it's own name
1.3804 + iTestStepName = _L("MM-MMF-ACOD-U-0054-HP");
1.3805 + iHeapSize = 0x20000;
1.3806 + for (TUint i=0; i<5; i++)
1.3807 + {
1.3808 + iExpectedSrcBytesProcessed[i] = 10000;
1.3809 + iExpectedDstBytesAdded[i] = 10000;
1.3810 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.3811 + }
1.3812 + }
1.3813 +
1.3814 +/** @xxxx
1.3815 + * PCM16 To PCMU16B Pass in large buffers
1.3816 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3817 + */
1.3818 +TVerdict CTest_MMF_ACOD_U_0054::DoTestStepL()
1.3819 + {
1.3820 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE};
1.3821 + TBool testOK = EFalse;
1.3822 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize));
1.3823 +
1.3824 + if (err)
1.3825 + {
1.3826 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3827 + return EFail;
1.3828 + }
1.3829 + else if (!testOK)
1.3830 + {
1.3831 + INFO_PRINTF1(_L("Test failed"));
1.3832 + return EFail;
1.3833 + }
1.3834 + else
1.3835 + return EPass;
1.3836 + }
1.3837 +
1.3838 +//------------------------------------------------------------------
1.3839 +
1.3840 +/** @xxxx
1.3841 + * Constructor
1.3842 + */
1.3843 +CTest_MMF_ACOD_U_0055::CTest_MMF_ACOD_U_0055()
1.3844 + {
1.3845 + // store the name of this test case
1.3846 + // this is the name that is used by the script file
1.3847 + // Each test step initialises it's own name
1.3848 + iTestStepName = _L("MM-MMF-ACOD-U-0055-HP");
1.3849 +
1.3850 + for (TUint i=0; i<5; i++)
1.3851 + {
1.3852 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.3853 + iExpectedDstBytesAdded[i] = 0x1000;
1.3854 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.3855 + }
1.3856 + }
1.3857 +
1.3858 +/** @xxxx
1.3859 + * PCM16 To PCMU16B Pass in default sized buffers
1.3860 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3861 + */
1.3862 +TVerdict CTest_MMF_ACOD_U_0055::DoTestStepL()
1.3863 + {
1.3864 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE};
1.3865 + TBool testOK = EFalse;
1.3866 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize));
1.3867 +
1.3868 + if (err)
1.3869 + {
1.3870 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3871 + return EFail;
1.3872 + }
1.3873 + else if (!testOK)
1.3874 + {
1.3875 + INFO_PRINTF1(_L("Test failed"));
1.3876 + return EFail;
1.3877 + }
1.3878 + else
1.3879 + return EPass;
1.3880 + }
1.3881 +
1.3882 +//------------------------------------------------------------------
1.3883 +
1.3884 +/** @xxxx
1.3885 + * Constructor
1.3886 + */
1.3887 +CTest_MMF_ACOD_U_0056::CTest_MMF_ACOD_U_0056()
1.3888 + {
1.3889 + // store the name of this test case
1.3890 + // this is the name that is used by the script file
1.3891 + // Each test step initialises it's own name
1.3892 + iTestStepName = _L("MM-MMF-ACOD-U-0056-HP");
1.3893 +
1.3894 + for (TUint i=0; i<5; i++)
1.3895 + {
1.3896 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.3897 + iExpectedDstBytesAdded[i] = 0x1000;
1.3898 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.3899 + }
1.3900 + }
1.3901 +
1.3902 +/** @xxxx
1.3903 + * PCM16 To PCMU16B Pass in buffers with different max length and length
1.3904 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3905 + */
1.3906 +TVerdict CTest_MMF_ACOD_U_0056::DoTestStepL()
1.3907 + {
1.3908 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE};
1.3909 + TBool testOK = EFalse;
1.3910 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize));
1.3911 +
1.3912 + if (err)
1.3913 + {
1.3914 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3915 + return EFail;
1.3916 + }
1.3917 + else if (!testOK)
1.3918 + {
1.3919 + INFO_PRINTF1(_L("Test failed"));
1.3920 + return EFail;
1.3921 + }
1.3922 + else
1.3923 + return EPass;
1.3924 + }
1.3925 +
1.3926 +//------------------------------------------------------------------
1.3927 +
1.3928 +/** @xxxx
1.3929 + * Constructor
1.3930 + */
1.3931 +CTest_MMF_ACOD_U_0057::CTest_MMF_ACOD_U_0057()
1.3932 + {
1.3933 + // store the name of this test case
1.3934 + // this is the name that is used by the script file
1.3935 + // Each test step initialises it's own name
1.3936 + iTestStepName = _L("MM-MMF-ACOD-U-0057-HP");
1.3937 +
1.3938 + for (TUint i=0; i<5; i++)
1.3939 + {
1.3940 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.3941 + iExpectedDstBytesAdded[i] = 0x1000;
1.3942 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.3943 + }
1.3944 + }
1.3945 +
1.3946 +/** @xxxx
1.3947 + * PCM16 To PCMU16B Pass in buffers of optimum size
1.3948 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.3949 + */
1.3950 +TVerdict CTest_MMF_ACOD_U_0057::DoTestStepL()
1.3951 + {
1.3952 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE};
1.3953 + TBool testOK = EFalse;
1.3954 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU16BOptimumSrc, KPCM16ToPCMU16BOptimumDst));
1.3955 +
1.3956 + if (err)
1.3957 + {
1.3958 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3959 + return EFail;
1.3960 + }
1.3961 + else if (!testOK)
1.3962 + {
1.3963 + INFO_PRINTF1(_L("Test failed"));
1.3964 + return EFail;
1.3965 + }
1.3966 + else
1.3967 + return EPass;
1.3968 + }
1.3969 +
1.3970 +//------------------------------------------------------------------
1.3971 +
1.3972 +/** @xxxx
1.3973 + * Constructor
1.3974 + */
1.3975 +CTest_MMF_ACOD_U_0058::CTest_MMF_ACOD_U_0058()
1.3976 + {
1.3977 + // store the name of this test case
1.3978 + // this is the name that is used by the script file
1.3979 + // Each test step initialises it's own name
1.3980 + iTestStepName = _L("MM-MMF-ACOD-U-0058-HP");
1.3981 + }
1.3982 +
1.3983 +/** @xxxx
1.3984 + * PCM16 To PCMU16B Reposition source pointer during conversion
1.3985 + * @test Req. under test REQ172.11
1.3986 + */
1.3987 +TVerdict CTest_MMF_ACOD_U_0058::DoTestStepL()
1.3988 + {
1.3989 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE};
1.3990 + TBool testOK = EFalse;
1.3991 +
1.3992 + INFO_PRINTF1(_L(">> The PCM16 to PCMU16B codec doesn't currently store data between calls to ProcessL"));
1.3993 + TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30));
1.3994 +
1.3995 + if (err)
1.3996 + {
1.3997 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.3998 + return EFail;
1.3999 + }
1.4000 + else if (!testOK)
1.4001 + {
1.4002 + INFO_PRINTF1(_L("Test failed"));
1.4003 + return EFail;
1.4004 + }
1.4005 + else
1.4006 + return EPass;
1.4007 + }
1.4008 +
1.4009 +//------------------------------------------------------------------
1.4010 +
1.4011 +/** @xxxx
1.4012 + * Constructor
1.4013 + */
1.4014 +CTest_MMF_ACOD_U_0059::CTest_MMF_ACOD_U_0059()
1.4015 + {
1.4016 + // store the name of this test case
1.4017 + // this is the name that is used by the script file
1.4018 + // Each test step initialises it's own name
1.4019 + iTestStepName = _L("MM-MMF-ACOD-U-0059-HP");
1.4020 + }
1.4021 +
1.4022 +/** @xxxx
1.4023 + * PCM16 To PCMU16 Instantiate codec by FourCC Codes
1.4024 + * @test Req. under test REQ172.6.2, REQ172.11.7
1.4025 + */
1.4026 +TVerdict CTest_MMF_ACOD_U_0059::DoTestStepL()
1.4027 + {
1.4028 + TBool testOK = EFalse;
1.4029 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodePCMU16));
1.4030 +
1.4031 + if (err)
1.4032 + {
1.4033 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4034 + return EFail;
1.4035 + }
1.4036 + else if (!testOK)
1.4037 + {
1.4038 + INFO_PRINTF1(_L("Test failed"));
1.4039 + return EFail;
1.4040 + }
1.4041 + else
1.4042 + return EPass;
1.4043 + }
1.4044 +
1.4045 +//------------------------------------------------------------------
1.4046 +
1.4047 +/** @xxxx
1.4048 + * Constructor
1.4049 + */
1.4050 +CTest_MMF_ACOD_U_0060::CTest_MMF_ACOD_U_0060()
1.4051 + {
1.4052 + // store the name of this test case
1.4053 + // this is the name that is used by the script file
1.4054 + // Each test step initialises it's own name
1.4055 + iTestStepName = _L("MM-MMF-ACOD-U-0060-HP");
1.4056 + }
1.4057 +
1.4058 +/** @xxxx
1.4059 + * PCM16 To PCMU16 Instantiate codec by UID
1.4060 + * @test Req. under test REQ172.6.1, REQ172.11.7
1.4061 + */
1.4062 +TVerdict CTest_MMF_ACOD_U_0060::DoTestStepL()
1.4063 + {
1.4064 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16};
1.4065 + TBool testOK = EFalse;
1.4066 + TRAPD(err, testOK = TestNewL(codecUid));
1.4067 +
1.4068 + if (err)
1.4069 + {
1.4070 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4071 + return EFail;
1.4072 + }
1.4073 + else if (!testOK)
1.4074 + {
1.4075 + INFO_PRINTF1(_L("Test failed"));
1.4076 + return EFail;
1.4077 + }
1.4078 + else
1.4079 + return EPass;
1.4080 + }
1.4081 +
1.4082 +//------------------------------------------------------------------
1.4083 +
1.4084 +/** @xxxx
1.4085 + * Constructor
1.4086 + */
1.4087 +CTest_MMF_ACOD_U_0061::CTest_MMF_ACOD_U_0061()
1.4088 + {
1.4089 + // store the name of this test case
1.4090 + // this is the name that is used by the script file
1.4091 + // Each test step initialises it's own name
1.4092 + iTestStepName = _L("MM-MMF-ACOD-U-0061-HP");
1.4093 +
1.4094 + for (TUint i=0; i<5; i++)
1.4095 + {
1.4096 + iExpectedSrcBytesProcessed[i] = 50;
1.4097 + iExpectedDstBytesAdded[i] = 50;
1.4098 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.4099 + }
1.4100 + }
1.4101 +
1.4102 +/** @xxxx
1.4103 + * PCM16 To PCMU16 Pass in small source buffers
1.4104 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4105 + */
1.4106 +TVerdict CTest_MMF_ACOD_U_0061::DoTestStepL()
1.4107 + {
1.4108 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16};
1.4109 + TBool testOK = EFalse;
1.4110 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToPCMU16OptimumDst));
1.4111 +
1.4112 + if (err)
1.4113 + {
1.4114 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4115 + return EFail;
1.4116 + }
1.4117 + else if (!testOK)
1.4118 + {
1.4119 + INFO_PRINTF1(_L("Test failed"));
1.4120 + return EFail;
1.4121 + }
1.4122 + else
1.4123 + return EPass;
1.4124 + }
1.4125 +
1.4126 +//------------------------------------------------------------------
1.4127 +
1.4128 +/** @xxxx
1.4129 + * Constructor
1.4130 + */
1.4131 +CTest_MMF_ACOD_U_0062::CTest_MMF_ACOD_U_0062()
1.4132 + {
1.4133 + // store the name of this test case
1.4134 + // this is the name that is used by the script file
1.4135 + // Each test step initialises it's own name
1.4136 + iTestStepName = _L("MM-MMF-ACOD-U-0062-HP");
1.4137 +
1.4138 + for (TUint i=0; i<5; i++)
1.4139 + {
1.4140 + iExpectedSrcBytesProcessed[i] = 50;
1.4141 + iExpectedDstBytesAdded[i] = 50;
1.4142 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.4143 + }
1.4144 + }
1.4145 +
1.4146 +/** @xxxx
1.4147 + * PCM16 To PCMU16 Pass in small dest buffers
1.4148 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4149 + */
1.4150 +TVerdict CTest_MMF_ACOD_U_0062::DoTestStepL()
1.4151 + {
1.4152 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16};
1.4153 + TBool testOK = EFalse;
1.4154 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU16OptimumSrc, KSmallBufferSize));
1.4155 +
1.4156 + if (err)
1.4157 + {
1.4158 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4159 + return EFail;
1.4160 + }
1.4161 + else if (!testOK)
1.4162 + {
1.4163 + INFO_PRINTF1(_L("Test failed"));
1.4164 + return EFail;
1.4165 + }
1.4166 + else
1.4167 + return EPass;
1.4168 + }
1.4169 +
1.4170 +//------------------------------------------------------------------
1.4171 +
1.4172 +/** @xxxx
1.4173 + * Constructor
1.4174 + */
1.4175 +CTest_MMF_ACOD_U_0063::CTest_MMF_ACOD_U_0063()
1.4176 + {
1.4177 + // store the name of this test case
1.4178 + // this is the name that is used by the script file
1.4179 + // Each test step initialises it's own name
1.4180 + iTestStepName = _L("MM-MMF-ACOD-U-0063-HP");
1.4181 + iHeapSize = 0x20000;
1.4182 +
1.4183 + for (TUint i=0; i<5; i++)
1.4184 + {
1.4185 + iExpectedSrcBytesProcessed[i] = 10000;
1.4186 + iExpectedDstBytesAdded[i] = 10000;
1.4187 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.4188 + }
1.4189 + }
1.4190 +
1.4191 +/** @xxxx
1.4192 + * PCM16 To PCMU16 Pass in large buffers
1.4193 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4194 + */
1.4195 +TVerdict CTest_MMF_ACOD_U_0063::DoTestStepL()
1.4196 + {
1.4197 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16};
1.4198 + TBool testOK = EFalse;
1.4199 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize));
1.4200 +
1.4201 + if (err)
1.4202 + {
1.4203 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4204 + return EFail;
1.4205 + }
1.4206 + else if (!testOK)
1.4207 + {
1.4208 + INFO_PRINTF1(_L("Test failed"));
1.4209 + return EFail;
1.4210 + }
1.4211 + else
1.4212 + return EPass;
1.4213 + }
1.4214 +
1.4215 +//------------------------------------------------------------------
1.4216 +
1.4217 +/** @xxxx
1.4218 + * Constructor
1.4219 + */
1.4220 +CTest_MMF_ACOD_U_0064::CTest_MMF_ACOD_U_0064()
1.4221 + {
1.4222 + // store the name of this test case
1.4223 + // this is the name that is used by the script file
1.4224 + // Each test step initialises it's own name
1.4225 + iTestStepName = _L("MM-MMF-ACOD-U-0064-HP");
1.4226 +
1.4227 + for (TUint i=0; i<5; i++)
1.4228 + {
1.4229 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.4230 + iExpectedDstBytesAdded[i] = 0x1000;
1.4231 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.4232 + }
1.4233 + }
1.4234 +
1.4235 +/** @xxxx
1.4236 + * PCM16 To PCMU16 Pass in default sized buffers
1.4237 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4238 + */
1.4239 +TVerdict CTest_MMF_ACOD_U_0064::DoTestStepL()
1.4240 + {
1.4241 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16};
1.4242 + TBool testOK = EFalse;
1.4243 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize));
1.4244 +
1.4245 + if (err)
1.4246 + {
1.4247 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4248 + return EFail;
1.4249 + }
1.4250 + else if (!testOK)
1.4251 + {
1.4252 + INFO_PRINTF1(_L("Test failed"));
1.4253 + return EFail;
1.4254 + }
1.4255 + else
1.4256 + return EPass;
1.4257 + }
1.4258 +
1.4259 +//------------------------------------------------------------------
1.4260 +
1.4261 +/** @xxxx
1.4262 + * Constructor
1.4263 + */
1.4264 +CTest_MMF_ACOD_U_0065::CTest_MMF_ACOD_U_0065()
1.4265 + {
1.4266 + // store the name of this test case
1.4267 + // this is the name that is used by the script file
1.4268 + // Each test step initialises it's own name
1.4269 + iTestStepName = _L("MM-MMF-ACOD-U-0065-HP");
1.4270 +
1.4271 + for (TUint i=0; i<5; i++)
1.4272 + {
1.4273 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.4274 + iExpectedDstBytesAdded[i] = 0x1000;
1.4275 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.4276 + }
1.4277 + }
1.4278 +
1.4279 +/** @xxxx
1.4280 + * PCM16 To PCMU16 Pass in buffers with different max length and length
1.4281 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4282 + */
1.4283 +TVerdict CTest_MMF_ACOD_U_0065::DoTestStepL()
1.4284 + {
1.4285 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16};
1.4286 + TBool testOK = EFalse;
1.4287 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize));
1.4288 +
1.4289 + if (err)
1.4290 + {
1.4291 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4292 + return EFail;
1.4293 + }
1.4294 + else if (!testOK)
1.4295 + {
1.4296 + INFO_PRINTF1(_L("Test failed"));
1.4297 + return EFail;
1.4298 + }
1.4299 + else
1.4300 + return EPass;
1.4301 + }
1.4302 +
1.4303 +//------------------------------------------------------------------
1.4304 +
1.4305 +/** @xxxx
1.4306 + * Constructor
1.4307 + */
1.4308 +CTest_MMF_ACOD_U_0066::CTest_MMF_ACOD_U_0066()
1.4309 + {
1.4310 + // store the name of this test case
1.4311 + // this is the name that is used by the script file
1.4312 + // Each test step initialises it's own name
1.4313 + iTestStepName = _L("MM-MMF-ACOD-U-0066-HP");
1.4314 +
1.4315 + for (TUint i=0; i<5; i++)
1.4316 + {
1.4317 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.4318 + iExpectedDstBytesAdded[i] = 0x1000;
1.4319 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.4320 + }
1.4321 + }
1.4322 +
1.4323 +/** @xxxx
1.4324 + * PCM16 To PCMU16 Pass in buffers of optimum size
1.4325 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4326 + */
1.4327 +TVerdict CTest_MMF_ACOD_U_0066::DoTestStepL()
1.4328 + {
1.4329 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16};
1.4330 + TBool testOK = EFalse;
1.4331 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU16OptimumSrc, KPCM16ToPCMU16OptimumDst));
1.4332 +
1.4333 + if (err)
1.4334 + {
1.4335 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4336 + return EFail;
1.4337 + }
1.4338 + else if (!testOK)
1.4339 + {
1.4340 + INFO_PRINTF1(_L("Test failed"));
1.4341 + return EFail;
1.4342 + }
1.4343 + else
1.4344 + return EPass;
1.4345 + }
1.4346 +
1.4347 +//------------------------------------------------------------------
1.4348 +
1.4349 +/** @xxxx
1.4350 + * Constructor
1.4351 + */
1.4352 +CTest_MMF_ACOD_U_0067::CTest_MMF_ACOD_U_0067()
1.4353 + {
1.4354 + // store the name of this test case
1.4355 + // this is the name that is used by the script file
1.4356 + // Each test step initialises it's own name
1.4357 + iTestStepName = _L("MM-MMF-ACOD-U-0067-HP");
1.4358 + }
1.4359 +
1.4360 +/** @xxxx
1.4361 + * PCM16 To PCMU16 Reposition source pointer during conversion
1.4362 + * @test Req. under test REQ172.11
1.4363 + */
1.4364 +TVerdict CTest_MMF_ACOD_U_0067::DoTestStepL()
1.4365 + {
1.4366 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16};
1.4367 + TBool testOK = EFalse;
1.4368 +
1.4369 + INFO_PRINTF1(_L(">> The PCM16 to PCMU16 codec doesn't currently store data between calls to ProcessL"));
1.4370 + TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30));
1.4371 +
1.4372 + if (err)
1.4373 + {
1.4374 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4375 + return EFail;
1.4376 + }
1.4377 + else if (!testOK)
1.4378 + {
1.4379 + INFO_PRINTF1(_L("Test failed"));
1.4380 + return EFail;
1.4381 + }
1.4382 + else
1.4383 + return EPass;
1.4384 + }
1.4385 +
1.4386 +//------------------------------------------------------------------
1.4387 +
1.4388 +/** @xxxx
1.4389 + * Constructor
1.4390 + */
1.4391 +CTest_MMF_ACOD_U_0068::CTest_MMF_ACOD_U_0068()
1.4392 + {
1.4393 + // store the name of this test case
1.4394 + // this is the name that is used by the script file
1.4395 + // Each test step initialises it's own name
1.4396 + iTestStepName = _L("MM-MMF-ACOD-U-0068-HP");
1.4397 + }
1.4398 +
1.4399 +/** @xxxx
1.4400 + * PCM16 To PCMU8 Instantiate codec by FourCC Codes
1.4401 + * @test Req. under test REQ172.6.2, REQ172.11.8
1.4402 + */
1.4403 +TVerdict CTest_MMF_ACOD_U_0068::DoTestStepL()
1.4404 + {
1.4405 + TBool testOK = EFalse;
1.4406 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodePCMU8));
1.4407 +
1.4408 + if (err)
1.4409 + {
1.4410 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4411 + return EFail;
1.4412 + }
1.4413 + else if (!testOK)
1.4414 + {
1.4415 + INFO_PRINTF1(_L("Test failed"));
1.4416 + return EFail;
1.4417 + }
1.4418 + else
1.4419 + return EPass;
1.4420 + }
1.4421 +
1.4422 +//------------------------------------------------------------------
1.4423 +
1.4424 +/** @xxxx
1.4425 + * Constructor
1.4426 + */
1.4427 +CTest_MMF_ACOD_U_0069::CTest_MMF_ACOD_U_0069()
1.4428 + {
1.4429 + // store the name of this test case
1.4430 + // this is the name that is used by the script file
1.4431 + // Each test step initialises it's own name
1.4432 + iTestStepName = _L("MM-MMF-ACOD-U-0069-HP");
1.4433 + }
1.4434 +
1.4435 +/** @xxxx
1.4436 + * PCM16 To PCMU8 Instantiate codec by UID
1.4437 + * @test Req. under test REQ172.6.1, REQ172.11.8
1.4438 + */
1.4439 +TVerdict CTest_MMF_ACOD_U_0069::DoTestStepL()
1.4440 + {
1.4441 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8};
1.4442 + TBool testOK = EFalse;
1.4443 + TRAPD(err, testOK = TestNewL(codecUid));
1.4444 +
1.4445 + if (err)
1.4446 + {
1.4447 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4448 + return EFail;
1.4449 + }
1.4450 + else if (!testOK)
1.4451 + {
1.4452 + INFO_PRINTF1(_L("Test failed"));
1.4453 + return EFail;
1.4454 + }
1.4455 + else
1.4456 + return EPass;
1.4457 + }
1.4458 +
1.4459 +//------------------------------------------------------------------
1.4460 +
1.4461 +/** @xxxx
1.4462 + * Constructor
1.4463 + */
1.4464 +CTest_MMF_ACOD_U_0070::CTest_MMF_ACOD_U_0070()
1.4465 + {
1.4466 + // store the name of this test case
1.4467 + // this is the name that is used by the script file
1.4468 + // Each test step initialises it's own name
1.4469 + iTestStepName = _L("MM-MMF-ACOD-U-0070-HP");
1.4470 +
1.4471 + for (TUint i=0; i<5; i++)
1.4472 + {
1.4473 + iExpectedSrcBytesProcessed[i] = 50;
1.4474 + iExpectedDstBytesAdded[i] = 25;
1.4475 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.4476 + }
1.4477 + }
1.4478 +
1.4479 +/** @xxxx
1.4480 + * PCM16 To PCMU8 Pass in small source buffers
1.4481 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4482 + */
1.4483 +TVerdict CTest_MMF_ACOD_U_0070::DoTestStepL()
1.4484 + {
1.4485 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8};
1.4486 + TBool testOK = EFalse;
1.4487 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToPCMU8OptimumDst));
1.4488 +
1.4489 + if (err)
1.4490 + {
1.4491 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4492 + return EFail;
1.4493 + }
1.4494 + else if (!testOK)
1.4495 + {
1.4496 + INFO_PRINTF1(_L("Test failed"));
1.4497 + return EFail;
1.4498 + }
1.4499 + else
1.4500 + return EPass;
1.4501 + }
1.4502 +
1.4503 +//------------------------------------------------------------------
1.4504 +
1.4505 +/** @xxxx
1.4506 + * Constructor
1.4507 + */
1.4508 +CTest_MMF_ACOD_U_0071::CTest_MMF_ACOD_U_0071()
1.4509 + {
1.4510 + // store the name of this test case
1.4511 + // this is the name that is used by the script file
1.4512 + // Each test step initialises it's own name
1.4513 + iTestStepName = _L("MM-MMF-ACOD-U-0071-HP");
1.4514 +
1.4515 + for (TUint i=0; i<5; i++)
1.4516 + {
1.4517 + iExpectedSrcBytesProcessed[i] = 100;
1.4518 + iExpectedDstBytesAdded[i] = 50;
1.4519 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.4520 + }
1.4521 + }
1.4522 +
1.4523 +/** @xxxx
1.4524 + * PCM16 To PCMU8 Pass in small dest buffers
1.4525 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4526 + */
1.4527 +TVerdict CTest_MMF_ACOD_U_0071::DoTestStepL()
1.4528 + {
1.4529 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8};
1.4530 + TBool testOK = EFalse;
1.4531 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU8OptimumSrc, KSmallBufferSize));
1.4532 +
1.4533 + if (err)
1.4534 + {
1.4535 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4536 + return EFail;
1.4537 + }
1.4538 + else if (!testOK)
1.4539 + {
1.4540 + INFO_PRINTF1(_L("Test failed"));
1.4541 + return EFail;
1.4542 + }
1.4543 + else
1.4544 + return EPass;
1.4545 + }
1.4546 +
1.4547 +//------------------------------------------------------------------
1.4548 +
1.4549 +/** @xxxx
1.4550 + * Constructor
1.4551 + */
1.4552 +CTest_MMF_ACOD_U_0072::CTest_MMF_ACOD_U_0072()
1.4553 + {
1.4554 + // store the name of this test case
1.4555 + // this is the name that is used by the script file
1.4556 + // Each test step initialises it's own name
1.4557 + iTestStepName = _L("MM-MMF-ACOD-U-0072-HP");
1.4558 + iHeapSize = 0x20000;
1.4559 +
1.4560 + for (TUint i=0; i<5; i++)
1.4561 + {
1.4562 + iExpectedSrcBytesProcessed[i] = 10000;
1.4563 + iExpectedDstBytesAdded[i] = 5000;
1.4564 +
1.4565 + if((i%2)==0)//even i
1.4566 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.4567 + else //odd i
1.4568 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.4569 + }
1.4570 + }
1.4571 +
1.4572 +/** @xxxx
1.4573 + * PCM16 To PCMU8 Pass in large buffers
1.4574 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4575 + */
1.4576 +TVerdict CTest_MMF_ACOD_U_0072::DoTestStepL()
1.4577 + {
1.4578 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8};
1.4579 + TBool testOK = EFalse;
1.4580 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize));
1.4581 +
1.4582 + if (err)
1.4583 + {
1.4584 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4585 + return EFail;
1.4586 + }
1.4587 + else if (!testOK)
1.4588 + {
1.4589 + INFO_PRINTF1(_L("Test failed"));
1.4590 + return EFail;
1.4591 + }
1.4592 + else
1.4593 + return EPass;
1.4594 + }
1.4595 +
1.4596 +//------------------------------------------------------------------
1.4597 +
1.4598 +/** @xxxx
1.4599 + * Constructor
1.4600 + */
1.4601 +CTest_MMF_ACOD_U_0073::CTest_MMF_ACOD_U_0073()
1.4602 + {
1.4603 + // store the name of this test case
1.4604 + // this is the name that is used by the script file
1.4605 + // Each test step initialises it's own name
1.4606 + iTestStepName = _L("MM-MMF-ACOD-U-0073-HP");
1.4607 +
1.4608 + for (TUint i=0; i<5; i++)
1.4609 + {
1.4610 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.4611 + iExpectedDstBytesAdded[i] = 0x800;
1.4612 +
1.4613 + if((i%2)==0)//even i
1.4614 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.4615 + else //odd i
1.4616 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.4617 + }
1.4618 + }
1.4619 +
1.4620 +/** @xxxx
1.4621 + * PCM16 To PCMU8 Pass in default sized buffers
1.4622 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4623 + */
1.4624 +TVerdict CTest_MMF_ACOD_U_0073::DoTestStepL()
1.4625 + {
1.4626 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8};
1.4627 + TBool testOK = EFalse;
1.4628 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize));
1.4629 +
1.4630 + if (err)
1.4631 + {
1.4632 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4633 + return EFail;
1.4634 + }
1.4635 + else if (!testOK)
1.4636 + {
1.4637 + INFO_PRINTF1(_L("Test failed"));
1.4638 + return EFail;
1.4639 + }
1.4640 + else
1.4641 + return EPass;
1.4642 + }
1.4643 +
1.4644 +//------------------------------------------------------------------
1.4645 +
1.4646 +/** @xxxx
1.4647 + * Constructor
1.4648 + */
1.4649 +CTest_MMF_ACOD_U_0074::CTest_MMF_ACOD_U_0074()
1.4650 + {
1.4651 + // store the name of this test case
1.4652 + // this is the name that is used by the script file
1.4653 + // Each test step initialises it's own name
1.4654 + iTestStepName = _L("MM-MMF-ACOD-U-0074-HP");
1.4655 +
1.4656 + for (TUint i=0; i<5; i++)
1.4657 + {
1.4658 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.4659 + iExpectedDstBytesAdded[i] = 0x800;
1.4660 +
1.4661 + if((i%2)==0)//even i
1.4662 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.4663 + else //odd i
1.4664 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.4665 + }
1.4666 + }
1.4667 +
1.4668 +/** @xxxx
1.4669 + * PCM16 To PCMU8 Pass in buffers with different max length and length
1.4670 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4671 + */
1.4672 +TVerdict CTest_MMF_ACOD_U_0074::DoTestStepL()
1.4673 + {
1.4674 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8};
1.4675 + TBool testOK = EFalse;
1.4676 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize));
1.4677 +
1.4678 + if (err)
1.4679 + {
1.4680 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4681 + return EFail;
1.4682 + }
1.4683 + else if (!testOK)
1.4684 + {
1.4685 + INFO_PRINTF1(_L("Test failed"));
1.4686 + return EFail;
1.4687 + }
1.4688 + else
1.4689 + return EPass;
1.4690 + }
1.4691 +
1.4692 +//------------------------------------------------------------------
1.4693 +
1.4694 +/** @xxxx
1.4695 + * Constructor
1.4696 + */
1.4697 +CTest_MMF_ACOD_U_0075::CTest_MMF_ACOD_U_0075()
1.4698 + {
1.4699 + // store the name of this test case
1.4700 + // this is the name that is used by the script file
1.4701 + // Each test step initialises it's own name
1.4702 + iTestStepName = _L("MM-MMF-ACOD-U-0075-HP");
1.4703 +
1.4704 + for (TUint i=0; i<5; i++)
1.4705 + {
1.4706 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.4707 + iExpectedDstBytesAdded[i] = 0x800;
1.4708 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.4709 + }
1.4710 + }
1.4711 +
1.4712 +/** @xxxx
1.4713 + * PCM16 To PCMU8 Pass in buffers of optimum size
1.4714 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4715 + */
1.4716 +TVerdict CTest_MMF_ACOD_U_0075::DoTestStepL()
1.4717 + {
1.4718 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8};
1.4719 + TBool testOK = EFalse;
1.4720 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU8OptimumSrc, KPCM16ToPCMU8OptimumDst));
1.4721 +
1.4722 + if (err)
1.4723 + {
1.4724 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4725 + return EFail;
1.4726 + }
1.4727 + else if (!testOK)
1.4728 + {
1.4729 + INFO_PRINTF1(_L("Test failed"));
1.4730 + return EFail;
1.4731 + }
1.4732 + else
1.4733 + return EPass;
1.4734 + }
1.4735 +
1.4736 +//------------------------------------------------------------------
1.4737 +
1.4738 +/** @xxxx
1.4739 + * Constructor
1.4740 + */
1.4741 +CTest_MMF_ACOD_U_0076::CTest_MMF_ACOD_U_0076()
1.4742 + {
1.4743 + // store the name of this test case
1.4744 + // this is the name that is used by the script file
1.4745 + // Each test step initialises it's own name
1.4746 + iTestStepName = _L("MM-MMF-ACOD-U-0076-HP");
1.4747 + }
1.4748 +
1.4749 +/** @xxxx
1.4750 + * PCM16 To PCMU8 Reposition source pointer during conversion
1.4751 + * @test Req. under test REQ172.11
1.4752 + */
1.4753 +TVerdict CTest_MMF_ACOD_U_0076::DoTestStepL()
1.4754 + {
1.4755 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8};
1.4756 + TBool testOK = EFalse;
1.4757 +
1.4758 + INFO_PRINTF1(_L(">> The PCM16 to PCMU8 codec doesn't currently store data between calls to ProcessL"));
1.4759 + TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30));
1.4760 +
1.4761 + if (err)
1.4762 + {
1.4763 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4764 + return EFail;
1.4765 + }
1.4766 + else if (!testOK)
1.4767 + {
1.4768 + INFO_PRINTF1(_L("Test failed"));
1.4769 + return EFail;
1.4770 + }
1.4771 + else
1.4772 + return EPass;
1.4773 + }
1.4774 +
1.4775 +//-----------------------------------------------------------------
1.4776 +
1.4777 +/** @xxxx
1.4778 + * Constructor
1.4779 + */
1.4780 +CTest_MMF_ACOD_U_0077::CTest_MMF_ACOD_U_0077()
1.4781 + {
1.4782 + // store the name of this test case
1.4783 + // this is the name that is used by the script file
1.4784 + // Each test step initialises it's own name
1.4785 + iTestStepName = _L("MM-MMF-ACOD-U-0077-HP");
1.4786 + }
1.4787 +
1.4788 +/** @xxxx
1.4789 + * PCMU16B To PCM16 Instantiate codec by FourCC Codes
1.4790 + * @test Req. under test REQ172.6.2, REQ172.11.9
1.4791 + */
1.4792 +TVerdict CTest_MMF_ACOD_U_0077::DoTestStepL()
1.4793 + {
1.4794 + TBool testOK = EFalse;
1.4795 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCMU16B, KMMFFourCCCodePCM16));
1.4796 +
1.4797 + if (err)
1.4798 + {
1.4799 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4800 + return EFail;
1.4801 + }
1.4802 + else if (!testOK)
1.4803 + {
1.4804 + INFO_PRINTF1(_L("Test failed"));
1.4805 + return EFail;
1.4806 + }
1.4807 + else
1.4808 + return EPass;
1.4809 + }
1.4810 +
1.4811 +//------------------------------------------------------------------
1.4812 +
1.4813 +/** @xxxx
1.4814 + * Constructor
1.4815 + */
1.4816 +CTest_MMF_ACOD_U_0078::CTest_MMF_ACOD_U_0078()
1.4817 + {
1.4818 + // store the name of this test case
1.4819 + // this is the name that is used by the script file
1.4820 + // Each test step initialises it's own name
1.4821 + iTestStepName = _L("MM-MMF-ACOD-U-0078-HP");
1.4822 + }
1.4823 +
1.4824 +/** @xxxx
1.4825 + * PCMU16B To PCM16 Instantiate codec by UID
1.4826 + * @test Req. under test REQ172.6.1, REQ172.11.9
1.4827 + */
1.4828 +TVerdict CTest_MMF_ACOD_U_0078::DoTestStepL()
1.4829 + {
1.4830 + const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16};
1.4831 + TBool testOK = EFalse;
1.4832 + TRAPD(err, testOK = TestNewL(codecUid));
1.4833 +
1.4834 + if (err)
1.4835 + {
1.4836 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4837 + return EFail;
1.4838 + }
1.4839 + else if (!testOK)
1.4840 + {
1.4841 + INFO_PRINTF1(_L("Test failed"));
1.4842 + return EFail;
1.4843 + }
1.4844 + else
1.4845 + return EPass;
1.4846 + }
1.4847 +
1.4848 +//------------------------------------------------------------------
1.4849 +
1.4850 +/** @xxxx
1.4851 + * Constructor
1.4852 + */
1.4853 +CTest_MMF_ACOD_U_0079::CTest_MMF_ACOD_U_0079()
1.4854 + {
1.4855 + // store the name of this test case
1.4856 + // this is the name that is used by the script file
1.4857 + // Each test step initialises it's own name
1.4858 + iTestStepName = _L("MM-MMF-ACOD-U-0079-HP");
1.4859 +
1.4860 + for (TUint i=0; i<5; i++)
1.4861 + {
1.4862 + iExpectedSrcBytesProcessed[i] = 50;
1.4863 + iExpectedDstBytesAdded[i] = 50;
1.4864 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.4865 + }
1.4866 + }
1.4867 +
1.4868 +/** @xxxx
1.4869 + * PCMU16B To PCM16 Pass in small source buffers
1.4870 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4871 + */
1.4872 +TVerdict CTest_MMF_ACOD_U_0079::DoTestStepL()
1.4873 + {
1.4874 + const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16};
1.4875 + TBool testOK = EFalse;
1.4876 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCMU16BToPCM16OptimumDst));
1.4877 +
1.4878 + if (err)
1.4879 + {
1.4880 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4881 + return EFail;
1.4882 + }
1.4883 + else if (!testOK)
1.4884 + {
1.4885 + INFO_PRINTF1(_L("Test failed"));
1.4886 + return EFail;
1.4887 + }
1.4888 + else
1.4889 + return EPass;
1.4890 + }
1.4891 +
1.4892 +//------------------------------------------------------------------
1.4893 +
1.4894 +/** @xxxx
1.4895 + * Constructor
1.4896 + */
1.4897 +CTest_MMF_ACOD_U_0080::CTest_MMF_ACOD_U_0080()
1.4898 + {
1.4899 + // store the name of this test case
1.4900 + // this is the name that is used by the script file
1.4901 + // Each test step initialises it's own name
1.4902 + iTestStepName = _L("MM-MMF-ACOD-U-0080-HP");
1.4903 +
1.4904 + for (TUint i=0; i<5; i++)
1.4905 + {
1.4906 + iExpectedSrcBytesProcessed[i] = 50;
1.4907 + iExpectedDstBytesAdded[i] = 50;
1.4908 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.4909 + }
1.4910 + }
1.4911 +
1.4912 +/** @xxxx
1.4913 + * PCMU16B To PCM16 Pass in small dest buffers
1.4914 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4915 + */
1.4916 +TVerdict CTest_MMF_ACOD_U_0080::DoTestStepL()
1.4917 + {
1.4918 + const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16};
1.4919 + TBool testOK = EFalse;
1.4920 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU16BToPCM16OptimumSrc, KSmallBufferSize));
1.4921 +
1.4922 + if (err)
1.4923 + {
1.4924 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4925 + return EFail;
1.4926 + }
1.4927 + else if (!testOK)
1.4928 + {
1.4929 + INFO_PRINTF1(_L("Test failed"));
1.4930 + return EFail;
1.4931 + }
1.4932 + else
1.4933 + return EPass;
1.4934 + }
1.4935 +
1.4936 +//------------------------------------------------------------------
1.4937 +
1.4938 +/** @xxxx
1.4939 + * Constructor
1.4940 + */
1.4941 +CTest_MMF_ACOD_U_0081::CTest_MMF_ACOD_U_0081()
1.4942 + {
1.4943 + // store the name of this test case
1.4944 + // this is the name that is used by the script file
1.4945 + // Each test step initialises it's own name
1.4946 + iTestStepName = _L("MM-MMF-ACOD-U-0081-HP");
1.4947 + iHeapSize = 0x20000;
1.4948 +
1.4949 + for (TUint i=0; i<5; i++)
1.4950 + {
1.4951 + iExpectedSrcBytesProcessed[i] = 10000;
1.4952 + iExpectedDstBytesAdded[i] = 10000;
1.4953 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.4954 + }
1.4955 + }
1.4956 +
1.4957 +/** @xxxx
1.4958 + * PCMU16B To PCM16 Pass in large buffers
1.4959 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.4960 + */
1.4961 +TVerdict CTest_MMF_ACOD_U_0081::DoTestStepL()
1.4962 + {
1.4963 + const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16};
1.4964 + TBool testOK = EFalse;
1.4965 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize));
1.4966 +
1.4967 + if (err)
1.4968 + {
1.4969 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.4970 + return EFail;
1.4971 + }
1.4972 + else if (!testOK)
1.4973 + {
1.4974 + INFO_PRINTF1(_L("Test failed"));
1.4975 + return EFail;
1.4976 + }
1.4977 + else
1.4978 + return EPass;
1.4979 + }
1.4980 +
1.4981 +//------------------------------------------------------------------
1.4982 +
1.4983 +/** @xxxx
1.4984 + * Constructor
1.4985 + */
1.4986 +CTest_MMF_ACOD_U_0082::CTest_MMF_ACOD_U_0082()
1.4987 + {
1.4988 + // store the name of this test case
1.4989 + // this is the name that is used by the script file
1.4990 + // Each test step initialises it's own name
1.4991 + iTestStepName = _L("MM-MMF-ACOD-U-0082-HP");
1.4992 +
1.4993 + for (TUint i=0; i<5; i++)
1.4994 + {
1.4995 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.4996 + iExpectedDstBytesAdded[i] = 0x1000;
1.4997 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.4998 + }
1.4999 + }
1.5000 +
1.5001 +/** @xxxx
1.5002 + * PCMU16B To PCM16 Pass in default sized buffers
1.5003 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5004 + */
1.5005 +TVerdict CTest_MMF_ACOD_U_0082::DoTestStepL()
1.5006 + {
1.5007 + const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16};
1.5008 + TBool testOK = EFalse;
1.5009 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize));
1.5010 +
1.5011 + if (err)
1.5012 + {
1.5013 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5014 + return EFail;
1.5015 + }
1.5016 + else if (!testOK)
1.5017 + {
1.5018 + INFO_PRINTF1(_L("Test failed"));
1.5019 + return EFail;
1.5020 + }
1.5021 + else
1.5022 + return EPass;
1.5023 + }
1.5024 +
1.5025 +//------------------------------------------------------------------
1.5026 +
1.5027 +/** @xxxx
1.5028 + * Constructor
1.5029 + */
1.5030 +CTest_MMF_ACOD_U_0083::CTest_MMF_ACOD_U_0083()
1.5031 + {
1.5032 + // store the name of this test case
1.5033 + // this is the name that is used by the script file
1.5034 + // Each test step initialises it's own name
1.5035 + iTestStepName = _L("MM-MMF-ACOD-U-0083-HP");
1.5036 +
1.5037 + for (TUint i=0; i<5; i++)
1.5038 + {
1.5039 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.5040 + iExpectedDstBytesAdded[i] = 0x1000;
1.5041 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.5042 + }
1.5043 + }
1.5044 +
1.5045 +/** @xxxx
1.5046 + * PCMU16B To PCM16 Pass in buffers with different max length and length
1.5047 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5048 + */
1.5049 +TVerdict CTest_MMF_ACOD_U_0083::DoTestStepL()
1.5050 + {
1.5051 + const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16};
1.5052 + TBool testOK = EFalse;
1.5053 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize));
1.5054 +
1.5055 + if (err)
1.5056 + {
1.5057 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5058 + return EFail;
1.5059 + }
1.5060 + else if (!testOK)
1.5061 + {
1.5062 + INFO_PRINTF1(_L("Test failed"));
1.5063 + return EFail;
1.5064 + }
1.5065 + else
1.5066 + return EPass;
1.5067 + }
1.5068 +
1.5069 +//------------------------------------------------------------------
1.5070 +
1.5071 +/** @xxxx
1.5072 + * Constructor
1.5073 + */
1.5074 +CTest_MMF_ACOD_U_0084::CTest_MMF_ACOD_U_0084()
1.5075 + {
1.5076 + // store the name of this test case
1.5077 + // this is the name that is used by the script file
1.5078 + // Each test step initialises it's own name
1.5079 + iTestStepName = _L("MM-MMF-ACOD-U-0084-HP");
1.5080 +
1.5081 + for (TUint i=0; i<5; i++)
1.5082 + {
1.5083 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.5084 + iExpectedDstBytesAdded[i] = 0x1000;
1.5085 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.5086 + }
1.5087 + }
1.5088 +
1.5089 +/** @xxxx
1.5090 + * PCMU16B To PCM16 Pass in buffers of optimum size
1.5091 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5092 + */
1.5093 +TVerdict CTest_MMF_ACOD_U_0084::DoTestStepL()
1.5094 + {
1.5095 + const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16};
1.5096 + TBool testOK = EFalse;
1.5097 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU16BToPCM16OptimumSrc, KPCMU16BToPCM16OptimumDst));
1.5098 +
1.5099 + if (err)
1.5100 + {
1.5101 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5102 + return EFail;
1.5103 + }
1.5104 + else if (!testOK)
1.5105 + {
1.5106 + INFO_PRINTF1(_L("Test failed"));
1.5107 + return EFail;
1.5108 + }
1.5109 + else
1.5110 + return EPass;
1.5111 + }
1.5112 +
1.5113 +//------------------------------------------------------------------
1.5114 +
1.5115 +/** @xxxx
1.5116 + * Constructor
1.5117 + */
1.5118 +CTest_MMF_ACOD_U_0085::CTest_MMF_ACOD_U_0085()
1.5119 + {
1.5120 + // store the name of this test case
1.5121 + // this is the name that is used by the script file
1.5122 + // Each test step initialises it's own name
1.5123 + iTestStepName = _L("MM-MMF-ACOD-U-0085-HP");
1.5124 + }
1.5125 +
1.5126 +/** @xxxx
1.5127 + * PCMU16B To PCM16 Reposition source pointer during conversion
1.5128 + * @test Req. under test REQ172.11
1.5129 + */
1.5130 +TVerdict CTest_MMF_ACOD_U_0085::DoTestStepL()
1.5131 + {
1.5132 + const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16};
1.5133 + TBool testOK = EFalse;
1.5134 +
1.5135 + INFO_PRINTF1(_L(">> The PCMU16B to PCM16 codec doesn't currently store data between calls to ProcessL"));
1.5136 + TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30));
1.5137 +
1.5138 + if (err)
1.5139 + {
1.5140 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5141 + return EFail;
1.5142 + }
1.5143 + else if (!testOK)
1.5144 + {
1.5145 + INFO_PRINTF1(_L("Test failed"));
1.5146 + return EFail;
1.5147 + }
1.5148 + else
1.5149 + return EPass;
1.5150 + }
1.5151 +
1.5152 +//------------------------------------------------------------------
1.5153 +
1.5154 +/** @xxxx
1.5155 + * Constructor
1.5156 + */
1.5157 +CTest_MMF_ACOD_U_0086::CTest_MMF_ACOD_U_0086()
1.5158 + {
1.5159 + // store the name of this test case
1.5160 + // this is the name that is used by the script file
1.5161 + // Each test step initialises it's own name
1.5162 + iTestStepName = _L("MM-MMF-ACOD-U-0086-HP");
1.5163 + }
1.5164 +
1.5165 +/** @xxxx
1.5166 + * PCMU16 To PCM16 Instantiate codec by FourCC Codes
1.5167 + * @test Req. under test REQ172.6.2, REQ172.11.25
1.5168 + */
1.5169 +TVerdict CTest_MMF_ACOD_U_0086::DoTestStepL()
1.5170 + {
1.5171 + TBool testOK = EFalse;
1.5172 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCMU16, KMMFFourCCCodePCM16));
1.5173 +
1.5174 + if (err)
1.5175 + {
1.5176 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5177 + return EFail;
1.5178 + }
1.5179 + else if (!testOK)
1.5180 + {
1.5181 + INFO_PRINTF1(_L("Test failed"));
1.5182 + return EFail;
1.5183 + }
1.5184 + else
1.5185 + return EPass;
1.5186 + }
1.5187 +
1.5188 +//------------------------------------------------------------------
1.5189 +
1.5190 +/** @xxxx
1.5191 + * Constructor
1.5192 + */
1.5193 +CTest_MMF_ACOD_U_0087::CTest_MMF_ACOD_U_0087()
1.5194 + {
1.5195 + // store the name of this test case
1.5196 + // this is the name that is used by the script file
1.5197 + // Each test step initialises it's own name
1.5198 + iTestStepName = _L("MM-MMF-ACOD-U-0087-HP");
1.5199 + }
1.5200 +
1.5201 +/** @xxxx
1.5202 + * PCMU16 To PCM16 Instantiate codec by UID
1.5203 + * @test Req. under test REQ172.6.1, REQ172.11.25
1.5204 + */
1.5205 +TVerdict CTest_MMF_ACOD_U_0087::DoTestStepL()
1.5206 + {
1.5207 + const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16};
1.5208 + TBool testOK = EFalse;
1.5209 + TRAPD(err, testOK = TestNewL(codecUid));
1.5210 +
1.5211 + if (err)
1.5212 + {
1.5213 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5214 + return EFail;
1.5215 + }
1.5216 + else if (!testOK)
1.5217 + {
1.5218 + INFO_PRINTF1(_L("Test failed"));
1.5219 + return EFail;
1.5220 + }
1.5221 + else
1.5222 + return EPass;
1.5223 + }
1.5224 +
1.5225 +//------------------------------------------------------------------
1.5226 +
1.5227 +/** @xxxx
1.5228 + * Constructor
1.5229 + */
1.5230 +CTest_MMF_ACOD_U_0088::CTest_MMF_ACOD_U_0088()
1.5231 + {
1.5232 + // store the name of this test case
1.5233 + // this is the name that is used by the script file
1.5234 + // Each test step initialises it's own name
1.5235 + iTestStepName = _L("MM-MMF-ACOD-U-0088-HP");
1.5236 +
1.5237 + for (TUint i=0; i<5; i++)
1.5238 + {
1.5239 + iExpectedSrcBytesProcessed[i] = 50;
1.5240 + iExpectedDstBytesAdded[i] = 50;
1.5241 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.5242 + }
1.5243 + }
1.5244 +
1.5245 +/** @xxxx
1.5246 + * PCMU16 To PCM16 Pass in small source buffers
1.5247 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5248 + */
1.5249 +TVerdict CTest_MMF_ACOD_U_0088::DoTestStepL()
1.5250 + {
1.5251 + const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16};
1.5252 + TBool testOK = EFalse;
1.5253 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCMU16ToPCM16OptimumDst));
1.5254 +
1.5255 + if (err)
1.5256 + {
1.5257 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5258 + return EFail;
1.5259 + }
1.5260 + else if (!testOK)
1.5261 + {
1.5262 + INFO_PRINTF1(_L("Test failed"));
1.5263 + return EFail;
1.5264 + }
1.5265 + else
1.5266 + return EPass;
1.5267 + }
1.5268 +
1.5269 +//------------------------------------------------------------------
1.5270 +
1.5271 +/** @xxxx
1.5272 + * Constructor
1.5273 + */
1.5274 +CTest_MMF_ACOD_U_0089::CTest_MMF_ACOD_U_0089()
1.5275 + {
1.5276 + // store the name of this test case
1.5277 + // this is the name that is used by the script file
1.5278 + // Each test step initialises it's own name
1.5279 + iTestStepName = _L("MM-MMF-ACOD-U-0089-HP");
1.5280 +
1.5281 + for (TUint i=0; i<5; i++)
1.5282 + {
1.5283 + iExpectedSrcBytesProcessed[i] = 50;
1.5284 + iExpectedDstBytesAdded[i] = 50;
1.5285 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.5286 + }
1.5287 + }
1.5288 +
1.5289 +/** @xxxx
1.5290 + * PCMU16 To PCM16 Pass in small dest buffers
1.5291 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5292 + */
1.5293 +TVerdict CTest_MMF_ACOD_U_0089::DoTestStepL()
1.5294 + {
1.5295 + const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16};
1.5296 + TBool testOK = EFalse;
1.5297 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU16ToPCM16OptimumSrc, KSmallBufferSize));
1.5298 +
1.5299 + if (err)
1.5300 + {
1.5301 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5302 + return EFail;
1.5303 + }
1.5304 + else if (!testOK)
1.5305 + {
1.5306 + INFO_PRINTF1(_L("Test failed"));
1.5307 + return EFail;
1.5308 + }
1.5309 + else
1.5310 + return EPass;
1.5311 + }
1.5312 +
1.5313 +//------------------------------------------------------------------
1.5314 +
1.5315 +/** @xxxx
1.5316 + * Constructor
1.5317 + */
1.5318 +CTest_MMF_ACOD_U_0090::CTest_MMF_ACOD_U_0090()
1.5319 + {
1.5320 + // store the name of this test case
1.5321 + // this is the name that is used by the script file
1.5322 + // Each test step initialises it's own name
1.5323 + iTestStepName = _L("MM-MMF-ACOD-U-0090-HP");
1.5324 + iHeapSize = 0x20000;
1.5325 + for (TUint i=0; i<5; i++)
1.5326 + {
1.5327 + iExpectedSrcBytesProcessed[i] = 10000;
1.5328 + iExpectedDstBytesAdded[i] = 10000;
1.5329 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.5330 + }
1.5331 + }
1.5332 +
1.5333 +/** @xxxx
1.5334 + * PCMU16 To PCM16 Pass in large buffers
1.5335 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5336 + */
1.5337 +TVerdict CTest_MMF_ACOD_U_0090::DoTestStepL()
1.5338 + {
1.5339 + const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16};
1.5340 + TBool testOK = EFalse;
1.5341 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize));
1.5342 +
1.5343 + if (err)
1.5344 + {
1.5345 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5346 + return EFail;
1.5347 + }
1.5348 + else if (!testOK)
1.5349 + {
1.5350 + INFO_PRINTF1(_L("Test failed"));
1.5351 + return EFail;
1.5352 + }
1.5353 + else
1.5354 + return EPass;
1.5355 + }
1.5356 +
1.5357 +//------------------------------------------------------------------
1.5358 +
1.5359 +/** @xxxx
1.5360 + * Constructor
1.5361 + */
1.5362 +CTest_MMF_ACOD_U_0091::CTest_MMF_ACOD_U_0091()
1.5363 + {
1.5364 + // store the name of this test case
1.5365 + // this is the name that is used by the script file
1.5366 + // Each test step initialises it's own name
1.5367 + iTestStepName = _L("MM-MMF-ACOD-U-0091-HP");
1.5368 +
1.5369 + for (TUint i=0; i<5; i++)
1.5370 + {
1.5371 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.5372 + iExpectedDstBytesAdded[i] = 0x1000;
1.5373 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.5374 + }
1.5375 + }
1.5376 +
1.5377 +/** @xxxx
1.5378 + * PCMU16 To PCM16 Pass in default sized buffers
1.5379 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5380 + */
1.5381 +TVerdict CTest_MMF_ACOD_U_0091::DoTestStepL()
1.5382 + {
1.5383 + const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16};
1.5384 + TBool testOK = EFalse;
1.5385 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize));
1.5386 +
1.5387 + if (err)
1.5388 + {
1.5389 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5390 + return EFail;
1.5391 + }
1.5392 + else if (!testOK)
1.5393 + {
1.5394 + INFO_PRINTF1(_L("Test failed"));
1.5395 + return EFail;
1.5396 + }
1.5397 + else
1.5398 + return EPass;
1.5399 + }
1.5400 +
1.5401 +//------------------------------------------------------------------
1.5402 +
1.5403 +/** @xxxx
1.5404 + * Constructor
1.5405 + */
1.5406 +CTest_MMF_ACOD_U_0092::CTest_MMF_ACOD_U_0092()
1.5407 + {
1.5408 + // store the name of this test case
1.5409 + // this is the name that is used by the script file
1.5410 + // Each test step initialises it's own name
1.5411 + iTestStepName = _L("MM-MMF-ACOD-U-0092-HP");
1.5412 +
1.5413 + for (TUint i=0; i<5; i++)
1.5414 + {
1.5415 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.5416 + iExpectedDstBytesAdded[i] = 0x1000;
1.5417 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.5418 + }
1.5419 + }
1.5420 +
1.5421 +/** @xxxx
1.5422 + * PCMU16 To PCM16 Pass in buffers with different max length and length
1.5423 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5424 + */
1.5425 +TVerdict CTest_MMF_ACOD_U_0092::DoTestStepL()
1.5426 + {
1.5427 + const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16};
1.5428 + TBool testOK = EFalse;
1.5429 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize));
1.5430 +
1.5431 + if (err)
1.5432 + {
1.5433 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5434 + return EFail;
1.5435 + }
1.5436 + else if (!testOK)
1.5437 + {
1.5438 + INFO_PRINTF1(_L("Test failed"));
1.5439 + return EFail;
1.5440 + }
1.5441 + else
1.5442 + return EPass;
1.5443 + }
1.5444 +
1.5445 +//------------------------------------------------------------------
1.5446 +
1.5447 +/** @xxxx
1.5448 + * Constructor
1.5449 + */
1.5450 +CTest_MMF_ACOD_U_0093::CTest_MMF_ACOD_U_0093()
1.5451 + {
1.5452 + // store the name of this test case
1.5453 + // this is the name that is used by the script file
1.5454 + // Each test step initialises it's own name
1.5455 + iTestStepName = _L("MM-MMF-ACOD-U-0093-HP");
1.5456 +
1.5457 + for (TUint i=0; i<5; i++)
1.5458 + {
1.5459 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.5460 + iExpectedDstBytesAdded[i] = 0x1000;
1.5461 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.5462 + }
1.5463 + }
1.5464 +
1.5465 +/** @xxxx
1.5466 + * PCMU16 To PCM16 Pass in buffers of optimum size
1.5467 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5468 + */
1.5469 +TVerdict CTest_MMF_ACOD_U_0093::DoTestStepL()
1.5470 + {
1.5471 + const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16};
1.5472 + TBool testOK = EFalse;
1.5473 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU16ToPCM16OptimumSrc, KPCMU16ToPCM16OptimumDst));
1.5474 +
1.5475 + if (err)
1.5476 + {
1.5477 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5478 + return EFail;
1.5479 + }
1.5480 + else if (!testOK)
1.5481 + {
1.5482 + INFO_PRINTF1(_L("Test failed"));
1.5483 + return EFail;
1.5484 + }
1.5485 + else
1.5486 + return EPass;
1.5487 + }
1.5488 +
1.5489 +//------------------------------------------------------------------
1.5490 +
1.5491 +/** @xxxx
1.5492 + * Constructor
1.5493 + */
1.5494 +CTest_MMF_ACOD_U_0094::CTest_MMF_ACOD_U_0094()
1.5495 + {
1.5496 + // store the name of this test case
1.5497 + // this is the name that is used by the script file
1.5498 + // Each test step initialises it's own name
1.5499 + iTestStepName = _L("MM-MMF-ACOD-U-0094-HP");
1.5500 + }
1.5501 +
1.5502 +/** @xxxx
1.5503 + * PCMU16 To PCM16 Reposition source pointer during conversion
1.5504 + * @test Req. under test REQ172.11
1.5505 + */
1.5506 +TVerdict CTest_MMF_ACOD_U_0094::DoTestStepL()
1.5507 + {
1.5508 + const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16};
1.5509 + TBool testOK = EFalse;
1.5510 +
1.5511 + INFO_PRINTF1(_L(">> The PCMU16 to PCM16 codec doesn't currently store data between calls to ProcessL"));
1.5512 + TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30));
1.5513 +
1.5514 + if (err)
1.5515 + {
1.5516 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5517 + return EFail;
1.5518 + }
1.5519 + else if (!testOK)
1.5520 + {
1.5521 + INFO_PRINTF1(_L("Test failed"));
1.5522 + return EFail;
1.5523 + }
1.5524 + else
1.5525 + return EPass;
1.5526 + }
1.5527 +
1.5528 +//------------------------------------------------------------------
1.5529 +
1.5530 +/** @xxxx
1.5531 + * Constructor
1.5532 + */
1.5533 +CTest_MMF_ACOD_U_0095::CTest_MMF_ACOD_U_0095()
1.5534 + {
1.5535 + // store the name of this test case
1.5536 + // this is the name that is used by the script file
1.5537 + // Each test step initialises it's own name
1.5538 + iTestStepName = _L("MM-MMF-ACOD-U-0095-HP");
1.5539 + }
1.5540 +
1.5541 +/** @xxxx
1.5542 + * PCMU8 To PCM16 Instantiate codec by FourCC Codes
1.5543 + * @test Req. under test REQ172.6.2, REQ172.11.11
1.5544 + */
1.5545 +TVerdict CTest_MMF_ACOD_U_0095::DoTestStepL()
1.5546 + {
1.5547 + TBool testOK = EFalse;
1.5548 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCMU8, KMMFFourCCCodePCM16));
1.5549 +
1.5550 + if (err)
1.5551 + {
1.5552 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5553 + return EFail;
1.5554 + }
1.5555 + else if (!testOK)
1.5556 + {
1.5557 + INFO_PRINTF1(_L("Test failed"));
1.5558 + return EFail;
1.5559 + }
1.5560 + else
1.5561 + return EPass;
1.5562 + }
1.5563 +
1.5564 +//------------------------------------------------------------------
1.5565 +
1.5566 +/** @xxxx
1.5567 + * Constructor
1.5568 + */
1.5569 +CTest_MMF_ACOD_U_0096::CTest_MMF_ACOD_U_0096()
1.5570 + {
1.5571 + // store the name of this test case
1.5572 + // this is the name that is used by the script file
1.5573 + // Each test step initialises it's own name
1.5574 + iTestStepName = _L("MM-MMF-ACOD-U-0096-HP");
1.5575 + }
1.5576 +
1.5577 +/** @xxxx
1.5578 + * PCMU8 To PCM16 Instantiate codec by UID
1.5579 + * @test Req. under test REQ172.6.1, REQ172.11.11
1.5580 + */
1.5581 +TVerdict CTest_MMF_ACOD_U_0096::DoTestStepL()
1.5582 + {
1.5583 + const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16};
1.5584 + TBool testOK = EFalse;
1.5585 + TRAPD(err, testOK = TestNewL(codecUid));
1.5586 +
1.5587 + if (err)
1.5588 + {
1.5589 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5590 + return EFail;
1.5591 + }
1.5592 + else if (!testOK)
1.5593 + {
1.5594 + INFO_PRINTF1(_L("Test failed"));
1.5595 + return EFail;
1.5596 + }
1.5597 + else
1.5598 + return EPass;
1.5599 + }
1.5600 +
1.5601 +//------------------------------------------------------------------
1.5602 +
1.5603 +/** @xxxx
1.5604 + * Constructor
1.5605 + */
1.5606 +CTest_MMF_ACOD_U_0097::CTest_MMF_ACOD_U_0097()
1.5607 + {
1.5608 + // store the name of this test case
1.5609 + // this is the name that is used by the script file
1.5610 + // Each test step initialises it's own name
1.5611 + iTestStepName = _L("MM-MMF-ACOD-U-0097-HP");
1.5612 +
1.5613 + for (TUint i=0; i<5; i++)
1.5614 + {
1.5615 + iExpectedSrcBytesProcessed[i] = 50;
1.5616 + iExpectedDstBytesAdded[i] = 100;
1.5617 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.5618 + }
1.5619 + }
1.5620 +
1.5621 +/** @xxxx
1.5622 + * PCMU8 To PCM16 Pass in small source buffers
1.5623 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5624 + */
1.5625 +TVerdict CTest_MMF_ACOD_U_0097::DoTestStepL()
1.5626 + {
1.5627 + const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16};
1.5628 + TBool testOK = EFalse;
1.5629 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCMU8ToPCM16OptimumDst));
1.5630 +
1.5631 + if (err)
1.5632 + {
1.5633 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5634 + return EFail;
1.5635 + }
1.5636 + else if (!testOK)
1.5637 + {
1.5638 + INFO_PRINTF1(_L("Test failed"));
1.5639 + return EFail;
1.5640 + }
1.5641 + else
1.5642 + return EPass;
1.5643 + }
1.5644 +
1.5645 +//------------------------------------------------------------------
1.5646 +
1.5647 +/** @xxxx
1.5648 + * Constructor
1.5649 + */
1.5650 +CTest_MMF_ACOD_U_0098::CTest_MMF_ACOD_U_0098()
1.5651 + {
1.5652 + // store the name of this test case
1.5653 + // this is the name that is used by the script file
1.5654 + // Each test step initialises it's own name
1.5655 + iTestStepName = _L("MM-MMF-ACOD-U-0098-HP");
1.5656 +
1.5657 + for (TUint i=0; i<5; i++)
1.5658 + {
1.5659 + iExpectedSrcBytesProcessed[i] = 25;
1.5660 + iExpectedDstBytesAdded[i] = 50;
1.5661 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.5662 + }
1.5663 + }
1.5664 +
1.5665 +/** @xxxx
1.5666 + * PCMU8 To PCM16 Pass in small dest buffers
1.5667 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5668 + */
1.5669 +TVerdict CTest_MMF_ACOD_U_0098::DoTestStepL()
1.5670 + {
1.5671 + const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16};
1.5672 + TBool testOK = EFalse;
1.5673 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU8ToPCM16OptimumSrc, KSmallBufferSize));
1.5674 +
1.5675 + if (err)
1.5676 + {
1.5677 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5678 + return EFail;
1.5679 + }
1.5680 + else if (!testOK)
1.5681 + {
1.5682 + INFO_PRINTF1(_L("Test failed"));
1.5683 + return EFail;
1.5684 + }
1.5685 + else
1.5686 + return EPass;
1.5687 + }
1.5688 +
1.5689 +//------------------------------------------------------------------
1.5690 +
1.5691 +/** @xxxx
1.5692 + * Constructor
1.5693 + */
1.5694 +CTest_MMF_ACOD_U_0099::CTest_MMF_ACOD_U_0099()
1.5695 + {
1.5696 + // store the name of this test case
1.5697 + // this is the name that is used by the script file
1.5698 + // Each test step initialises it's own name
1.5699 + iTestStepName = _L("MM-MMF-ACOD-U-0099-HP");
1.5700 + iHeapSize = 0x20000;
1.5701 + for (TUint i=0; i<5; i++)
1.5702 + {
1.5703 + iExpectedSrcBytesProcessed[i] = 5000;
1.5704 + iExpectedDstBytesAdded[i] = 10000;
1.5705 +
1.5706 + if((i%2)==0)//even i
1.5707 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.5708 + else //odd i
1.5709 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.5710 + }
1.5711 + }
1.5712 +
1.5713 +/** @xxxx
1.5714 + * PCMU8 To PCM16 Pass in large buffers
1.5715 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5716 + */
1.5717 +TVerdict CTest_MMF_ACOD_U_0099::DoTestStepL()
1.5718 + {
1.5719 + const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16};
1.5720 + TBool testOK = EFalse;
1.5721 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize));
1.5722 +
1.5723 + if (err)
1.5724 + {
1.5725 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5726 + return EFail;
1.5727 + }
1.5728 + else if (!testOK)
1.5729 + {
1.5730 + INFO_PRINTF1(_L("Test failed"));
1.5731 + return EFail;
1.5732 + }
1.5733 + else
1.5734 + return EPass;
1.5735 + }
1.5736 +
1.5737 +//------------------------------------------------------------------
1.5738 +
1.5739 +/** @xxxx
1.5740 + * Constructor
1.5741 + */
1.5742 +CTest_MMF_ACOD_U_0100::CTest_MMF_ACOD_U_0100()
1.5743 + {
1.5744 + // store the name of this test case
1.5745 + // this is the name that is used by the script file
1.5746 + // Each test step initialises it's own name
1.5747 + iTestStepName = _L("MM-MMF-ACOD-U-0100-HP");
1.5748 +
1.5749 + for (TUint i=0; i<5; i++)
1.5750 + {
1.5751 + iExpectedSrcBytesProcessed[i] = 0x800;
1.5752 + iExpectedDstBytesAdded[i] = 0x1000;
1.5753 +
1.5754 + if((i%2)==0)//even i
1.5755 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.5756 + else //odd i
1.5757 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.5758 + }
1.5759 + }
1.5760 +
1.5761 +/** @xxxx
1.5762 + * PCMU8 To PCM16 Pass in default sized buffers
1.5763 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5764 + */
1.5765 +TVerdict CTest_MMF_ACOD_U_0100::DoTestStepL()
1.5766 + {
1.5767 + const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16};
1.5768 + TBool testOK = EFalse;
1.5769 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize));
1.5770 +
1.5771 + if (err)
1.5772 + {
1.5773 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5774 + return EFail;
1.5775 + }
1.5776 + else if (!testOK)
1.5777 + {
1.5778 + INFO_PRINTF1(_L("Test failed"));
1.5779 + return EFail;
1.5780 + }
1.5781 + else
1.5782 + return EPass;
1.5783 + }
1.5784 +
1.5785 +//------------------------------------------------------------------
1.5786 +
1.5787 +/** @xxxx
1.5788 + * Constructor
1.5789 + */
1.5790 +CTest_MMF_ACOD_U_0101::CTest_MMF_ACOD_U_0101()
1.5791 + {
1.5792 + // store the name of this test case
1.5793 + // this is the name that is used by the script file
1.5794 + // Each test step initialises it's own name
1.5795 + iTestStepName = _L("MM-MMF-ACOD-U-0101-HP");
1.5796 +
1.5797 + for (TUint i=0; i<5; i++)
1.5798 + {
1.5799 + iExpectedSrcBytesProcessed[i] = 0x800;
1.5800 + iExpectedDstBytesAdded[i] = 0x1000;
1.5801 +
1.5802 + if((i%2)==0)//even i
1.5803 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.5804 + else //odd i
1.5805 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.5806 + }
1.5807 + }
1.5808 +
1.5809 +/** @xxxx
1.5810 + * PCMU8 To PCM16 Pass in buffers with different max length and length
1.5811 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5812 + */
1.5813 +TVerdict CTest_MMF_ACOD_U_0101::DoTestStepL()
1.5814 + {
1.5815 + const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16};
1.5816 + TBool testOK = EFalse;
1.5817 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize));
1.5818 +
1.5819 + if (err)
1.5820 + {
1.5821 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5822 + return EFail;
1.5823 + }
1.5824 + else if (!testOK)
1.5825 + {
1.5826 + INFO_PRINTF1(_L("Test failed"));
1.5827 + return EFail;
1.5828 + }
1.5829 + else
1.5830 + return EPass;
1.5831 + }
1.5832 +
1.5833 +//------------------------------------------------------------------
1.5834 +
1.5835 +/** @xxxx
1.5836 + * Constructor
1.5837 + */
1.5838 +CTest_MMF_ACOD_U_0102::CTest_MMF_ACOD_U_0102()
1.5839 + {
1.5840 + // store the name of this test case
1.5841 + // this is the name that is used by the script file
1.5842 + // Each test step initialises it's own name
1.5843 + iTestStepName = _L("MM-MMF-ACOD-U-0102-HP");
1.5844 +
1.5845 + for (TUint i=0; i<5; i++)
1.5846 + {
1.5847 + iExpectedSrcBytesProcessed[i] = 0x800;
1.5848 + iExpectedDstBytesAdded[i] = 0x1000;
1.5849 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.5850 + }
1.5851 + }
1.5852 +
1.5853 +/** @xxxx
1.5854 + * PCMU8 To PCM16 Pass in buffers of optimum size
1.5855 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.5856 + */
1.5857 +TVerdict CTest_MMF_ACOD_U_0102::DoTestStepL()
1.5858 + {
1.5859 + const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16};
1.5860 + TBool testOK = EFalse;
1.5861 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU8ToPCM16OptimumSrc, KPCMU8ToPCM16OptimumDst));
1.5862 +
1.5863 + if (err)
1.5864 + {
1.5865 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5866 + return EFail;
1.5867 + }
1.5868 + else if (!testOK)
1.5869 + {
1.5870 + INFO_PRINTF1(_L("Test failed"));
1.5871 + return EFail;
1.5872 + }
1.5873 + else
1.5874 + return EPass;
1.5875 + }
1.5876 +
1.5877 +//------------------------------------------------------------------
1.5878 +
1.5879 +/** @xxxx
1.5880 + * Constructor
1.5881 + */
1.5882 +CTest_MMF_ACOD_U_0103::CTest_MMF_ACOD_U_0103()
1.5883 + {
1.5884 + // store the name of this test case
1.5885 + // this is the name that is used by the script file
1.5886 + // Each test step initialises it's own name
1.5887 + iTestStepName = _L("MM-MMF-ACOD-U-0103-HP");
1.5888 + }
1.5889 +
1.5890 +/** @xxxx
1.5891 + * PCMU8 To PCM16 Reposition source pointer during conversion
1.5892 + * @test Req. under test REQ172.11
1.5893 + */
1.5894 +TVerdict CTest_MMF_ACOD_U_0103::DoTestStepL()
1.5895 + {
1.5896 + const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16};
1.5897 + TBool testOK = EFalse;
1.5898 + INFO_PRINTF1(_L(">> The PCMU8 to PCM16 codec doesn't currently store data between calls to ProcessL"));
1.5899 +
1.5900 + TRAPD(err, testOK = TestRepositionL(codecUid, KPCMU8ToPCM16OptimumSrc, KPCMU8ToPCM16OptimumDst+30));
1.5901 +
1.5902 + if (err)
1.5903 + {
1.5904 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5905 + return EFail;
1.5906 + }
1.5907 + else if (!testOK)
1.5908 + {
1.5909 + INFO_PRINTF1(_L("Test failed"));
1.5910 + return EFail;
1.5911 + }
1.5912 + else
1.5913 + return EPass;
1.5914 + }
1.5915 +
1.5916 +//------------------------------------------------------------------
1.5917 +
1.5918 +
1.5919 +/** @xxxx
1.5920 + * Constructor
1.5921 + */
1.5922 +CTest_MMF_ACOD_U_0104::CTest_MMF_ACOD_U_0104()
1.5923 + {
1.5924 + // store the name of this test case
1.5925 + // this is the name that is used by the script file
1.5926 + // Each test step initialises it's own name
1.5927 + iTestStepName = _L("MM-MMF-ACOD-U-0104-HP");
1.5928 + }
1.5929 +
1.5930 +/** @xxxx
1.5931 + * MULAW To PCM16 Instantiate codec by FourCC Codes
1.5932 + * @test Req. under test REQ172.6.2, REQ172.11.13
1.5933 + */
1.5934 +TVerdict CTest_MMF_ACOD_U_0104::DoTestStepL()
1.5935 + {
1.5936 + TBool testOK = EFalse;
1.5937 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodeMuLAW, KMMFFourCCCodePCM16));
1.5938 +
1.5939 + if (err)
1.5940 + {
1.5941 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5942 + return EFail;
1.5943 + }
1.5944 + else if (!testOK)
1.5945 + {
1.5946 + INFO_PRINTF1(_L("Test failed"));
1.5947 + return EFail;
1.5948 + }
1.5949 + else
1.5950 + return EPass;
1.5951 + }
1.5952 +
1.5953 +//------------------------------------------------------------------
1.5954 +
1.5955 +/** @xxxx
1.5956 + * Constructor
1.5957 + */
1.5958 +CTest_MMF_ACOD_U_0105::CTest_MMF_ACOD_U_0105()
1.5959 + {
1.5960 + // store the name of this test case
1.5961 + // this is the name that is used by the script file
1.5962 + // Each test step initialises it's own name
1.5963 + iTestStepName = _L("MM-MMF-ACOD-U-0105-HP");
1.5964 + }
1.5965 +
1.5966 +/** @xxxx
1.5967 + * MULAW To PCM16 Instantiate codec by UID
1.5968 + * @test Req. under test REQ172.6.1, REQ172.11.13
1.5969 + */
1.5970 +TVerdict CTest_MMF_ACOD_U_0105::DoTestStepL()
1.5971 + {
1.5972 + const TUid codecUid = {KMmfUidCodecMulawToPCM16};
1.5973 + TBool testOK = EFalse;
1.5974 + TRAPD(err, testOK = TestNewL(codecUid));
1.5975 +
1.5976 + if (err)
1.5977 + {
1.5978 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.5979 + return EFail;
1.5980 + }
1.5981 + else if (!testOK)
1.5982 + {
1.5983 + INFO_PRINTF1(_L("Test failed"));
1.5984 + return EFail;
1.5985 + }
1.5986 + else
1.5987 + return EPass;
1.5988 + }
1.5989 +
1.5990 +//------------------------------------------------------------------
1.5991 +
1.5992 +/** @xxxx
1.5993 + * Constructor
1.5994 + */
1.5995 +CTest_MMF_ACOD_U_0106::CTest_MMF_ACOD_U_0106()
1.5996 + {
1.5997 + // store the name of this test case
1.5998 + // this is the name that is used by the script file
1.5999 + // Each test step initialises it's own name
1.6000 + iTestStepName = _L("MM-MMF-ACOD-U-0106-HP");
1.6001 +
1.6002 + for (TUint i=0; i<5; i++)
1.6003 + {
1.6004 + iExpectedSrcBytesProcessed[i] = 50;
1.6005 + iExpectedDstBytesAdded[i] = 100;
1.6006 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.6007 + }
1.6008 + }
1.6009 +
1.6010 +/** @xxxx
1.6011 + * MULAW To PCM16 Pass in small source buffers
1.6012 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6013 + */
1.6014 +TVerdict CTest_MMF_ACOD_U_0106::DoTestStepL()
1.6015 + {
1.6016 + const TUid codecUid = {KMmfUidCodecMulawToPCM16};
1.6017 + TBool testOK = EFalse;
1.6018 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KMulawToPCM16OptimumDst));
1.6019 +
1.6020 + if (err)
1.6021 + {
1.6022 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6023 + return EFail;
1.6024 + }
1.6025 + else if (!testOK)
1.6026 + {
1.6027 + INFO_PRINTF1(_L("Test failed"));
1.6028 + return EFail;
1.6029 + }
1.6030 + else
1.6031 + return EPass;
1.6032 + }
1.6033 +
1.6034 +//------------------------------------------------------------------
1.6035 +
1.6036 +/** @xxxx
1.6037 + * Constructor
1.6038 + */
1.6039 +CTest_MMF_ACOD_U_0107::CTest_MMF_ACOD_U_0107()
1.6040 + {
1.6041 + // store the name of this test case
1.6042 + // this is the name that is used by the script file
1.6043 + // Each test step initialises it's own name
1.6044 + iTestStepName = _L("MM-MMF-ACOD-U-0107-HP");
1.6045 +
1.6046 + for (TUint i=0; i<5; i++)
1.6047 + {
1.6048 + iExpectedSrcBytesProcessed[i] = 25;
1.6049 + iExpectedDstBytesAdded[i] = 50;
1.6050 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6051 + }
1.6052 + }
1.6053 +
1.6054 +/** @xxxx
1.6055 + * MULAW To PCM16 Pass in small dest buffers
1.6056 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6057 + */
1.6058 +TVerdict CTest_MMF_ACOD_U_0107::DoTestStepL()
1.6059 + {
1.6060 + const TUid codecUid = {KMmfUidCodecMulawToPCM16};
1.6061 + TBool testOK = EFalse;
1.6062 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMulawToPCM16OptimumSrc, KSmallBufferSize));
1.6063 +
1.6064 + if (err)
1.6065 + {
1.6066 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6067 + return EFail;
1.6068 + }
1.6069 + else if (!testOK)
1.6070 + {
1.6071 + INFO_PRINTF1(_L("Test failed"));
1.6072 + return EFail;
1.6073 + }
1.6074 + else
1.6075 + return EPass;
1.6076 + }
1.6077 +
1.6078 +//------------------------------------------------------------------
1.6079 +
1.6080 +/** @xxxx
1.6081 + * Constructor
1.6082 + */
1.6083 +CTest_MMF_ACOD_U_0108::CTest_MMF_ACOD_U_0108()
1.6084 + {
1.6085 + // store the name of this test case
1.6086 + // this is the name that is used by the script file
1.6087 + // Each test step initialises it's own name
1.6088 + iTestStepName = _L("MM-MMF-ACOD-U-0108-HP");
1.6089 + iHeapSize = 0x20000;
1.6090 + for (TUint i=0; i<5; i++)
1.6091 + {
1.6092 + iExpectedSrcBytesProcessed[i] = 5000;
1.6093 + iExpectedDstBytesAdded[i] = 10000;
1.6094 +
1.6095 + if((i%2)==0)//even i
1.6096 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6097 + else //odd i
1.6098 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.6099 + }
1.6100 + }
1.6101 +
1.6102 +/** @xxxx
1.6103 + * MULAW To PCM16 Pass in large buffers
1.6104 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6105 + */
1.6106 +TVerdict CTest_MMF_ACOD_U_0108::DoTestStepL()
1.6107 + {
1.6108 + const TUid codecUid = {KMmfUidCodecMulawToPCM16};
1.6109 + TBool testOK = EFalse;
1.6110 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize));
1.6111 +
1.6112 + if (err)
1.6113 + {
1.6114 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6115 + return EFail;
1.6116 + }
1.6117 + else if (!testOK)
1.6118 + {
1.6119 + INFO_PRINTF1(_L("Test failed"));
1.6120 + return EFail;
1.6121 + }
1.6122 + else
1.6123 + return EPass;
1.6124 + }
1.6125 +
1.6126 +//------------------------------------------------------------------
1.6127 +
1.6128 +/** @xxxx
1.6129 + * Constructor
1.6130 + */
1.6131 +CTest_MMF_ACOD_U_0109::CTest_MMF_ACOD_U_0109()
1.6132 + {
1.6133 + // store the name of this test case
1.6134 + // this is the name that is used by the script file
1.6135 + // Each test step initialises it's own name
1.6136 + iTestStepName = _L("MM-MMF-ACOD-U-0109-HP");
1.6137 +
1.6138 + for (TUint i=0; i<5; i++)
1.6139 + {
1.6140 + iExpectedSrcBytesProcessed[i] = 0x800;
1.6141 + iExpectedDstBytesAdded[i] = 0x1000;
1.6142 +
1.6143 + if((i%2)==0)//even i
1.6144 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6145 + else //odd i
1.6146 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.6147 + }
1.6148 + }
1.6149 +
1.6150 +/** @xxxx
1.6151 + * MULAW To PCM16 Pass in default sized buffers
1.6152 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6153 + */
1.6154 +TVerdict CTest_MMF_ACOD_U_0109::DoTestStepL()
1.6155 + {
1.6156 + const TUid codecUid = {KMmfUidCodecMulawToPCM16};
1.6157 + TBool testOK = EFalse;
1.6158 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize));
1.6159 +
1.6160 + if (err)
1.6161 + {
1.6162 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6163 + return EFail;
1.6164 + }
1.6165 + else if (!testOK)
1.6166 + {
1.6167 + INFO_PRINTF1(_L("Test failed"));
1.6168 + return EFail;
1.6169 + }
1.6170 + else
1.6171 + return EPass;
1.6172 + }
1.6173 +
1.6174 +//------------------------------------------------------------------
1.6175 +
1.6176 +/** @xxxx
1.6177 + * Constructor
1.6178 + */
1.6179 +CTest_MMF_ACOD_U_0110::CTest_MMF_ACOD_U_0110()
1.6180 + {
1.6181 + // store the name of this test case
1.6182 + // this is the name that is used by the script file
1.6183 + // Each test step initialises it's own name
1.6184 + iTestStepName = _L("MM-MMF-ACOD-U-0110-HP");
1.6185 +
1.6186 + for (TUint i=0; i<5; i++)
1.6187 + {
1.6188 + iExpectedSrcBytesProcessed[i] = 0x800;
1.6189 + iExpectedDstBytesAdded[i] = 0x1000;
1.6190 +
1.6191 + if((i%2)==0)//even i
1.6192 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6193 + else //odd i
1.6194 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.6195 + }
1.6196 + }
1.6197 +
1.6198 +/** @xxxx
1.6199 + * MULAW To PCM16 Pass in buffers with different max length and length
1.6200 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6201 + */
1.6202 +TVerdict CTest_MMF_ACOD_U_0110::DoTestStepL()
1.6203 + {
1.6204 + const TUid codecUid = {KMmfUidCodecMulawToPCM16};
1.6205 + TBool testOK = EFalse;
1.6206 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize));
1.6207 +
1.6208 + if (err)
1.6209 + {
1.6210 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6211 + return EFail;
1.6212 + }
1.6213 + else if (!testOK)
1.6214 + {
1.6215 + INFO_PRINTF1(_L("Test failed"));
1.6216 + return EFail;
1.6217 + }
1.6218 + else
1.6219 + return EPass;
1.6220 + }
1.6221 +
1.6222 +//------------------------------------------------------------------
1.6223 +
1.6224 +/** @xxxx
1.6225 + * Constructor
1.6226 + */
1.6227 +CTest_MMF_ACOD_U_0111::CTest_MMF_ACOD_U_0111()
1.6228 + {
1.6229 + // store the name of this test case
1.6230 + // this is the name that is used by the script file
1.6231 + // Each test step initialises it's own name
1.6232 + iTestStepName = _L("MM-MMF-ACOD-U-0111-HP");
1.6233 +
1.6234 + for (TUint i=0; i<5; i++)
1.6235 + {
1.6236 + iExpectedSrcBytesProcessed[i] = 0x800;
1.6237 + iExpectedDstBytesAdded[i] = 0x1000;
1.6238 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.6239 + }
1.6240 + }
1.6241 +
1.6242 +/** @xxxx
1.6243 + * MULAW To PCM16 Pass in buffers of optimum size
1.6244 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6245 + */
1.6246 +TVerdict CTest_MMF_ACOD_U_0111::DoTestStepL()
1.6247 + {
1.6248 + const TUid codecUid = {KMmfUidCodecMulawToPCM16};
1.6249 + TBool testOK = EFalse;
1.6250 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMulawToPCM16OptimumSrc, KMulawToPCM16OptimumDst));
1.6251 +
1.6252 + if (err)
1.6253 + {
1.6254 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6255 + return EFail;
1.6256 + }
1.6257 + else if (!testOK)
1.6258 + {
1.6259 + INFO_PRINTF1(_L("Test failed"));
1.6260 + return EFail;
1.6261 + }
1.6262 + else
1.6263 + return EPass;
1.6264 + }
1.6265 +
1.6266 +//------------------------------------------------------------------
1.6267 +
1.6268 +/** @xxxx
1.6269 + * Constructor
1.6270 + */
1.6271 +CTest_MMF_ACOD_U_0112::CTest_MMF_ACOD_U_0112()
1.6272 + {
1.6273 + // store the name of this test case
1.6274 + // this is the name that is used by the script file
1.6275 + // Each test step initialises it's own name
1.6276 + iTestStepName = _L("MM-MMF-ACOD-U-0112-HP");
1.6277 + }
1.6278 +
1.6279 +/** @xxxx
1.6280 + * MULAW To PCM16 Reposition source pointer during conversion
1.6281 + * @test Req. under test REQ172.11
1.6282 + */
1.6283 +TVerdict CTest_MMF_ACOD_U_0112::DoTestStepL()
1.6284 + {
1.6285 + const TUid codecUid = {KMmfUidCodecMulawToPCM16};
1.6286 + TBool testOK = EFalse;
1.6287 + INFO_PRINTF1(_L(">> The MULAW To PCM16 codec doesn't currently store data between calls to ProcessL"));
1.6288 +
1.6289 + TRAPD(err, testOK = TestRepositionL(codecUid, KMulawToPCM16OptimumSrc, KMulawToPCM16OptimumDst+30));
1.6290 +
1.6291 + if (err)
1.6292 + {
1.6293 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6294 + return EFail;
1.6295 + }
1.6296 + else if (!testOK)
1.6297 + {
1.6298 + INFO_PRINTF1(_L("Test failed"));
1.6299 + return EFail;
1.6300 + }
1.6301 + else
1.6302 + return EPass;
1.6303 + }
1.6304 +
1.6305 +//------------------------------------------------------------------
1.6306 +
1.6307 +/** @xxxx
1.6308 + * Constructor
1.6309 + */
1.6310 +CTest_MMF_ACOD_U_0113::CTest_MMF_ACOD_U_0113()
1.6311 + {
1.6312 + // store the name of this test case
1.6313 + // this is the name that is used by the script file
1.6314 + // Each test step initialises it's own name
1.6315 + iTestStepName = _L("MM-MMF-ACOD-U-0113-HP");
1.6316 + }
1.6317 +
1.6318 +/** @xxxx
1.6319 + * PCM16 To MULAW Instantiate codec by FourCC Codes
1.6320 + * @test Req. under test REQ172.6.2, REQ172.11.15
1.6321 + */
1.6322 +TVerdict CTest_MMF_ACOD_U_0113::DoTestStepL()
1.6323 + {
1.6324 + TBool testOK = EFalse;
1.6325 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodeMuLAW));
1.6326 +
1.6327 + if (err)
1.6328 + {
1.6329 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6330 + return EFail;
1.6331 + }
1.6332 + else if (!testOK)
1.6333 + {
1.6334 + INFO_PRINTF1(_L("Test failed"));
1.6335 + return EFail;
1.6336 + }
1.6337 + else
1.6338 + return EPass;
1.6339 + }
1.6340 +
1.6341 +//------------------------------------------------------------------
1.6342 +
1.6343 +/** @xxxx
1.6344 + * Constructor
1.6345 + */
1.6346 +CTest_MMF_ACOD_U_0114::CTest_MMF_ACOD_U_0114()
1.6347 + {
1.6348 + // store the name of this test case
1.6349 + // this is the name that is used by the script file
1.6350 + // Each test step initialises it's own name
1.6351 + iTestStepName = _L("MM-MMF-ACOD-U-0114-HP");
1.6352 + }
1.6353 +
1.6354 +/** @xxxx
1.6355 + * PCM16 To MULAW Instantiate codec by UID
1.6356 + * @test Req. under test REQ172.6.1, REQ172.11.15
1.6357 + */
1.6358 +TVerdict CTest_MMF_ACOD_U_0114::DoTestStepL()
1.6359 + {
1.6360 + const TUid codecUid = {KMmfUidCodecPCM16ToMulaw};
1.6361 + TBool testOK = EFalse;
1.6362 + TRAPD(err, testOK = TestNewL(codecUid));
1.6363 +
1.6364 + if (err)
1.6365 + {
1.6366 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6367 + return EFail;
1.6368 + }
1.6369 + else if (!testOK)
1.6370 + {
1.6371 + INFO_PRINTF1(_L("Test failed"));
1.6372 + return EFail;
1.6373 + }
1.6374 + else
1.6375 + return EPass;
1.6376 + }
1.6377 +
1.6378 +//------------------------------------------------------------------
1.6379 +
1.6380 +/** @xxxx
1.6381 + * Constructor
1.6382 + */
1.6383 +CTest_MMF_ACOD_U_0115::CTest_MMF_ACOD_U_0115()
1.6384 + {
1.6385 + // store the name of this test case
1.6386 + // this is the name that is used by the script file
1.6387 + // Each test step initialises it's own name
1.6388 + iTestStepName = _L("MM-MMF-ACOD-U-0115-HP");
1.6389 +
1.6390 + for (TUint i=0; i<5; i++)
1.6391 + {
1.6392 + iExpectedSrcBytesProcessed[i] = 50;
1.6393 + iExpectedDstBytesAdded[i] = 25;
1.6394 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.6395 + }
1.6396 + }
1.6397 +
1.6398 +/** @xxxx
1.6399 + * PCM16 To MULAW Pass in small source buffers
1.6400 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6401 + */
1.6402 +TVerdict CTest_MMF_ACOD_U_0115::DoTestStepL()
1.6403 + {
1.6404 + const TUid codecUid = {KMmfUidCodecPCM16ToMulaw};
1.6405 + TBool testOK = EFalse;
1.6406 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToMulawOptimumDst));
1.6407 +
1.6408 + if (err)
1.6409 + {
1.6410 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6411 + return EFail;
1.6412 + }
1.6413 + else if (!testOK)
1.6414 + {
1.6415 + INFO_PRINTF1(_L("Test failed"));
1.6416 + return EFail;
1.6417 + }
1.6418 + else
1.6419 + return EPass;
1.6420 + }
1.6421 +
1.6422 +//------------------------------------------------------------------
1.6423 +
1.6424 +/** @xxxx
1.6425 + * Constructor
1.6426 + */
1.6427 +CTest_MMF_ACOD_U_0116::CTest_MMF_ACOD_U_0116()
1.6428 + {
1.6429 + // store the name of this test case
1.6430 + // this is the name that is used by the script file
1.6431 + // Each test step initialises it's own name
1.6432 + iTestStepName = _L("MM-MMF-ACOD-U-0116-HP");
1.6433 +
1.6434 + for (TUint i=0; i<5; i++)
1.6435 + {
1.6436 + iExpectedSrcBytesProcessed[i] = 100;
1.6437 + iExpectedDstBytesAdded[i] = 50;
1.6438 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6439 + }
1.6440 + }
1.6441 +
1.6442 +/** @xxxx
1.6443 + * PCM16 To MULAW Pass in small dest buffers
1.6444 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6445 + */
1.6446 +TVerdict CTest_MMF_ACOD_U_0116::DoTestStepL()
1.6447 + {
1.6448 + const TUid codecUid = {KMmfUidCodecPCM16ToMulaw};
1.6449 + TBool testOK = EFalse;
1.6450 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToMulawOptimumSrc, KSmallBufferSize));
1.6451 +
1.6452 + if (err)
1.6453 + {
1.6454 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6455 + return EFail;
1.6456 + }
1.6457 + else if (!testOK)
1.6458 + {
1.6459 + INFO_PRINTF1(_L("Test failed"));
1.6460 + return EFail;
1.6461 + }
1.6462 + else
1.6463 + return EPass;
1.6464 + }
1.6465 +
1.6466 +//------------------------------------------------------------------
1.6467 +
1.6468 +/** @xxxx
1.6469 + * Constructor
1.6470 + */
1.6471 +CTest_MMF_ACOD_U_0117::CTest_MMF_ACOD_U_0117()
1.6472 + {
1.6473 + // store the name of this test case
1.6474 + // this is the name that is used by the script file
1.6475 + // Each test step initialises it's own name
1.6476 + iTestStepName = _L("MM-MMF-ACOD-U-0117-HP");
1.6477 + iHeapSize = 0x20000;
1.6478 +
1.6479 + for (TUint i=0; i<5; i++)
1.6480 + {
1.6481 + iExpectedSrcBytesProcessed[i] = 10000;
1.6482 + iExpectedDstBytesAdded[i] = 5000;
1.6483 +
1.6484 + if((i%2)==0)//even i
1.6485 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.6486 + else //odd i
1.6487 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.6488 + }
1.6489 + }
1.6490 +
1.6491 +/** @xxxx
1.6492 + * PCM16 To MULAW Pass in large buffers
1.6493 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6494 + */
1.6495 +TVerdict CTest_MMF_ACOD_U_0117::DoTestStepL()
1.6496 + {
1.6497 + const TUid codecUid = {KMmfUidCodecPCM16ToMulaw};
1.6498 + TBool testOK = EFalse;
1.6499 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize));
1.6500 +
1.6501 + if (err)
1.6502 + {
1.6503 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6504 + return EFail;
1.6505 + }
1.6506 + else if (!testOK)
1.6507 + {
1.6508 + INFO_PRINTF1(_L("Test failed"));
1.6509 + return EFail;
1.6510 + }
1.6511 + else
1.6512 + return EPass;
1.6513 + }
1.6514 +
1.6515 +//------------------------------------------------------------------
1.6516 +
1.6517 +/** @xxxx
1.6518 + * Constructor
1.6519 + */
1.6520 +CTest_MMF_ACOD_U_0118::CTest_MMF_ACOD_U_0118()
1.6521 + {
1.6522 + // store the name of this test case
1.6523 + // this is the name that is used by the script file
1.6524 + // Each test step initialises it's own name
1.6525 + iTestStepName = _L("MM-MMF-ACOD-U-0118-HP");
1.6526 +
1.6527 + for (TUint i=0; i<5; i++)
1.6528 + {
1.6529 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.6530 + iExpectedDstBytesAdded[i] = 0x800;
1.6531 +
1.6532 + if((i%2)==0)//even i
1.6533 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.6534 + else //odd i
1.6535 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.6536 + }
1.6537 + }
1.6538 +
1.6539 +/** @xxxx
1.6540 + * PCM16 To MULAW Pass in default sized buffers
1.6541 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6542 + */
1.6543 +TVerdict CTest_MMF_ACOD_U_0118::DoTestStepL()
1.6544 + {
1.6545 + const TUid codecUid = {KMmfUidCodecPCM16ToMulaw};
1.6546 + TBool testOK = EFalse;
1.6547 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize));
1.6548 +
1.6549 + if (err)
1.6550 + {
1.6551 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6552 + return EFail;
1.6553 + }
1.6554 + else if (!testOK)
1.6555 + {
1.6556 + INFO_PRINTF1(_L("Test failed"));
1.6557 + return EFail;
1.6558 + }
1.6559 + else
1.6560 + return EPass;
1.6561 + }
1.6562 +
1.6563 +//------------------------------------------------------------------
1.6564 +
1.6565 +/** @xxxx
1.6566 + * Constructor
1.6567 + */
1.6568 +CTest_MMF_ACOD_U_0119::CTest_MMF_ACOD_U_0119()
1.6569 + {
1.6570 + // store the name of this test case
1.6571 + // this is the name that is used by the script file
1.6572 + // Each test step initialises it's own name
1.6573 + iTestStepName = _L("MM-MMF-ACOD-U-0119-HP");
1.6574 +
1.6575 + for (TUint i=0; i<5; i++)
1.6576 + {
1.6577 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.6578 + iExpectedDstBytesAdded[i] = 0x800;
1.6579 +
1.6580 + if((i%2)==0)//even i
1.6581 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.6582 + else //odd i
1.6583 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.6584 + }
1.6585 + }
1.6586 +
1.6587 +/** @xxxx
1.6588 + * PCM16 To MULAW Pass in buffers with different max length and length
1.6589 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6590 + */
1.6591 +TVerdict CTest_MMF_ACOD_U_0119::DoTestStepL()
1.6592 + {
1.6593 + const TUid codecUid = {KMmfUidCodecPCM16ToMulaw};
1.6594 + TBool testOK = EFalse;
1.6595 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize));
1.6596 +
1.6597 + if (err)
1.6598 + {
1.6599 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6600 + return EFail;
1.6601 + }
1.6602 + else if (!testOK)
1.6603 + {
1.6604 + INFO_PRINTF1(_L("Test failed"));
1.6605 + return EFail;
1.6606 + }
1.6607 + else
1.6608 + return EPass;
1.6609 + }
1.6610 +
1.6611 +//------------------------------------------------------------------
1.6612 +
1.6613 +/** @xxxx
1.6614 + * Constructor
1.6615 + */
1.6616 +CTest_MMF_ACOD_U_0120::CTest_MMF_ACOD_U_0120()
1.6617 + {
1.6618 + // store the name of this test case
1.6619 + // this is the name that is used by the script file
1.6620 + // Each test step initialises it's own name
1.6621 + iTestStepName = _L("MM-MMF-ACOD-U-0120-HP");
1.6622 +
1.6623 + for (TUint i=0; i<5; i++)
1.6624 + {
1.6625 + iExpectedSrcBytesProcessed[i] = 0x1000;
1.6626 + iExpectedDstBytesAdded[i] = 0x800;
1.6627 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.6628 + }
1.6629 + }
1.6630 +
1.6631 +/** @xxxx
1.6632 + * PCM16 To MULAW Pass in buffers of optimum size
1.6633 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6634 + */
1.6635 +TVerdict CTest_MMF_ACOD_U_0120::DoTestStepL()
1.6636 + {
1.6637 + const TUid codecUid = {KMmfUidCodecPCM16ToMulaw};
1.6638 + TBool testOK = EFalse;
1.6639 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToMulawOptimumSrc, KPCM16ToMulawOptimumDst));
1.6640 +
1.6641 + if (err)
1.6642 + {
1.6643 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6644 + return EFail;
1.6645 + }
1.6646 + else if (!testOK)
1.6647 + {
1.6648 + INFO_PRINTF1(_L("Test failed"));
1.6649 + return EFail;
1.6650 + }
1.6651 + else
1.6652 + return EPass;
1.6653 + }
1.6654 +
1.6655 +//------------------------------------------------------------------
1.6656 +
1.6657 +/** @xxxx
1.6658 + * Constructor
1.6659 + */
1.6660 +CTest_MMF_ACOD_U_0121::CTest_MMF_ACOD_U_0121()
1.6661 + {
1.6662 + // store the name of this test case
1.6663 + // this is the name that is used by the script file
1.6664 + // Each test step initialises it's own name
1.6665 + iTestStepName = _L("MM-MMF-ACOD-U-0121-HP");
1.6666 + }
1.6667 +
1.6668 +/** @xxxx
1.6669 + * PCM16 To MULAW Reposition source pointer during conversion
1.6670 + * @test Req. under test REQ172.11
1.6671 + */
1.6672 +TVerdict CTest_MMF_ACOD_U_0121::DoTestStepL()
1.6673 + {
1.6674 + const TUid codecUid = {KMmfUidCodecPCM16ToMulaw};
1.6675 + TBool testOK = EFalse;
1.6676 +
1.6677 + INFO_PRINTF1(_L(">> The PCM16 to MULAW codec doesn't currently store data between calls to ProcessL"));
1.6678 + TRAPD(err, testOK = TestRepositionL(codecUid, KDefaultBufferSize, KDefaultBufferSize+30));
1.6679 +
1.6680 + if (err)
1.6681 + {
1.6682 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6683 + return EFail;
1.6684 + }
1.6685 + else if (!testOK)
1.6686 + {
1.6687 + INFO_PRINTF1(_L("Test failed"));
1.6688 + return EFail;
1.6689 + }
1.6690 + else
1.6691 + return EPass;
1.6692 + }
1.6693 +
1.6694 +//------------------------------------------------------------------
1.6695 +
1.6696 +/** @xxxx
1.6697 + * Constructor
1.6698 + */
1.6699 +CTest_MMF_ACOD_U_0122::CTest_MMF_ACOD_U_0122()
1.6700 + {
1.6701 + // store the name of this test case
1.6702 + // this is the name that is used by the script file
1.6703 + // Each test step initialises it's own name
1.6704 + iTestStepName = _L("MM-MMF-ACOD-U-0122-HP");
1.6705 + }
1.6706 +
1.6707 +/** @xxxx
1.6708 + * IMAD to PCM16 Instantiate codec by FourCC Codes
1.6709 + * @test Req. under test REQ172.6.2, REQ172.11.12
1.6710 + */
1.6711 +TVerdict CTest_MMF_ACOD_U_0122::DoTestStepL()
1.6712 + {
1.6713 + TBool testOK = EFalse;
1.6714 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodeIMAD, KMMFFourCCCodePCM16));
1.6715 +
1.6716 + if (err)
1.6717 + {
1.6718 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6719 + return EFail;
1.6720 + }
1.6721 + else if (!testOK)
1.6722 + {
1.6723 + INFO_PRINTF1(_L("Test failed"));
1.6724 + return EFail;
1.6725 + }
1.6726 + else
1.6727 + return EPass;
1.6728 + }
1.6729 +
1.6730 +//------------------------------------------------------------------
1.6731 +
1.6732 +/** @xxxx
1.6733 + * Constructor
1.6734 + */
1.6735 +CTest_MMF_ACOD_U_0123::CTest_MMF_ACOD_U_0123()
1.6736 + {
1.6737 + // store the name of this test case
1.6738 + // this is the name that is used by the script file
1.6739 + // Each test step initialises it's own name
1.6740 + iTestStepName = _L("MM-MMF-ACOD-U-0123-HP");
1.6741 + }
1.6742 +
1.6743 +/** @xxxx
1.6744 + * IMAD to PCM16 Instantiate codec by UID
1.6745 + * @test Req. under test REQ172.6.1, REQ172.11.12
1.6746 + */
1.6747 +TVerdict CTest_MMF_ACOD_U_0123::DoTestStepL()
1.6748 + {
1.6749 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16};
1.6750 + TBool testOK = EFalse;
1.6751 + TRAPD(err, testOK = TestNewL(codecUid));
1.6752 +
1.6753 + if (err)
1.6754 + {
1.6755 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6756 + return EFail;
1.6757 + }
1.6758 + else if (!testOK)
1.6759 + {
1.6760 + INFO_PRINTF1(_L("Test failed"));
1.6761 + return EFail;
1.6762 + }
1.6763 + else
1.6764 + return EPass;
1.6765 + }
1.6766 +
1.6767 +//------------------------------------------------------------------
1.6768 +
1.6769 +/** @xxxx
1.6770 + * Constructor
1.6771 + */
1.6772 +CTest_MMF_ACOD_U_0124::CTest_MMF_ACOD_U_0124()
1.6773 + {
1.6774 + // store the name of this test case
1.6775 + // this is the name that is used by the script file
1.6776 + // Each test step initialises it's own name
1.6777 + iTestStepName = _L("MM-MMF-ACOD-U-0124-HP");
1.6778 +
1.6779 + for (TUint i=0; i<5; i++)
1.6780 + {
1.6781 + iExpectedSrcBytesProcessed[i] = 50;
1.6782 + iExpectedDstBytesAdded[i] = 0;
1.6783 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.6784 + }
1.6785 + }
1.6786 +
1.6787 +/** @xxxx
1.6788 + * IMAD to PCM16 Pass in small source buffers
1.6789 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6790 + */
1.6791 +TVerdict CTest_MMF_ACOD_U_0124::DoTestStepL()
1.6792 + {
1.6793 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16};
1.6794 + TBool testOK = EFalse;
1.6795 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KAdpcmToPCM16OptimumDst));
1.6796 +
1.6797 + if (err)
1.6798 + {
1.6799 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6800 + return EFail;
1.6801 + }
1.6802 + else if (!testOK)
1.6803 + {
1.6804 + INFO_PRINTF1(_L("Test failed"));
1.6805 + return EFail;
1.6806 + }
1.6807 + else
1.6808 + return EPass;
1.6809 + }
1.6810 +
1.6811 +//------------------------------------------------------------------
1.6812 +
1.6813 +/** @xxxx
1.6814 + * Constructor
1.6815 + */
1.6816 +CTest_MMF_ACOD_U_0125::CTest_MMF_ACOD_U_0125()
1.6817 + {
1.6818 + // store the name of this test case
1.6819 + // this is the name that is used by the script file
1.6820 + // Each test step initialises it's own name
1.6821 + iTestStepName = _L("MM-MMF-ACOD-U-0125-HP");
1.6822 +
1.6823 + iExpectedLeaveErrorCode = KErrArgument;
1.6824 + }
1.6825 +
1.6826 +/** @xxxx
1.6827 + * IMAD to PCM16 Pass in small dest buffers
1.6828 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6829 + */
1.6830 +TVerdict CTest_MMF_ACOD_U_0125::DoTestStepL()
1.6831 + {
1.6832 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16};
1.6833 + TBool testOK = EFalse;
1.6834 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KAdpcmToPCM16OptimumSrc, KSmallBufferSize));
1.6835 +
1.6836 + if (err)
1.6837 + {
1.6838 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6839 + return EFail;
1.6840 + }
1.6841 + else if (!testOK)
1.6842 + {
1.6843 + INFO_PRINTF1(_L("Test failed"));
1.6844 + return EFail;
1.6845 + }
1.6846 + else
1.6847 + return EPass;
1.6848 + }
1.6849 +
1.6850 +//------------------------------------------------------------------
1.6851 +
1.6852 +/** @xxxx
1.6853 + * Constructor
1.6854 + */
1.6855 +CTest_MMF_ACOD_U_0126::CTest_MMF_ACOD_U_0126()
1.6856 + {
1.6857 + // store the name of this test case
1.6858 + // this is the name that is used by the script file
1.6859 + // Each test step initialises it's own name
1.6860 + iTestStepName = _L("MM-MMF-ACOD-U-0126-HP");
1.6861 + iHeapSize = 0x20000;
1.6862 +
1.6863 + for (TUint i=0; i<5; i++)
1.6864 + {
1.6865 + if(i<4)
1.6866 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6867 + else
1.6868 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.6869 + }
1.6870 + }
1.6871 +
1.6872 +/** @xxxx
1.6873 + * IMAD to PCM16 Pass in large buffers
1.6874 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6875 + */
1.6876 +TVerdict CTest_MMF_ACOD_U_0126::DoTestStepL()
1.6877 + {
1.6878 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16};
1.6879 + TBool testOK = EFalse;
1.6880 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize, 0, EFalse));
1.6881 +
1.6882 + if (err)
1.6883 + {
1.6884 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6885 + return EFail;
1.6886 + }
1.6887 + else if (!testOK)
1.6888 + {
1.6889 + INFO_PRINTF1(_L("Test failed"));
1.6890 + return EFail;
1.6891 + }
1.6892 + else
1.6893 + return EPass;
1.6894 + }
1.6895 +
1.6896 +//------------------------------------------------------------------
1.6897 +
1.6898 +/** @xxxx
1.6899 + * Constructor
1.6900 + */
1.6901 +CTest_MMF_ACOD_U_0127::CTest_MMF_ACOD_U_0127()
1.6902 + {
1.6903 + // store the name of this test case
1.6904 + // this is the name that is used by the script file
1.6905 + // Each test step initialises it's own name
1.6906 + iTestStepName = _L("MM-MMF-ACOD-U-0127-HP");
1.6907 +
1.6908 + iExpectedReturnValue[0].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6909 + iExpectedReturnValue[1].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6910 + iExpectedReturnValue[2].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6911 + iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessComplete;
1.6912 + iExpectedReturnValue[4].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6913 + }
1.6914 +
1.6915 +/** @xxxx
1.6916 + * IMAD to PCM16 Pass in default sized buffers
1.6917 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6918 + */
1.6919 +TVerdict CTest_MMF_ACOD_U_0127::DoTestStepL()
1.6920 + {
1.6921 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16};
1.6922 + TBool testOK = EFalse;
1.6923 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize, 0, EFalse));
1.6924 +
1.6925 + if (err)
1.6926 + {
1.6927 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6928 + return EFail;
1.6929 + }
1.6930 + else if (!testOK)
1.6931 + {
1.6932 + INFO_PRINTF1(_L("Test failed"));
1.6933 + return EFail;
1.6934 + }
1.6935 + else
1.6936 + return EPass;
1.6937 + }
1.6938 +
1.6939 +//------------------------------------------------------------------
1.6940 +
1.6941 +/** @xxxx
1.6942 + * Constructor
1.6943 + */
1.6944 +CTest_MMF_ACOD_U_0128::CTest_MMF_ACOD_U_0128()
1.6945 + {
1.6946 + // store the name of this test case
1.6947 + // this is the name that is used by the script file
1.6948 + // Each test step initialises it's own name
1.6949 + iTestStepName = _L("MM-MMF-ACOD-U-0128-HP");
1.6950 +
1.6951 + iExpectedReturnValue[0].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6952 + iExpectedReturnValue[1].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6953 + iExpectedReturnValue[2].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6954 + iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessComplete;
1.6955 + iExpectedReturnValue[4].iStatus = TCodecProcessResult::EProcessIncomplete;
1.6956 + }
1.6957 +
1.6958 +/** @xxxx
1.6959 + * IMAD to PCM16 Pass in buffers with different max length and length
1.6960 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.6961 + */
1.6962 +TVerdict CTest_MMF_ACOD_U_0128::DoTestStepL()
1.6963 + {
1.6964 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16};
1.6965 + TBool testOK = EFalse;
1.6966 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize, EFalse));
1.6967 +
1.6968 + if (err)
1.6969 + {
1.6970 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.6971 + return EFail;
1.6972 + }
1.6973 + else if (!testOK)
1.6974 + {
1.6975 + INFO_PRINTF1(_L("Test failed"));
1.6976 + return EFail;
1.6977 + }
1.6978 + else
1.6979 + return EPass;
1.6980 + }
1.6981 +
1.6982 +//------------------------------------------------------------------
1.6983 +
1.6984 +/** @xxxx
1.6985 + * Constructor
1.6986 + */
1.6987 +CTest_MMF_ACOD_U_0129::CTest_MMF_ACOD_U_0129()
1.6988 + {
1.6989 + // store the name of this test case
1.6990 + // this is the name that is used by the script file
1.6991 + // Each test step initialises it's own name
1.6992 + iTestStepName = _L("MM-MMF-ACOD-U-0129-HP");
1.6993 +
1.6994 + for (TUint i=0; i<5; i++)
1.6995 + {
1.6996 + iExpectedSrcBytesProcessed[i] = 0x400;
1.6997 + iExpectedDstBytesAdded[i] = 0xFC8;
1.6998 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.6999 + }
1.7000 + }
1.7001 +
1.7002 +/** @xxxx
1.7003 + * IMAD to PCM16 Pass in buffers of optimum size
1.7004 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7005 + */
1.7006 +TVerdict CTest_MMF_ACOD_U_0129::DoTestStepL()
1.7007 + {
1.7008 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16};
1.7009 + TBool testOK = EFalse;
1.7010 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KAdpcmToPCM16OptimumSrc, KAdpcmToPCM16OptimumDst));
1.7011 +
1.7012 + if (err)
1.7013 + {
1.7014 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7015 + return EFail;
1.7016 + }
1.7017 + else if (!testOK)
1.7018 + {
1.7019 + INFO_PRINTF1(_L("Test failed"));
1.7020 + return EFail;
1.7021 + }
1.7022 + else
1.7023 + return EPass;
1.7024 + }
1.7025 +
1.7026 +//------------------------------------------------------------------
1.7027 +
1.7028 +/** @xxxx
1.7029 + * Constructor
1.7030 + */
1.7031 +CTest_MMF_ACOD_U_0130::CTest_MMF_ACOD_U_0130()
1.7032 + {
1.7033 + // store the name of this test case
1.7034 + // this is the name that is used by the script file
1.7035 + // Each test step initialises it's own name
1.7036 + iTestStepName = _L("MM-MMF-ACOD-U-0130-HP");
1.7037 + }
1.7038 +
1.7039 +/** @xxxx
1.7040 + * IMAD to PCM16 Reposition source pointer during conversion
1.7041 + * @test Req. under test REQ172.11
1.7042 + */
1.7043 +TVerdict CTest_MMF_ACOD_U_0130::DoTestStepL()
1.7044 + {
1.7045 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16};
1.7046 + TBool testOK = EFalse;
1.7047 +
1.7048 + TUint src = (KAdpcmToPCM16OptimumSrc/4) + 10;
1.7049 +
1.7050 + INFO_PRINTF1(_L(">> The IMAD to PCM16 codec stores data between calls to ProcessL"));
1.7051 + TRAPD(err, testOK = TestRepositionL(codecUid, src, KAdpcmToPCM16OptimumDst));
1.7052 +
1.7053 + if (err)
1.7054 + {
1.7055 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7056 + return EFail;
1.7057 + }
1.7058 + else if (!testOK)
1.7059 + {
1.7060 + INFO_PRINTF1(_L("Test failed"));
1.7061 + return EFail;
1.7062 + }
1.7063 + else
1.7064 + return EPass;
1.7065 + }
1.7066 +
1.7067 +//------------------------------------------------------------------
1.7068 +
1.7069 +/** @xxxx
1.7070 + * Constructor
1.7071 + */
1.7072 +CTest_MMF_ACOD_U_0131::CTest_MMF_ACOD_U_0131()
1.7073 + {
1.7074 + // store the name of this test case
1.7075 + // this is the name that is used by the script file
1.7076 + // Each test step initialises it's own name
1.7077 + iTestStepName = _L("MM-MMF-ACOD-U-0131-HP");
1.7078 + }
1.7079 +
1.7080 +/** @xxxx
1.7081 + * PCM16 to IMAD Instantiate codec by FourCC Codes
1.7082 + * @test Req. under test REQ172.6.2, REQ172.11.14
1.7083 + */
1.7084 +TVerdict CTest_MMF_ACOD_U_0131::DoTestStepL()
1.7085 + {
1.7086 + TBool testOK = EFalse;
1.7087 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodeIMAD));
1.7088 +
1.7089 + if (err)
1.7090 + {
1.7091 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7092 + return EFail;
1.7093 + }
1.7094 + else if (!testOK)
1.7095 + {
1.7096 + INFO_PRINTF1(_L("Test failed"));
1.7097 + return EFail;
1.7098 + }
1.7099 + else
1.7100 + return EPass;
1.7101 + }
1.7102 +
1.7103 +//------------------------------------------------------------------
1.7104 +
1.7105 +/** @xxxx
1.7106 + * Constructor
1.7107 + */
1.7108 +CTest_MMF_ACOD_U_0132::CTest_MMF_ACOD_U_0132()
1.7109 + {
1.7110 + // store the name of this test case
1.7111 + // this is the name that is used by the script file
1.7112 + // Each test step initialises it's own name
1.7113 + iTestStepName = _L("MM-MMF-ACOD-U-0132-HP");
1.7114 + }
1.7115 +
1.7116 +/** @xxxx
1.7117 + * PCM16 to IMAD Instantiate codec by UID
1.7118 + * @test Req. under test REQ172.6.1, REQ172.11.14
1.7119 + */
1.7120 +TVerdict CTest_MMF_ACOD_U_0132::DoTestStepL()
1.7121 + {
1.7122 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM};
1.7123 + TBool testOK = EFalse;
1.7124 + TRAPD(err, testOK = TestNewL(codecUid));
1.7125 +
1.7126 + if (err)
1.7127 + {
1.7128 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7129 + return EFail;
1.7130 + }
1.7131 + else if (!testOK)
1.7132 + {
1.7133 + INFO_PRINTF1(_L("Test failed"));
1.7134 + return EFail;
1.7135 + }
1.7136 + else
1.7137 + return EPass;
1.7138 + }
1.7139 +
1.7140 +//------------------------------------------------------------------
1.7141 +
1.7142 +/** @xxxx
1.7143 + * Constructor
1.7144 + */
1.7145 +CTest_MMF_ACOD_U_0133::CTest_MMF_ACOD_U_0133()
1.7146 + {
1.7147 + // store the name of this test case
1.7148 + // this is the name that is used by the script file
1.7149 + // Each test step initialises it's own name
1.7150 + iTestStepName = _L("MM-MMF-ACOD-U-0133-HP");
1.7151 +
1.7152 + for (TUint i=0; i<5; i++)
1.7153 + {
1.7154 + iExpectedSrcBytesProcessed[i] = 50;
1.7155 + iExpectedDstBytesAdded[i] = 0;
1.7156 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.7157 + }
1.7158 + }
1.7159 +
1.7160 +/** @xxxx
1.7161 + * IMAD to PCM16 Pass in small source buffers
1.7162 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7163 + */
1.7164 +TVerdict CTest_MMF_ACOD_U_0133::DoTestStepL()
1.7165 + {
1.7166 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM};
1.7167 + TBool testOK = EFalse;
1.7168 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToAdpcmOptimumDst));
1.7169 +
1.7170 + if (err)
1.7171 + {
1.7172 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7173 + return EFail;
1.7174 + }
1.7175 + else if (!testOK)
1.7176 + {
1.7177 + INFO_PRINTF1(_L("Test failed"));
1.7178 + return EFail;
1.7179 + }
1.7180 + else
1.7181 + return EPass;
1.7182 + }
1.7183 +
1.7184 +//------------------------------------------------------------------
1.7185 +
1.7186 +/** @xxxx
1.7187 + * Constructor
1.7188 + */
1.7189 +CTest_MMF_ACOD_U_0134::CTest_MMF_ACOD_U_0134()
1.7190 + {
1.7191 + // store the name of this test case
1.7192 + // this is the name that is used by the script file
1.7193 + // Each test step initialises it's own name
1.7194 + iTestStepName = _L("MM-MMF-ACOD-U-0134-HP");
1.7195 +
1.7196 + iExpectedLeaveErrorCode = KErrArgument;
1.7197 + }
1.7198 +
1.7199 +/** @xxxx
1.7200 + * PCM16 to IMAD Pass in small dest buffers
1.7201 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7202 + */
1.7203 +TVerdict CTest_MMF_ACOD_U_0134::DoTestStepL()
1.7204 + {
1.7205 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM};
1.7206 + TBool testOK = EFalse;
1.7207 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToAdpcmOptimumSrc, KSmallBufferSize));
1.7208 +
1.7209 + if (err)
1.7210 + {
1.7211 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7212 + return EFail;
1.7213 + }
1.7214 + else if (!testOK)
1.7215 + {
1.7216 + INFO_PRINTF1(_L("Test failed"));
1.7217 + return EFail;
1.7218 + }
1.7219 + else
1.7220 + return EPass;
1.7221 + }
1.7222 +
1.7223 +//------------------------------------------------------------------
1.7224 +
1.7225 +/** @xxxx
1.7226 + * Constructor
1.7227 + */
1.7228 +CTest_MMF_ACOD_U_0135::CTest_MMF_ACOD_U_0135()
1.7229 + {
1.7230 + // store the name of this test case
1.7231 + // this is the name that is used by the script file
1.7232 + // Each test step initialises it's own name
1.7233 + iTestStepName = _L("MM-MMF-ACOD-U-0135-HP");
1.7234 + iHeapSize = 0x20000;
1.7235 + iExpectedReturnValue[0].iStatus = TCodecProcessResult::EDstNotFilled;
1.7236 + iExpectedReturnValue[1].iStatus = TCodecProcessResult::EDstNotFilled;
1.7237 + iExpectedReturnValue[2].iStatus = TCodecProcessResult::EDstNotFilled;
1.7238 + iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7239 + iExpectedReturnValue[4].iStatus = TCodecProcessResult::EDstNotFilled;
1.7240 + }
1.7241 +
1.7242 +/** @xxxx
1.7243 + * PCM16 to IMAD Pass in large buffers
1.7244 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7245 + */
1.7246 +TVerdict CTest_MMF_ACOD_U_0135::DoTestStepL()
1.7247 + {
1.7248 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM};
1.7249 + TBool testOK = EFalse;
1.7250 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize, 0, EFalse));
1.7251 +
1.7252 + if (err)
1.7253 + {
1.7254 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7255 + return EFail;
1.7256 + }
1.7257 + else if (!testOK)
1.7258 + {
1.7259 + INFO_PRINTF1(_L("Test failed"));
1.7260 + return EFail;
1.7261 + }
1.7262 + else
1.7263 + return EPass;
1.7264 + }
1.7265 +
1.7266 +//------------------------------------------------------------------
1.7267 +
1.7268 +/** @xxxx
1.7269 + * Constructor
1.7270 + */
1.7271 +CTest_MMF_ACOD_U_0136::CTest_MMF_ACOD_U_0136()
1.7272 + {
1.7273 + // store the name of this test case
1.7274 + // this is the name that is used by the script file
1.7275 + // Each test step initialises it's own name
1.7276 + iTestStepName = _L("MM-MMF-ACOD-U-0136-HP");
1.7277 +
1.7278 + iExpectedReturnValue[0].iStatus = TCodecProcessResult::EDstNotFilled;
1.7279 + iExpectedReturnValue[1].iStatus = TCodecProcessResult::EDstNotFilled;
1.7280 + iExpectedReturnValue[2].iStatus = TCodecProcessResult::EDstNotFilled;
1.7281 + iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7282 + iExpectedReturnValue[4].iStatus = TCodecProcessResult::EDstNotFilled;
1.7283 + }
1.7284 +
1.7285 +/** @xxxx
1.7286 + * PCM16 to IMAD Pass in default sized buffers
1.7287 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7288 + */
1.7289 +TVerdict CTest_MMF_ACOD_U_0136::DoTestStepL()
1.7290 + {
1.7291 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM};
1.7292 + TBool testOK = EFalse;
1.7293 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize, 0, EFalse));
1.7294 +
1.7295 + if (err)
1.7296 + {
1.7297 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7298 + return EFail;
1.7299 + }
1.7300 + else if (!testOK)
1.7301 + {
1.7302 + INFO_PRINTF1(_L("Test failed"));
1.7303 + return EFail;
1.7304 + }
1.7305 + else
1.7306 + return EPass;
1.7307 + }
1.7308 +
1.7309 +//------------------------------------------------------------------
1.7310 +
1.7311 +/** @xxxx
1.7312 + * Constructor
1.7313 + */
1.7314 +CTest_MMF_ACOD_U_0137::CTest_MMF_ACOD_U_0137()
1.7315 + {
1.7316 + // store the name of this test case
1.7317 + // this is the name that is used by the script file
1.7318 + // Each test step initialises it's own name
1.7319 + iTestStepName = _L("MM-MMF-ACOD-U-0137-HP");
1.7320 +
1.7321 + iExpectedReturnValue[0].iStatus = TCodecProcessResult::EDstNotFilled;
1.7322 + iExpectedReturnValue[1].iStatus = TCodecProcessResult::EDstNotFilled;
1.7323 + iExpectedReturnValue[2].iStatus = TCodecProcessResult::EDstNotFilled;
1.7324 + iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7325 + iExpectedReturnValue[4].iStatus = TCodecProcessResult::EDstNotFilled;
1.7326 + }
1.7327 +
1.7328 +/** @xxxx
1.7329 + * PCM16 to IMAD Pass in buffers with different max length and length
1.7330 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7331 + */
1.7332 +TVerdict CTest_MMF_ACOD_U_0137::DoTestStepL()
1.7333 + {
1.7334 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM};
1.7335 + TBool testOK = EFalse;
1.7336 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize, EFalse));
1.7337 +
1.7338 + if (err)
1.7339 + {
1.7340 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7341 + return EFail;
1.7342 + }
1.7343 + else if (!testOK)
1.7344 + {
1.7345 + INFO_PRINTF1(_L("Test failed"));
1.7346 + return EFail;
1.7347 + }
1.7348 + else
1.7349 + return EPass;
1.7350 + }
1.7351 +
1.7352 +//------------------------------------------------------------------
1.7353 +
1.7354 +/** @xxxx
1.7355 + * Constructor
1.7356 + */
1.7357 +CTest_MMF_ACOD_U_0138::CTest_MMF_ACOD_U_0138()
1.7358 + {
1.7359 + // store the name of this test case
1.7360 + // this is the name that is used by the script file
1.7361 + // Each test step initialises it's own name
1.7362 + iTestStepName = _L("MM-MMF-ACOD-U-0138-HP");
1.7363 +
1.7364 + for (TUint i=0; i<5; i++)
1.7365 + {
1.7366 + iExpectedSrcBytesProcessed[i] = 0xFC8;
1.7367 + iExpectedDstBytesAdded[i] = 0x400;
1.7368 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.7369 + }
1.7370 + }
1.7371 +
1.7372 +/** @xxxx
1.7373 + * PCM16 to IMAD Pass in buffers of optimum size
1.7374 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7375 + */
1.7376 +TVerdict CTest_MMF_ACOD_U_0138::DoTestStepL()
1.7377 + {
1.7378 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM};
1.7379 + TBool testOK = EFalse;
1.7380 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToAdpcmOptimumSrc, KPCM16ToAdpcmOptimumDst));
1.7381 +
1.7382 + if (err)
1.7383 + {
1.7384 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7385 + return EFail;
1.7386 + }
1.7387 + else if (!testOK)
1.7388 + {
1.7389 + INFO_PRINTF1(_L("Test failed"));
1.7390 + return EFail;
1.7391 + }
1.7392 + else
1.7393 + return EPass;
1.7394 + }
1.7395 +
1.7396 +//------------------------------------------------------------------
1.7397 +
1.7398 +/** @xxxx
1.7399 + * Constructor
1.7400 + */
1.7401 +CTest_MMF_ACOD_U_0139::CTest_MMF_ACOD_U_0139()
1.7402 + {
1.7403 + // store the name of this test case
1.7404 + // this is the name that is used by the script file
1.7405 + // Each test step initialises it's own name
1.7406 + iTestStepName = _L("MM-MMF-ACOD-U-0139-HP");
1.7407 + }
1.7408 +
1.7409 +/** @xxxx
1.7410 + * PCM16 to IMAD Reposition source pointer during conversion
1.7411 + * @test Req. under test REQ172.11
1.7412 + */
1.7413 +TVerdict CTest_MMF_ACOD_U_0139::DoTestStepL()
1.7414 + {
1.7415 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM};
1.7416 + TBool testOK = EFalse;
1.7417 +
1.7418 + TUint src = (KPCM16ToAdpcmOptimumSrc/4) + 10;
1.7419 +
1.7420 + INFO_PRINTF1(_L(">> The PCM16 to IMAD codec stores data between calls to ProcessL"));
1.7421 + TRAPD(err, testOK = TestRepositionL(codecUid, src, KPCM16ToAdpcmOptimumDst));
1.7422 +
1.7423 + if (err)
1.7424 + {
1.7425 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7426 + return EFail;
1.7427 + }
1.7428 + else if (!testOK)
1.7429 + {
1.7430 + INFO_PRINTF1(_L("Test failed"));
1.7431 + return EFail;
1.7432 + }
1.7433 + else
1.7434 + return EPass;
1.7435 + }
1.7436 +
1.7437 +//------------------------------------------------------------------
1.7438 +
1.7439 +/** @xxxx
1.7440 + * Constructor
1.7441 + */
1.7442 +CTest_MMF_ACOD_U_0140::CTest_MMF_ACOD_U_0140()
1.7443 + {
1.7444 + // store the name of this test case
1.7445 + // this is the name that is used by the script file
1.7446 + // Each test step initialises it's own name
1.7447 + iTestStepName = _L("MM-MMF-ACOD-U-0140-HP");
1.7448 + }
1.7449 +
1.7450 +/** @xxxx
1.7451 + * IMAS to PCM16 Instantiate codec by FourCC Codes
1.7452 + * @test Req. under test REQ172.6.2, REQ172.11.17
1.7453 + */
1.7454 +TVerdict CTest_MMF_ACOD_U_0140::DoTestStepL()
1.7455 + {
1.7456 + TBool testOK = EFalse;
1.7457 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodeIMAS, KMMFFourCCCodePCM16));
1.7458 +
1.7459 + if (err)
1.7460 + {
1.7461 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7462 + return EFail;
1.7463 + }
1.7464 + else if (!testOK)
1.7465 + {
1.7466 + INFO_PRINTF1(_L("Test failed"));
1.7467 + return EFail;
1.7468 + }
1.7469 + else
1.7470 + return EPass;
1.7471 + }
1.7472 +
1.7473 +//------------------------------------------------------------------
1.7474 +
1.7475 +/** @xxxx
1.7476 + * Constructor
1.7477 + */
1.7478 +CTest_MMF_ACOD_U_0141::CTest_MMF_ACOD_U_0141()
1.7479 + {
1.7480 + // store the name of this test case
1.7481 + // this is the name that is used by the script file
1.7482 + // Each test step initialises it's own name
1.7483 + iTestStepName = _L("MM-MMF-ACOD-U-0141-HP");
1.7484 + }
1.7485 +
1.7486 +/** @xxxx
1.7487 + * IMAS to PCM16 Instantiate codec by UID
1.7488 + * @test Req. under test REQ172.6.1, REQ172.11.17
1.7489 + */
1.7490 +TVerdict CTest_MMF_ACOD_U_0141::DoTestStepL()
1.7491 + {
1.7492 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo};
1.7493 + TBool testOK = EFalse;
1.7494 + TRAPD(err, testOK = TestNewL(codecUid));
1.7495 +
1.7496 + if (err)
1.7497 + {
1.7498 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7499 + return EFail;
1.7500 + }
1.7501 + else if (!testOK)
1.7502 + {
1.7503 + INFO_PRINTF1(_L("Test failed"));
1.7504 + return EFail;
1.7505 + }
1.7506 + else
1.7507 + return EPass;
1.7508 + }
1.7509 +
1.7510 +//------------------------------------------------------------------
1.7511 +
1.7512 +/** @xxxx
1.7513 + * Constructor
1.7514 + */
1.7515 +CTest_MMF_ACOD_U_0142::CTest_MMF_ACOD_U_0142()
1.7516 + {
1.7517 + // store the name of this test case
1.7518 + // this is the name that is used by the script file
1.7519 + // Each test step initialises it's own name
1.7520 + iTestStepName = _L("MM-MMF-ACOD-U-0142-HP");
1.7521 +
1.7522 + for (TUint i=0; i<5; i++)
1.7523 + {
1.7524 + iExpectedSrcBytesProcessed[i] = 50;
1.7525 + iExpectedDstBytesAdded[i] = 0;
1.7526 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.7527 + }
1.7528 + }
1.7529 +
1.7530 +/** @xxxx
1.7531 + * IMAS to PCM16 Pass in small source buffers
1.7532 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7533 + */
1.7534 +TVerdict CTest_MMF_ACOD_U_0142::DoTestStepL()
1.7535 + {
1.7536 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo};
1.7537 + TBool testOK = EFalse;
1.7538 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KStereoAdpcmToPCM16OptimumDst));
1.7539 +
1.7540 + if (err)
1.7541 + {
1.7542 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7543 + return EFail;
1.7544 + }
1.7545 + else if (!testOK)
1.7546 + {
1.7547 + INFO_PRINTF1(_L("Test failed"));
1.7548 + return EFail;
1.7549 + }
1.7550 + else
1.7551 + return EPass;
1.7552 + }
1.7553 +
1.7554 +//------------------------------------------------------------------
1.7555 +
1.7556 +/** @xxxx
1.7557 + * Constructor
1.7558 + */
1.7559 +CTest_MMF_ACOD_U_0143::CTest_MMF_ACOD_U_0143()
1.7560 + {
1.7561 + // store the name of this test case
1.7562 + // this is the name that is used by the script file
1.7563 + // Each test step initialises it's own name
1.7564 + iTestStepName = _L("MM-MMF-ACOD-U-0143-HP");
1.7565 +
1.7566 + iExpectedLeaveErrorCode = KErrArgument;
1.7567 + }
1.7568 +
1.7569 +/** @xxxx
1.7570 + * IMAS to PCM16 Pass in small dest buffers
1.7571 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7572 + */
1.7573 +TVerdict CTest_MMF_ACOD_U_0143::DoTestStepL()
1.7574 + {
1.7575 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo};
1.7576 + TBool testOK = EFalse;
1.7577 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KStereoAdpcmToPCM16OptimumSrc, KSmallBufferSize));
1.7578 +
1.7579 + if (err)
1.7580 + {
1.7581 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7582 + return EFail;
1.7583 + }
1.7584 + else if (!testOK)
1.7585 + {
1.7586 + INFO_PRINTF1(_L("Test failed"));
1.7587 + return EFail;
1.7588 + }
1.7589 + else
1.7590 + return EPass;
1.7591 + }
1.7592 +
1.7593 +//------------------------------------------------------------------
1.7594 +
1.7595 +/** @xxxx
1.7596 + * Constructor
1.7597 + */
1.7598 +CTest_MMF_ACOD_U_0144::CTest_MMF_ACOD_U_0144()
1.7599 + {
1.7600 + // store the name of this test case
1.7601 + // this is the name that is used by the script file
1.7602 + // Each test step initialises it's own name
1.7603 + iTestStepName = _L("MM-MMF-ACOD-U-0144-HP");
1.7604 + iHeapSize = 0x20000;
1.7605 + iExpectedReturnValue[0].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7606 + iExpectedReturnValue[1].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7607 + iExpectedReturnValue[2].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7608 + iExpectedReturnValue[3].iStatus = TCodecProcessResult::EDstNotFilled;
1.7609 + iExpectedReturnValue[4].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7610 + }
1.7611 +
1.7612 +/** @xxxx
1.7613 + * IMAS to PCM16 Pass in large buffers
1.7614 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7615 + */
1.7616 +TVerdict CTest_MMF_ACOD_U_0144::DoTestStepL()
1.7617 + {
1.7618 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo};
1.7619 + TBool testOK = EFalse;
1.7620 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize, 0, EFalse));
1.7621 +
1.7622 + if (err)
1.7623 + {
1.7624 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7625 + return EFail;
1.7626 + }
1.7627 + else if (!testOK)
1.7628 + {
1.7629 + INFO_PRINTF1(_L("Test failed"));
1.7630 + return EFail;
1.7631 + }
1.7632 + else
1.7633 + return EPass;
1.7634 + }
1.7635 +
1.7636 +//------------------------------------------------------------------
1.7637 +
1.7638 +/** @xxxx
1.7639 + * Constructor
1.7640 + */
1.7641 +CTest_MMF_ACOD_U_0145::CTest_MMF_ACOD_U_0145()
1.7642 + {
1.7643 + // store the name of this test case
1.7644 + // this is the name that is used by the script file
1.7645 + // Each test step initialises it's own name
1.7646 + iTestStepName = _L("MM-MMF-ACOD-U-0145-HP");
1.7647 +
1.7648 + iExpectedReturnValue[0].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7649 + iExpectedReturnValue[1].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7650 + iExpectedReturnValue[2].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7651 + iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessComplete;
1.7652 + iExpectedReturnValue[4].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7653 + }
1.7654 +
1.7655 +/** @xxxx
1.7656 + * IMAS to PCM16 Pass in default sized buffers
1.7657 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7658 + */
1.7659 +TVerdict CTest_MMF_ACOD_U_0145::DoTestStepL()
1.7660 + {
1.7661 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo};
1.7662 + TBool testOK = EFalse;
1.7663 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize, 0, EFalse));
1.7664 +
1.7665 + if (err)
1.7666 + {
1.7667 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7668 + return EFail;
1.7669 + }
1.7670 + else if (!testOK)
1.7671 + {
1.7672 + INFO_PRINTF1(_L("Test failed"));
1.7673 + return EFail;
1.7674 + }
1.7675 + else
1.7676 + return EPass;
1.7677 + }
1.7678 +
1.7679 +//------------------------------------------------------------------
1.7680 +
1.7681 +/** @xxxx
1.7682 + * Constructor
1.7683 + */
1.7684 +CTest_MMF_ACOD_U_0146::CTest_MMF_ACOD_U_0146()
1.7685 + {
1.7686 + // store the name of this test case
1.7687 + // this is the name that is used by the script file
1.7688 + // Each test step initialises it's own name
1.7689 + iTestStepName = _L("MM-MMF-ACOD-U-0146-HP");
1.7690 +
1.7691 + iExpectedReturnValue[0].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7692 + iExpectedReturnValue[1].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7693 + iExpectedReturnValue[2].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7694 + iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessComplete;
1.7695 + iExpectedReturnValue[4].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7696 + }
1.7697 +
1.7698 +/** @xxxx
1.7699 + * IMAS to PCM16 Pass in buffers with different max length and length
1.7700 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7701 + */
1.7702 +TVerdict CTest_MMF_ACOD_U_0146::DoTestStepL()
1.7703 + {
1.7704 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo};
1.7705 + TBool testOK = EFalse;
1.7706 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize, EFalse));
1.7707 +
1.7708 + if (err)
1.7709 + {
1.7710 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7711 + return EFail;
1.7712 + }
1.7713 + else if (!testOK)
1.7714 + {
1.7715 + INFO_PRINTF1(_L("Test failed"));
1.7716 + return EFail;
1.7717 + }
1.7718 + else
1.7719 + return EPass;
1.7720 + }
1.7721 +
1.7722 +//------------------------------------------------------------------
1.7723 +
1.7724 +/** @xxxx
1.7725 + * Constructor
1.7726 + */
1.7727 +CTest_MMF_ACOD_U_0147::CTest_MMF_ACOD_U_0147()
1.7728 + {
1.7729 + // store the name of this test case
1.7730 + // this is the name that is used by the script file
1.7731 + // Each test step initialises it's own name
1.7732 + iTestStepName = _L("MM-MMF-ACOD-U-0147-HP");
1.7733 +
1.7734 + for (TUint i=0; i<5; i++)
1.7735 + {
1.7736 + iExpectedSrcBytesProcessed[i] = 0x400;
1.7737 + iExpectedDstBytesAdded[i] = 0xF90;
1.7738 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.7739 + }
1.7740 + }
1.7741 +
1.7742 +/** @xxxx
1.7743 + * IMAS to PCM16 Pass in buffers of optimum size
1.7744 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7745 + */
1.7746 +TVerdict CTest_MMF_ACOD_U_0147::DoTestStepL()
1.7747 + {
1.7748 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo};
1.7749 + TBool testOK = EFalse;
1.7750 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KStereoAdpcmToPCM16OptimumSrc, KStereoAdpcmToPCM16OptimumDst));
1.7751 +
1.7752 + if (err)
1.7753 + {
1.7754 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7755 + return EFail;
1.7756 + }
1.7757 + else if (!testOK)
1.7758 + {
1.7759 + INFO_PRINTF1(_L("Test failed"));
1.7760 + return EFail;
1.7761 + }
1.7762 + else
1.7763 + return EPass;
1.7764 + }
1.7765 +
1.7766 +//------------------------------------------------------------------
1.7767 +
1.7768 +/** @xxxx
1.7769 + * Constructor
1.7770 + */
1.7771 +CTest_MMF_ACOD_U_0148::CTest_MMF_ACOD_U_0148()
1.7772 + {
1.7773 + // store the name of this test case
1.7774 + // this is the name that is used by the script file
1.7775 + // Each test step initialises it's own name
1.7776 + iTestStepName = _L("MM-MMF-ACOD-U-0148-HP");
1.7777 + }
1.7778 +
1.7779 +/** @xxxx
1.7780 + * IMAS to PCM16 Reposition source pointer during conversion
1.7781 + * @test Req. under test REQ172.11
1.7782 + */
1.7783 +TVerdict CTest_MMF_ACOD_U_0148::DoTestStepL()
1.7784 + {
1.7785 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo};
1.7786 + TBool testOK = EFalse;
1.7787 +
1.7788 + TUint src = (KStereoAdpcmToPCM16OptimumSrc/4) + 10;
1.7789 +
1.7790 + INFO_PRINTF1(_L(">> The IMAS to PCM16 codec stores data between calls to ProcessL"));
1.7791 + TRAPD(err, testOK = TestRepositionL(codecUid, src, KStereoAdpcmToPCM16OptimumDst));
1.7792 +
1.7793 + if (err)
1.7794 + {
1.7795 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7796 + return EFail;
1.7797 + }
1.7798 + else if (!testOK)
1.7799 + {
1.7800 + INFO_PRINTF1(_L("Test failed"));
1.7801 + return EFail;
1.7802 + }
1.7803 + else
1.7804 + return EPass;
1.7805 + }
1.7806 +
1.7807 +//------------------------------------------------------------------
1.7808 +
1.7809 +/** @xxxx
1.7810 + * Constructor
1.7811 + */
1.7812 +CTest_MMF_ACOD_U_0149::CTest_MMF_ACOD_U_0149()
1.7813 + {
1.7814 + // store the name of this test case
1.7815 + // this is the name that is used by the script file
1.7816 + // Each test step initialises it's own name
1.7817 + iTestStepName = _L("MM-MMF-ACOD-U-0149-HP");
1.7818 + }
1.7819 +
1.7820 +/** @xxxx
1.7821 + * PCM16 to IMAS Instantiate codec by FourCC Codes
1.7822 + * @test Req. under test REQ172.6.2, REQ172.11.18
1.7823 + */
1.7824 +TVerdict CTest_MMF_ACOD_U_0149::DoTestStepL()
1.7825 + {
1.7826 + TBool testOK = EFalse;
1.7827 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodeIMAS));
1.7828 +
1.7829 + if (err)
1.7830 + {
1.7831 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7832 + return EFail;
1.7833 + }
1.7834 + else if (!testOK)
1.7835 + {
1.7836 + INFO_PRINTF1(_L("Test failed"));
1.7837 + return EFail;
1.7838 + }
1.7839 + else
1.7840 + return EPass;
1.7841 + }
1.7842 +
1.7843 +//------------------------------------------------------------------
1.7844 +
1.7845 +/** @xxxx
1.7846 + * Constructor
1.7847 + */
1.7848 +CTest_MMF_ACOD_U_0150::CTest_MMF_ACOD_U_0150()
1.7849 + {
1.7850 + // store the name of this test case
1.7851 + // this is the name that is used by the script file
1.7852 + // Each test step initialises it's own name
1.7853 + iTestStepName = _L("MM-MMF-ACOD-U-0150-HP");
1.7854 + }
1.7855 +
1.7856 +/** @xxxx
1.7857 + * PCM16 to IMAS Instantiate codec by UID
1.7858 + * @test Req. under test REQ172.6.1, REQ172.11.18
1.7859 + */
1.7860 +TVerdict CTest_MMF_ACOD_U_0150::DoTestStepL()
1.7861 + {
1.7862 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo};
1.7863 + TBool testOK = EFalse;
1.7864 + TRAPD(err, testOK = TestNewL(codecUid));
1.7865 +
1.7866 + if (err)
1.7867 + {
1.7868 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7869 + return EFail;
1.7870 + }
1.7871 + else if (!testOK)
1.7872 + {
1.7873 + INFO_PRINTF1(_L("Test failed"));
1.7874 + return EFail;
1.7875 + }
1.7876 + else
1.7877 + return EPass;
1.7878 + }
1.7879 +
1.7880 +//------------------------------------------------------------------
1.7881 +
1.7882 +/** @xxxx
1.7883 + * Constructor
1.7884 + */
1.7885 +CTest_MMF_ACOD_U_0151::CTest_MMF_ACOD_U_0151()
1.7886 + {
1.7887 + // store the name of this test case
1.7888 + // this is the name that is used by the script file
1.7889 + // Each test step initialises it's own name
1.7890 + iTestStepName = _L("MM-MMF-ACOD-U-0151-HP");
1.7891 +
1.7892 + for (TUint i=0; i<5; i++)
1.7893 + {
1.7894 + iExpectedSrcBytesProcessed[i] = 50;
1.7895 + iExpectedDstBytesAdded[i] = 0;
1.7896 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.7897 + }
1.7898 + }
1.7899 +
1.7900 +/** @xxxx
1.7901 + * IMAS to PCM16 Pass in small source buffers
1.7902 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7903 + */
1.7904 +TVerdict CTest_MMF_ACOD_U_0151::DoTestStepL()
1.7905 + {
1.7906 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo};
1.7907 + TBool testOK = EFalse;
1.7908 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSize, KPCM16ToStereoAdpcmOptimumDst));
1.7909 +
1.7910 + if (err)
1.7911 + {
1.7912 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7913 + return EFail;
1.7914 + }
1.7915 + else if (!testOK)
1.7916 + {
1.7917 + INFO_PRINTF1(_L("Test failed"));
1.7918 + return EFail;
1.7919 + }
1.7920 + else
1.7921 + return EPass;
1.7922 + }
1.7923 +
1.7924 +//------------------------------------------------------------------
1.7925 +
1.7926 +/** @xxxx
1.7927 + * Constructor
1.7928 + */
1.7929 +CTest_MMF_ACOD_U_0152::CTest_MMF_ACOD_U_0152()
1.7930 + {
1.7931 + // store the name of this test case
1.7932 + // this is the name that is used by the script file
1.7933 + // Each test step initialises it's own name
1.7934 + iTestStepName = _L("MM-MMF-ACOD-U-0152-HP");
1.7935 +
1.7936 + iExpectedLeaveErrorCode = KErrArgument;
1.7937 + }
1.7938 +
1.7939 +/** @xxxx
1.7940 + * PCM16 to IMAS Pass in small dest buffers
1.7941 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7942 + */
1.7943 +TVerdict CTest_MMF_ACOD_U_0152::DoTestStepL()
1.7944 + {
1.7945 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo};
1.7946 + TBool testOK = EFalse;
1.7947 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToStereoAdpcmOptimumSrc, KSmallBufferSize));
1.7948 +
1.7949 + if (err)
1.7950 + {
1.7951 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7952 + return EFail;
1.7953 + }
1.7954 + else if (!testOK)
1.7955 + {
1.7956 + INFO_PRINTF1(_L("Test failed"));
1.7957 + return EFail;
1.7958 + }
1.7959 + else
1.7960 + return EPass;
1.7961 + }
1.7962 +
1.7963 +//------------------------------------------------------------------
1.7964 +
1.7965 +/** @xxxx
1.7966 + * Constructor
1.7967 + */
1.7968 +CTest_MMF_ACOD_U_0153::CTest_MMF_ACOD_U_0153()
1.7969 + {
1.7970 + // store the name of this test case
1.7971 + // this is the name that is used by the script file
1.7972 + // Each test step initialises it's own name
1.7973 + iTestStepName = _L("MM-MMF-ACOD-U-0153-HP");
1.7974 + iHeapSize = 0x20000;
1.7975 + iExpectedReturnValue[0].iStatus = TCodecProcessResult::EDstNotFilled;
1.7976 + iExpectedReturnValue[1].iStatus = TCodecProcessResult::EDstNotFilled;
1.7977 + iExpectedReturnValue[2].iStatus = TCodecProcessResult::EDstNotFilled;
1.7978 + iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessIncomplete;
1.7979 + iExpectedReturnValue[4].iStatus = TCodecProcessResult::EDstNotFilled;
1.7980 + }
1.7981 +
1.7982 +/** @xxxx
1.7983 + * PCM16 to IMAS Pass in large buffers
1.7984 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.7985 + */
1.7986 +TVerdict CTest_MMF_ACOD_U_0153::DoTestStepL()
1.7987 + {
1.7988 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo};
1.7989 + TBool testOK = EFalse;
1.7990 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize, 0, EFalse));
1.7991 +
1.7992 + if (err)
1.7993 + {
1.7994 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.7995 + return EFail;
1.7996 + }
1.7997 + else if (!testOK)
1.7998 + {
1.7999 + INFO_PRINTF1(_L("Test failed"));
1.8000 + return EFail;
1.8001 + }
1.8002 + else
1.8003 + return EPass;
1.8004 + }
1.8005 +
1.8006 +//------------------------------------------------------------------
1.8007 +
1.8008 +/** @xxxx
1.8009 + * Constructor
1.8010 + */
1.8011 +CTest_MMF_ACOD_U_0154::CTest_MMF_ACOD_U_0154()
1.8012 + {
1.8013 + // store the name of this test case
1.8014 + // this is the name that is used by the script file
1.8015 + // Each test step initialises it's own name
1.8016 + iTestStepName = _L("MM-MMF-ACOD-U-0154-HP");
1.8017 +
1.8018 + iExpectedReturnValue[0].iStatus = TCodecProcessResult::EDstNotFilled;
1.8019 + iExpectedReturnValue[1].iStatus = TCodecProcessResult::EDstNotFilled;
1.8020 + iExpectedReturnValue[2].iStatus = TCodecProcessResult::EDstNotFilled;
1.8021 + iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessComplete;
1.8022 + iExpectedReturnValue[4].iStatus = TCodecProcessResult::EDstNotFilled;
1.8023 + }
1.8024 +
1.8025 +/** @xxxx
1.8026 + * PCM16 to IMAS Pass in default sized buffers
1.8027 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8028 + */
1.8029 +TVerdict CTest_MMF_ACOD_U_0154::DoTestStepL()
1.8030 + {
1.8031 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo};
1.8032 + TBool testOK = EFalse;
1.8033 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize, 0, EFalse));
1.8034 +
1.8035 + if (err)
1.8036 + {
1.8037 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8038 + return EFail;
1.8039 + }
1.8040 + else if (!testOK)
1.8041 + {
1.8042 + INFO_PRINTF1(_L("Test failed"));
1.8043 + return EFail;
1.8044 + }
1.8045 + else
1.8046 + return EPass;
1.8047 + }
1.8048 +
1.8049 +//------------------------------------------------------------------
1.8050 +
1.8051 +/** @xxxx
1.8052 + * Constructor
1.8053 + */
1.8054 +CTest_MMF_ACOD_U_0155::CTest_MMF_ACOD_U_0155()
1.8055 + {
1.8056 + // store the name of this test case
1.8057 + // this is the name that is used by the script file
1.8058 + // Each test step initialises it's own name
1.8059 + iTestStepName = _L("MM-MMF-ACOD-U-0155-HP");
1.8060 +
1.8061 + iExpectedReturnValue[0].iStatus = TCodecProcessResult::EDstNotFilled;
1.8062 + iExpectedReturnValue[1].iStatus = TCodecProcessResult::EDstNotFilled;
1.8063 + iExpectedReturnValue[2].iStatus = TCodecProcessResult::EDstNotFilled;
1.8064 + iExpectedReturnValue[3].iStatus = TCodecProcessResult::EProcessComplete;
1.8065 + iExpectedReturnValue[4].iStatus = TCodecProcessResult::EDstNotFilled;
1.8066 + }
1.8067 +
1.8068 +/** @xxxx
1.8069 + * PCM16 to IMAS Pass in buffers with different max length and length
1.8070 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8071 + */
1.8072 +TVerdict CTest_MMF_ACOD_U_0155::DoTestStepL()
1.8073 + {
1.8074 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo};
1.8075 + TBool testOK = EFalse;
1.8076 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize, EFalse));
1.8077 +
1.8078 + if (err)
1.8079 + {
1.8080 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8081 + return EFail;
1.8082 + }
1.8083 + else if (!testOK)
1.8084 + {
1.8085 + INFO_PRINTF1(_L("Test failed"));
1.8086 + return EFail;
1.8087 + }
1.8088 + else
1.8089 + return EPass;
1.8090 + }
1.8091 +
1.8092 +//------------------------------------------------------------------
1.8093 +
1.8094 +/** @xxxx
1.8095 + * Constructor
1.8096 + */
1.8097 +CTest_MMF_ACOD_U_0156::CTest_MMF_ACOD_U_0156()
1.8098 + {
1.8099 + // store the name of this test case
1.8100 + // this is the name that is used by the script file
1.8101 + // Each test step initialises it's own name
1.8102 + iTestStepName = _L("MM-MMF-ACOD-U-0156-HP");
1.8103 +
1.8104 + for (TUint i=0; i<5; i++)
1.8105 + {
1.8106 + iExpectedSrcBytesProcessed[i] = 0xF90;
1.8107 + iExpectedDstBytesAdded[i] = 0x400;
1.8108 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.8109 + }
1.8110 + }
1.8111 +
1.8112 +/** @xxxx
1.8113 + * PCM16 to IMAS Pass in buffers of optimum size
1.8114 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8115 + */
1.8116 +TVerdict CTest_MMF_ACOD_U_0156::DoTestStepL()
1.8117 + {
1.8118 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo};
1.8119 + TBool testOK = EFalse;
1.8120 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToStereoAdpcmOptimumSrc, KPCM16ToStereoAdpcmOptimumDst));
1.8121 +
1.8122 + if (err)
1.8123 + {
1.8124 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8125 + return EFail;
1.8126 + }
1.8127 + else if (!testOK)
1.8128 + {
1.8129 + INFO_PRINTF1(_L("Test failed"));
1.8130 + return EFail;
1.8131 + }
1.8132 + else
1.8133 + return EPass;
1.8134 + }
1.8135 +
1.8136 +//------------------------------------------------------------------
1.8137 +
1.8138 +/** @xxxx
1.8139 + * Constructor
1.8140 + */
1.8141 +CTest_MMF_ACOD_U_0157::CTest_MMF_ACOD_U_0157()
1.8142 + {
1.8143 + // store the name of this test case
1.8144 + // this is the name that is used by the script file
1.8145 + // Each test step initialises it's own name
1.8146 + iTestStepName = _L("MM-MMF-ACOD-U-0157-HP");
1.8147 + }
1.8148 +
1.8149 +/** @xxxx
1.8150 + * PCM16 to IMAS Reposition source pointer during conversion
1.8151 + * @test Req. under test REQ172.11
1.8152 + */
1.8153 +TVerdict CTest_MMF_ACOD_U_0157::DoTestStepL()
1.8154 + {
1.8155 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo};
1.8156 + TBool testOK = EFalse;
1.8157 +
1.8158 + TUint src = (KPCM16ToStereoAdpcmOptimumSrc/4) + 10;
1.8159 +
1.8160 + INFO_PRINTF1(_L(">> The PCM16 to IMAS codec stores data between calls to ProcessL"));
1.8161 + TRAPD(err, testOK = TestRepositionL(codecUid, src, KPCM16ToStereoAdpcmOptimumDst));
1.8162 +
1.8163 + if (err)
1.8164 + {
1.8165 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8166 + return EFail;
1.8167 + }
1.8168 + else if (!testOK)
1.8169 + {
1.8170 + INFO_PRINTF1(_L("Test failed"));
1.8171 + return EFail;
1.8172 + }
1.8173 + else
1.8174 + return EPass;
1.8175 + }
1.8176 +
1.8177 +//------------------------------------------------------------------
1.8178 +
1.8179 +/** @xxxx
1.8180 + * Constructor
1.8181 + */
1.8182 +CTest_MMF_ACOD_U_0158::CTest_MMF_ACOD_U_0158()
1.8183 + {
1.8184 + // store the name of this test case
1.8185 + // this is the name that is used by the script file
1.8186 + // Each test step initialises it's own name
1.8187 + iTestStepName = _L("MM-MMF-ACOD-U-0158-HP");
1.8188 + }
1.8189 +
1.8190 +/** @xxxx
1.8191 + * GSM610 to PCM16 Instantiate codec by FourCC Codes
1.8192 + * @test Req. under test REQ172.6.2, REQ172.11.19
1.8193 + */
1.8194 +TVerdict CTest_MMF_ACOD_U_0158::DoTestStepL()
1.8195 + {
1.8196 + TBool testOK = EFalse;
1.8197 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodeGSM610, KMMFFourCCCodePCM16));
1.8198 +
1.8199 + if (err)
1.8200 + {
1.8201 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8202 + return EFail;
1.8203 + }
1.8204 + else if (!testOK)
1.8205 + {
1.8206 + INFO_PRINTF1(_L("Test failed"));
1.8207 + return EFail;
1.8208 + }
1.8209 + else
1.8210 + return EPass;
1.8211 + }
1.8212 +
1.8213 +//------------------------------------------------------------------
1.8214 +
1.8215 +/** @xxxx
1.8216 + * Constructor
1.8217 + */
1.8218 +CTest_MMF_ACOD_U_0159::CTest_MMF_ACOD_U_0159()
1.8219 + {
1.8220 + // store the name of this test case
1.8221 + // this is the name that is used by the script file
1.8222 + // Each test step initialises it's own name
1.8223 + iTestStepName = _L("MM-MMF-ACOD-U-0159-HP");
1.8224 + }
1.8225 +
1.8226 +/** @xxxx
1.8227 + * GSM610 to PCM16 Instantiate codec by UID
1.8228 + * @test Req. under test REQ172.6.1, REQ172.11.19
1.8229 + */
1.8230 +TVerdict CTest_MMF_ACOD_U_0159::DoTestStepL()
1.8231 + {
1.8232 + const TUid codecUid = {KMmfUidCodecGSM610ToPCM16};
1.8233 + TBool testOK = EFalse;
1.8234 + TRAPD(err, testOK = TestNewL(codecUid));
1.8235 +
1.8236 + if (err)
1.8237 + {
1.8238 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8239 + return EFail;
1.8240 + }
1.8241 + else if (!testOK)
1.8242 + {
1.8243 + INFO_PRINTF1(_L("Test failed"));
1.8244 + return EFail;
1.8245 + }
1.8246 + else
1.8247 + return EPass;
1.8248 + }
1.8249 +
1.8250 +//------------------------------------------------------------------
1.8251 +
1.8252 +/** @xxxx
1.8253 + * Constructor
1.8254 + */
1.8255 +CTest_MMF_ACOD_U_0160::CTest_MMF_ACOD_U_0160()
1.8256 + {
1.8257 + // store the name of this test case
1.8258 + // this is the name that is used by the script file
1.8259 + // Each test step initialises it's own name
1.8260 + iTestStepName = _L("MM-MMF-ACOD-U-0160-HP");
1.8261 + iHeapSize = 0x200000;
1.8262 +
1.8263 + for (TUint i=0; i<5; i++)
1.8264 + {
1.8265 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.8266 + }
1.8267 +
1.8268 + }
1.8269 +
1.8270 +/** @xxxx
1.8271 + * GSM610 to PCM16 Pass in small source buffers
1.8272 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8273 + */
1.8274 +TVerdict CTest_MMF_ACOD_U_0160::DoTestStepL()
1.8275 + {
1.8276 + const TUid codecUid = {KMmfUidCodecGSM610ToPCM16};
1.8277 + TBool testOK = EFalse;
1.8278 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSizeGSM, KGSM610ToPCM16OptimumDstGSM, 0, EFalse));
1.8279 +
1.8280 + if (err)
1.8281 + {
1.8282 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8283 + return EFail;
1.8284 + }
1.8285 + else if (!testOK)
1.8286 + {
1.8287 + INFO_PRINTF1(_L("Test failed"));
1.8288 + return EFail;
1.8289 + }
1.8290 + else
1.8291 + return EPass;
1.8292 + }
1.8293 +
1.8294 +//------------------------------------------------------------------
1.8295 +
1.8296 +/** @xxxx
1.8297 + * Constructor
1.8298 + */
1.8299 +CTest_MMF_ACOD_U_0161::CTest_MMF_ACOD_U_0161()
1.8300 + {
1.8301 + // store the name of this test case
1.8302 + // this is the name that is used by the script file
1.8303 + // Each test step initialises it's own name
1.8304 + iTestStepName = _L("MM-MMF-ACOD-U-0161-HP");
1.8305 + iHeapSize = 0x20000;
1.8306 +
1.8307 + for (TUint i=0; i<5; i++)
1.8308 + {
1.8309 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.8310 + }
1.8311 + }
1.8312 +
1.8313 +/** @xxxx
1.8314 + * GSM610 to PCM16 Pass in small dest buffers
1.8315 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8316 + */
1.8317 +TVerdict CTest_MMF_ACOD_U_0161::DoTestStepL()
1.8318 + {
1.8319 + const TUid codecUid = {KMmfUidCodecGSM610ToPCM16};
1.8320 + TBool testOK = EFalse;
1.8321 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KGSM610ToPCM16OptimumSrcGSM, KSmallBufferSizeGSM, 0, EFalse));
1.8322 +
1.8323 + if (err)
1.8324 + {
1.8325 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8326 + return EFail;
1.8327 + }
1.8328 + else if (!testOK)
1.8329 + {
1.8330 + INFO_PRINTF1(_L("Test failed"));
1.8331 + return EFail;
1.8332 + }
1.8333 + else
1.8334 + return EPass;
1.8335 + }
1.8336 +
1.8337 +//------------------------------------------------------------------
1.8338 +
1.8339 +/** @xxxx
1.8340 + * Constructor
1.8341 + */
1.8342 +CTest_MMF_ACOD_U_0162::CTest_MMF_ACOD_U_0162()
1.8343 + {
1.8344 + // store the name of this test case
1.8345 + // this is the name that is used by the script file
1.8346 + // Each test step initialises it's own name
1.8347 + iTestStepName = _L("MM-MMF-ACOD-U-0162-HP");
1.8348 + iHeapSize = 0x20000;
1.8349 + for (TUint i=0; i<5; i++)
1.8350 + {
1.8351 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.8352 + }
1.8353 + }
1.8354 +
1.8355 +/** @xxxx
1.8356 + * GSM610 to PCM16 Pass in large buffers
1.8357 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8358 + */
1.8359 +TVerdict CTest_MMF_ACOD_U_0162::DoTestStepL()
1.8360 + {
1.8361 + const TUid codecUid = {KMmfUidCodecGSM610ToPCM16};
1.8362 + TBool testOK = EFalse;
1.8363 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize, 0, EFalse));
1.8364 +
1.8365 + if (err)
1.8366 + {
1.8367 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8368 + return EFail;
1.8369 + }
1.8370 + else if (!testOK)
1.8371 + {
1.8372 + INFO_PRINTF1(_L("Test failed"));
1.8373 + return EFail;
1.8374 + }
1.8375 + else
1.8376 + return EPass;
1.8377 + }
1.8378 +
1.8379 +//------------------------------------------------------------------
1.8380 +
1.8381 +/** @xxxx
1.8382 + * Constructor
1.8383 + */
1.8384 +CTest_MMF_ACOD_U_0163::CTest_MMF_ACOD_U_0163()
1.8385 + {
1.8386 + // store the name of this test case
1.8387 + // this is the name that is used by the script file
1.8388 + // Each test step initialises it's own name
1.8389 + iTestStepName = _L("MM-MMF-ACOD-U-0163-HP");
1.8390 +
1.8391 + for (TUint i=0; i<5; i++)
1.8392 + {
1.8393 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.8394 + }
1.8395 + }
1.8396 +
1.8397 +/** @xxxx
1.8398 + * GSM610 to PCM16 Pass in default sized buffers
1.8399 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8400 + */
1.8401 +TVerdict CTest_MMF_ACOD_U_0163::DoTestStepL()
1.8402 + {
1.8403 + const TUid codecUid = {KMmfUidCodecGSM610ToPCM16};
1.8404 + TBool testOK = EFalse;
1.8405 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize, 0, EFalse));
1.8406 +
1.8407 + if (err)
1.8408 + {
1.8409 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8410 + return EFail;
1.8411 + }
1.8412 + else if (!testOK)
1.8413 + {
1.8414 + INFO_PRINTF1(_L("Test failed"));
1.8415 + return EFail;
1.8416 + }
1.8417 + else
1.8418 + return EPass;
1.8419 + }
1.8420 +
1.8421 +//------------------------------------------------------------------
1.8422 +
1.8423 +/** @xxxx
1.8424 + * Constructor
1.8425 + */
1.8426 +CTest_MMF_ACOD_U_0164::CTest_MMF_ACOD_U_0164()
1.8427 + {
1.8428 + // store the name of this test case
1.8429 + // this is the name that is used by the script file
1.8430 + // Each test step initialises it's own name
1.8431 + iTestStepName = _L("MM-MMF-ACOD-U-0164-HP");
1.8432 +
1.8433 + for (TUint i=0; i<5; i++)
1.8434 + {
1.8435 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessIncomplete;
1.8436 + }
1.8437 + }
1.8438 +
1.8439 +/** @xxxx
1.8440 + * GSM610 to PCM16 Pass in buffers with different max length and length
1.8441 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8442 + */
1.8443 +TVerdict CTest_MMF_ACOD_U_0164::DoTestStepL()
1.8444 + {
1.8445 + const TUid codecUid = {KMmfUidCodecGSM610ToPCM16};
1.8446 + TBool testOK = EFalse;
1.8447 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize, EFalse));
1.8448 +
1.8449 + if (err)
1.8450 + {
1.8451 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8452 + return EFail;
1.8453 + }
1.8454 + else if (!testOK)
1.8455 + {
1.8456 + INFO_PRINTF1(_L("Test failed"));
1.8457 + return EFail;
1.8458 + }
1.8459 + else
1.8460 + return EPass;
1.8461 + }
1.8462 +
1.8463 +//------------------------------------------------------------------
1.8464 +
1.8465 +/** @xxxx
1.8466 + * Constructor
1.8467 + */
1.8468 +CTest_MMF_ACOD_U_0165::CTest_MMF_ACOD_U_0165()
1.8469 + {
1.8470 + // store the name of this test case
1.8471 + // this is the name that is used by the script file
1.8472 + // Each test step initialises it's own name
1.8473 + iTestStepName = _L("MM-MMF-ACOD-U-0165-HP");
1.8474 + iSingleIteration = ETrue;
1.8475 +
1.8476 + for (TUint i=0; i<5; i++)
1.8477 + {
1.8478 + iExpectedSrcBytesProcessed[i] = 0x104;
1.8479 + iExpectedDstBytesAdded[i] = 0xA00;
1.8480 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.8481 + }
1.8482 + }
1.8483 +
1.8484 +/** @xxxx
1.8485 + * GSM610 to PCM16 Pass in buffers of optimum size
1.8486 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8487 + */
1.8488 +TVerdict CTest_MMF_ACOD_U_0165::DoTestStepL()
1.8489 + {
1.8490 + const TUid codecUid = {KMmfUidCodecGSM610ToPCM16};
1.8491 + TBool testOK = EFalse;
1.8492 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KGSM610ToPCM16OptimumSrc, KGSM610ToPCM16OptimumDst));
1.8493 +
1.8494 + if (err)
1.8495 + {
1.8496 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8497 + return EFail;
1.8498 + }
1.8499 + else if (!testOK)
1.8500 + {
1.8501 + INFO_PRINTF1(_L("Test failed"));
1.8502 + return EFail;
1.8503 + }
1.8504 + else
1.8505 + return EPass;
1.8506 + }
1.8507 +
1.8508 +//------------------------------------------------------------------
1.8509 +
1.8510 +/** @xxxx
1.8511 + * Constructor
1.8512 + */
1.8513 +CTest_MMF_ACOD_U_0166::CTest_MMF_ACOD_U_0166()
1.8514 + {
1.8515 + // store the name of this test case
1.8516 + // this is the name that is used by the script file
1.8517 + // Each test step initialises it's own name
1.8518 + iTestStepName = _L("MM-MMF-ACOD-U-0166-HP");
1.8519 + }
1.8520 +
1.8521 +/** @xxxx
1.8522 + * GSM610 to PCM16 Reposition source pointer during conversion
1.8523 + * @test Req. under test REQ172.11
1.8524 + */
1.8525 +TVerdict CTest_MMF_ACOD_U_0166::DoTestStepL()
1.8526 + {
1.8527 + const TUid codecUid = {KMmfUidCodecGSM610ToPCM16};
1.8528 + TBool testOK = EFalse;
1.8529 +
1.8530 + TUint src = (KGSM610ToPCM16OptimumSrc/4) + 10;
1.8531 +
1.8532 + INFO_PRINTF1(_L(">> The GSM610 to PCM16 codec stores data between calls to ProcessL"));
1.8533 + TRAPD(err, testOK = TestRepositionL(codecUid, src, KGSM610ToPCM16OptimumDst));
1.8534 +
1.8535 + if (err)
1.8536 + {
1.8537 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8538 + return EFail;
1.8539 + }
1.8540 + else if (!testOK)
1.8541 + {
1.8542 + INFO_PRINTF1(_L("Test failed"));
1.8543 + return EFail;
1.8544 + }
1.8545 + else
1.8546 + return EPass;
1.8547 + }
1.8548 +
1.8549 +//------------------------------------------------------------------
1.8550 +
1.8551 +/** @xxxx
1.8552 + * Constructor
1.8553 + */
1.8554 +CTest_MMF_ACOD_U_0167::CTest_MMF_ACOD_U_0167()
1.8555 + {
1.8556 + // store the name of this test case
1.8557 + // this is the name that is used by the script file
1.8558 + // Each test step initialises it's own name
1.8559 + iTestStepName = _L("MM-MMF-ACOD-U-0167-HP");
1.8560 + }
1.8561 +
1.8562 +/** @xxxx
1.8563 + * PCM16 to GSM610 Instantiate codec by FourCC Codes
1.8564 + * @test Req. under test REQ172.6.2, REQ172.11.20
1.8565 + */
1.8566 +TVerdict CTest_MMF_ACOD_U_0167::DoTestStepL()
1.8567 + {
1.8568 + TBool testOK = EFalse;
1.8569 + TRAPD(err, testOK = TestNewL(KMMFFourCCCodePCM16, KMMFFourCCCodeGSM610));
1.8570 +
1.8571 + if (err)
1.8572 + {
1.8573 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8574 + return EFail;
1.8575 + }
1.8576 + else if (!testOK)
1.8577 + {
1.8578 + INFO_PRINTF1(_L("Test failed"));
1.8579 + return EFail;
1.8580 + }
1.8581 + else
1.8582 + return EPass;
1.8583 + }
1.8584 +
1.8585 +//------------------------------------------------------------------
1.8586 +
1.8587 +/** @xxxx
1.8588 + * Constructor
1.8589 + */
1.8590 +CTest_MMF_ACOD_U_0168::CTest_MMF_ACOD_U_0168()
1.8591 + {
1.8592 + // store the name of this test case
1.8593 + // this is the name that is used by the script file
1.8594 + // Each test step initialises it's own name
1.8595 + iTestStepName = _L("MM-MMF-ACOD-U-0168-HP");
1.8596 + }
1.8597 +
1.8598 +/** @xxxx
1.8599 + * PCM16 to GSM610 Instantiate codec by UID
1.8600 + * @test Req. under test REQ172.6.1, REQ172.11.20
1.8601 + */
1.8602 +TVerdict CTest_MMF_ACOD_U_0168::DoTestStepL()
1.8603 + {
1.8604 + const TUid codecUid = {KMmfUidCodecPCM16ToGSM610};
1.8605 + TBool testOK = EFalse;
1.8606 + TRAPD(err, testOK = TestNewL(codecUid));
1.8607 +
1.8608 + if (err)
1.8609 + {
1.8610 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8611 + return EFail;
1.8612 + }
1.8613 + else if (!testOK)
1.8614 + {
1.8615 + INFO_PRINTF1(_L("Test failed"));
1.8616 + return EFail;
1.8617 + }
1.8618 + else
1.8619 + return EPass;
1.8620 + }
1.8621 +
1.8622 +//------------------------------------------------------------------
1.8623 +
1.8624 +/** @xxxx
1.8625 + * Constructor
1.8626 + */
1.8627 +CTest_MMF_ACOD_U_0169::CTest_MMF_ACOD_U_0169()
1.8628 + {
1.8629 + // store the name of this test case
1.8630 + // this is the name that is used by the script file
1.8631 + // Each test step initialises it's own name
1.8632 + iTestStepName = _L("MM-MMF-ACOD-U-0169-HP");
1.8633 + iHeapSize = 0x20000;
1.8634 +
1.8635 + for (TUint i=0; i<5; i++)
1.8636 + {
1.8637 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.8638 + }
1.8639 + }
1.8640 +
1.8641 +/** @xxxx
1.8642 + * GSM610 to PCM16 Pass in small source buffers
1.8643 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8644 + */
1.8645 +TVerdict CTest_MMF_ACOD_U_0169::DoTestStepL()
1.8646 + {
1.8647 + const TUid codecUid = {KMmfUidCodecPCM16ToGSM610};
1.8648 + TBool testOK = EFalse;
1.8649 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KSmallBufferSizeGSM, KPCM16ToGSM610OptimumDstGSM, 0, EFalse));
1.8650 +
1.8651 + if (err)
1.8652 + {
1.8653 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8654 + return EFail;
1.8655 + }
1.8656 + else if (!testOK)
1.8657 + {
1.8658 + INFO_PRINTF1(_L("Test failed"));
1.8659 + return EFail;
1.8660 + }
1.8661 + else
1.8662 + return EPass;
1.8663 + }
1.8664 +
1.8665 +//------------------------------------------------------------------
1.8666 +
1.8667 +/** @xxxx
1.8668 + * Constructor
1.8669 + */
1.8670 +CTest_MMF_ACOD_U_0170::CTest_MMF_ACOD_U_0170()
1.8671 + {
1.8672 + // store the name of this test case
1.8673 + // this is the name that is used by the script file
1.8674 + // Each test step initialises it's own name
1.8675 + iTestStepName = _L("MM-MMF-ACOD-U-0170-HP");
1.8676 +
1.8677 + iExpectedLeaveErrorCode = KErrArgument;
1.8678 + }
1.8679 +
1.8680 +/** @xxxx
1.8681 + * PCM16 to GSM610 Pass in small dest buffers
1.8682 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8683 + */
1.8684 +TVerdict CTest_MMF_ACOD_U_0170::DoTestStepL()
1.8685 + {
1.8686 + const TUid codecUid = {KMmfUidCodecPCM16ToGSM610};
1.8687 + TBool testOK = EFalse;
1.8688 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToGSM610OptimumSrc, KSmallBufferSize, 0, EFalse));
1.8689 +
1.8690 + if (err)
1.8691 + {
1.8692 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8693 + return EFail;
1.8694 + }
1.8695 + else if (!testOK)
1.8696 + {
1.8697 + INFO_PRINTF1(_L("Test failed"));
1.8698 + return EFail;
1.8699 + }
1.8700 + else
1.8701 + return EPass;
1.8702 + }
1.8703 +
1.8704 +//------------------------------------------------------------------
1.8705 +
1.8706 +/** @xxxx
1.8707 + * Constructor
1.8708 + */
1.8709 +CTest_MMF_ACOD_U_0171::CTest_MMF_ACOD_U_0171()
1.8710 + {
1.8711 + // store the name of this test case
1.8712 + // this is the name that is used by the script file
1.8713 + // Each test step initialises it's own name
1.8714 + iTestStepName = _L("MM-MMF-ACOD-U-0171-HP");
1.8715 + iHeapSize = 0x20000;
1.8716 + for (TUint i=0; i<5; i++)
1.8717 + {
1.8718 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.8719 + }
1.8720 + }
1.8721 +
1.8722 +/** @xxxx
1.8723 + * PCM16 to GSM610 Pass in large buffers
1.8724 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8725 + */
1.8726 +TVerdict CTest_MMF_ACOD_U_0171::DoTestStepL()
1.8727 + {
1.8728 + const TUid codecUid = {KMmfUidCodecPCM16ToGSM610};
1.8729 + TBool testOK = EFalse;
1.8730 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KLargeBufferSize, KLargeBufferSize, 0, EFalse));
1.8731 +
1.8732 + if (err)
1.8733 + {
1.8734 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8735 + return EFail;
1.8736 + }
1.8737 + else if (!testOK)
1.8738 + {
1.8739 + INFO_PRINTF1(_L("Test failed"));
1.8740 + return EFail;
1.8741 + }
1.8742 + else
1.8743 + return EPass;
1.8744 + }
1.8745 +
1.8746 +//------------------------------------------------------------------
1.8747 +
1.8748 +/** @xxxx
1.8749 + * Constructor
1.8750 + */
1.8751 +CTest_MMF_ACOD_U_0172::CTest_MMF_ACOD_U_0172()
1.8752 + {
1.8753 + // store the name of this test case
1.8754 + // this is the name that is used by the script file
1.8755 + // Each test step initialises it's own name
1.8756 + iTestStepName = _L("MM-MMF-ACOD-U-0172-HP");
1.8757 +
1.8758 + for (TUint i=0; i<5; i++)
1.8759 + {
1.8760 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.8761 + }
1.8762 + }
1.8763 +
1.8764 +/** @xxxx
1.8765 + * PCM16 to GSM610 Pass in default sized buffers
1.8766 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8767 + */
1.8768 +TVerdict CTest_MMF_ACOD_U_0172::DoTestStepL()
1.8769 + {
1.8770 + const TUid codecUid = {KMmfUidCodecPCM16ToGSM610};
1.8771 + TBool testOK = EFalse;
1.8772 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KDefaultBufferSize, KDefaultBufferSize, 0, EFalse));
1.8773 +
1.8774 + if (err)
1.8775 + {
1.8776 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8777 + return EFail;
1.8778 + }
1.8779 + else if (!testOK)
1.8780 + {
1.8781 + INFO_PRINTF1(_L("Test failed"));
1.8782 + return EFail;
1.8783 + }
1.8784 + else
1.8785 + return EPass;
1.8786 + }
1.8787 +
1.8788 +//------------------------------------------------------------------
1.8789 +
1.8790 +/** @xxxx
1.8791 + * Constructor
1.8792 + */
1.8793 +CTest_MMF_ACOD_U_0173::CTest_MMF_ACOD_U_0173()
1.8794 + {
1.8795 + // store the name of this test case
1.8796 + // this is the name that is used by the script file
1.8797 + // Each test step initialises it's own name
1.8798 + iTestStepName = _L("MM-MMF-ACOD-U-0173-HP");
1.8799 +
1.8800 + for (TUint i=0; i<5; i++)
1.8801 + {
1.8802 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.8803 + }
1.8804 + }
1.8805 +
1.8806 +/** @xxxx
1.8807 + * PCM16 to GSM610 Pass in buffers with different max length and length
1.8808 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8809 + */
1.8810 +TVerdict CTest_MMF_ACOD_U_0173::DoTestStepL()
1.8811 + {
1.8812 + const TUid codecUid = {KMmfUidCodecPCM16ToGSM610};
1.8813 + TBool testOK = EFalse;
1.8814 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMaxBufferLength, KDefaultBufferSize, KDefaultBufferSize, EFalse));
1.8815 +
1.8816 + if (err)
1.8817 + {
1.8818 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8819 + return EFail;
1.8820 + }
1.8821 + else if (!testOK)
1.8822 + {
1.8823 + INFO_PRINTF1(_L("Test failed"));
1.8824 + return EFail;
1.8825 + }
1.8826 + else
1.8827 + return EPass;
1.8828 + }
1.8829 +
1.8830 +//------------------------------------------------------------------
1.8831 +
1.8832 +/** @xxxx
1.8833 + * Constructor
1.8834 + */
1.8835 +CTest_MMF_ACOD_U_0174::CTest_MMF_ACOD_U_0174()
1.8836 + {
1.8837 + // store the name of this test case
1.8838 + // this is the name that is used by the script file
1.8839 + // Each test step initialises it's own name
1.8840 + iTestStepName = _L("MM-MMF-ACOD-U-0174-HP");
1.8841 + iSingleIteration = ETrue;
1.8842 +
1.8843 + for (TUint i=0; i<5; i++)
1.8844 + {
1.8845 + iExpectedSrcBytesProcessed[i] = 0xA00;
1.8846 + iExpectedDstBytesAdded[i] = 0x104;
1.8847 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EProcessComplete;
1.8848 + }
1.8849 + }
1.8850 +
1.8851 +/** @xxxx
1.8852 + * PCM16 to GSM610 Pass in buffers of optimum size
1.8853 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.8854 + */
1.8855 +TVerdict CTest_MMF_ACOD_U_0174::DoTestStepL()
1.8856 + {
1.8857 + const TUid codecUid = {KMmfUidCodecPCM16ToGSM610};
1.8858 + TBool testOK = EFalse;
1.8859 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToGSM610OptimumSrc, KPCM16ToGSM610OptimumDst));
1.8860 +
1.8861 + if (err)
1.8862 + {
1.8863 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8864 + return EFail;
1.8865 + }
1.8866 + else if (!testOK)
1.8867 + {
1.8868 + INFO_PRINTF1(_L("Test failed"));
1.8869 + return EFail;
1.8870 + }
1.8871 + else
1.8872 + return EPass;
1.8873 + }
1.8874 +
1.8875 +//------------------------------------------------------------------
1.8876 +
1.8877 +/** @xxxx
1.8878 + * Constructor
1.8879 + */
1.8880 +CTest_MMF_ACOD_U_0175::CTest_MMF_ACOD_U_0175()
1.8881 + {
1.8882 + // store the name of this test case
1.8883 + // this is the name that is used by the script file
1.8884 + // Each test step initialises it's own name
1.8885 + iTestStepName = _L("MM-MMF-ACOD-U-0175-HP");
1.8886 + }
1.8887 +
1.8888 +/** @xxxx
1.8889 + * PCM16 to GSM610 Reposition source pointer during conversion
1.8890 + * @test Req. under test REQ172.11
1.8891 + */
1.8892 +TVerdict CTest_MMF_ACOD_U_0175::DoTestStepL()
1.8893 + {
1.8894 + const TUid codecUid = {KMmfUidCodecPCM16ToGSM610};
1.8895 + TBool testOK = EFalse;
1.8896 +
1.8897 + TUint src = (KPCM16ToGSM610OptimumSrc/4) + 10;
1.8898 +
1.8899 + INFO_PRINTF1(_L(">> The PCM16 to GSM610 codec stores data between calls to ProcessL"));
1.8900 + TRAPD(err, testOK = TestRepositionL(codecUid, src, KPCM16ToGSM610OptimumDst));
1.8901 +
1.8902 + if (err)
1.8903 + {
1.8904 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.8905 + return EFail;
1.8906 + }
1.8907 + else if (!testOK)
1.8908 + {
1.8909 + INFO_PRINTF1(_L("Test failed"));
1.8910 + return EFail;
1.8911 + }
1.8912 + else
1.8913 + return EPass;
1.8914 + }
1.8915 +
1.8916 +//------------------------------------------------------------------
1.8917 +
1.8918 +/** @xxxx
1.8919 + * Constructor
1.8920 + */
1.8921 +CTest_MMF_ACOD_U_0176::CTest_MMF_ACOD_U_0176()
1.8922 + {
1.8923 + // store the name of this test case
1.8924 + // this is the name that is used by the script file
1.8925 + // Each test step initialises it's own name
1.8926 + iTestStepName = _L("MM-MMF-ACOD-U-0176-HP");
1.8927 + }
1.8928 +
1.8929 +/** @xxxx
1.8930 + * Instantiate codec that doesn't exist
1.8931 + * @test Req. under test REQ172.11
1.8932 + */
1.8933 +TVerdict CTest_MMF_ACOD_U_0176::DoTestStepL()
1.8934 + {
1.8935 +// CMMFCodec* codec = NULL;
1.8936 +// TRAPD(err, codec = CMMFCodec::NewL(KMMFFourCCCodeALAW, KMMFFourCCCodePCMU16B));
1.8937 + TRAPD(err, CMMFCodec::NewL(KMMFFourCCCodeALAW, KMMFFourCCCodePCMU16B)); // EABI warning removal - "variable was set but never used"
1.8938 +
1.8939 + if (err == KErrNone || err == KErrNotSupported)
1.8940 + return EPass;
1.8941 + else
1.8942 + {
1.8943 + ERR_PRINTF2(_L(">> CTest_MMF_ACOD_U_0176::DoTestStepL Leave occurred in NewL, error code %d"), err);
1.8944 + return EFail;
1.8945 + }
1.8946 + }
1.8947 +//------------------------------------------------------------------
1.8948 +
1.8949 +/** @xxxx
1.8950 + * Constructor
1.8951 + */
1.8952 +CTest_MMF_ACOD_U_0177::CTest_MMF_ACOD_U_0177()
1.8953 + {
1.8954 + // store the name of this test case
1.8955 + // this is the name that is used by the script file
1.8956 + // Each test step initialises it's own name
1.8957 + iTestStepName = _L("MM-MMF-ACOD-U-0177-HP");
1.8958 + }
1.8959 +
1.8960 +/** @xxxx
1.8961 + * Instantiate codec from fourCC codes that don't exist
1.8962 + * @test Req. under test REQ172.11
1.8963 + */
1.8964 +TVerdict CTest_MMF_ACOD_U_0177::DoTestStepL()
1.8965 + {
1.8966 + const TUint32 KFourCCCodeP1B = 0x42315020; //(' ', 'P', '1', 'B')
1.8967 + const TUint32 KFourCCCodePS16 = 0x36315350; //('P', 'S', '1', '6')
1.8968 +
1.8969 +// CMMFCodec* codec = NULL;
1.8970 +// TRAPD(err, codec = CMMFCodec::NewL(KFourCCCodeP1B, KFourCCCodePS16));
1.8971 + TRAPD(err, CMMFCodec::NewL(KFourCCCodeP1B, KFourCCCodePS16)); // EABI warning removal "variable was set but never used"
1.8972 +
1.8973 + if (err == KErrNone || err == KErrNotSupported)
1.8974 + return EPass;
1.8975 + else
1.8976 + {
1.8977 + ERR_PRINTF2(_L(">> CTest_MMF_ACOD_U_0177::DoTestStepL Leave occurred in NewL, error code %d"), err);
1.8978 + return EFail;
1.8979 + }
1.8980 + }
1.8981 +//------------------------------------------------------------------
1.8982 +
1.8983 +/** @xxxx
1.8984 + * Constructor
1.8985 + */
1.8986 +CTest_MMF_ACOD_U_0178::CTest_MMF_ACOD_U_0178()
1.8987 + {
1.8988 + // store the name of this test case
1.8989 + // this is the name that is used by the script file
1.8990 + // Each test step initialises it's own name
1.8991 + iTestStepName = _L("MM-MMF-ACOD-U-0178-HP");
1.8992 + }
1.8993 +
1.8994 +/** @xxxx
1.8995 + * Test out of memory in NewL
1.8996 + * @test Req. under test REQ172.11
1.8997 + */
1.8998 +TVerdict CTest_MMF_ACOD_U_0178::DoTestStepL()
1.8999 + {
1.9000 +// CMMFCodec* codec = NULL;
1.9001 + __UHEAP_FAILNEXT(1);
1.9002 +// TRAPD(err, codec = CMMFCodec::NewL(KMMFFourCCCodePCMU8, KMMFFourCCCodePCM16));
1.9003 + TRAPD(err, CMMFCodec::NewL(KMMFFourCCCodePCMU8, KMMFFourCCCodePCM16)); // EABI warning removal - "variable was set but never used"
1.9004 +
1.9005 + if (err == KErrNoMemory)
1.9006 + return EPass;
1.9007 + else
1.9008 + {
1.9009 + ERR_PRINTF2(_L(">> CTest_MMF_ACOD_U_0178::DoTestStepL Leave occurred in NewL, error code %d"), err);
1.9010 + return EFail;
1.9011 + }
1.9012 + }
1.9013 +//------------------------------------------------------------------
1.9014 +
1.9015 +/** @xxxx
1.9016 + * Constructor
1.9017 + */
1.9018 +CTest_MMF_ACOD_U_0179::CTest_MMF_ACOD_U_0179()
1.9019 + {
1.9020 + // store the name of this test case
1.9021 + // this is the name that is used by the script file
1.9022 + // Each test step initialises it's own name
1.9023 + iTestStepName = _L("MM-MMF-ACOD-U-0179-HP");
1.9024 +
1.9025 + for (TUint i=0; i<5; i++)
1.9026 + {
1.9027 + iExpectedSrcBytesProcessed[i] = 0;
1.9028 + iExpectedDstBytesAdded[i] = 0;
1.9029 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.9030 + }
1.9031 + }
1.9032 +
1.9033 +/** @xxxx
1.9034 + * ALAW To PCM16 Pass in zero sized source buffer
1.9035 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.9036 + */
1.9037 +TVerdict CTest_MMF_ACOD_U_0179::DoTestStepL()
1.9038 + {
1.9039 + const TUid codecUid = {KMmfUidCodecAlawToPCM16};
1.9040 + TBool testOK = EFalse;
1.9041 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KAlawToPCM16OptimumDst));
1.9042 +
1.9043 + if (err)
1.9044 + {
1.9045 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9046 + return EFail;
1.9047 + }
1.9048 + else if (!testOK)
1.9049 + {
1.9050 + INFO_PRINTF1(_L("Test failed"));
1.9051 + return EFail;
1.9052 + }
1.9053 + else
1.9054 + return EPass;
1.9055 + }
1.9056 +
1.9057 +//------------------------------------------------------------------
1.9058 +
1.9059 +/** @xxxx
1.9060 + * Constructor
1.9061 + */
1.9062 +CTest_MMF_ACOD_U_0180::CTest_MMF_ACOD_U_0180()
1.9063 + {
1.9064 + // store the name of this test case
1.9065 + // this is the name that is used by the script file
1.9066 + // Each test step initialises it's own name
1.9067 + iTestStepName = _L("MM-MMF-ACOD-U-0180-HP");
1.9068 +
1.9069 + iExpectedLeaveErrorCode = KErrArgument;
1.9070 + }
1.9071 +
1.9072 +/** @xxxx
1.9073 + * ALAW To PCM16 Pass in zero sized destination buffer
1.9074 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.9075 + */
1.9076 +TVerdict CTest_MMF_ACOD_U_0180::DoTestStepL()
1.9077 + {
1.9078 + const TUid codecUid = {KMmfUidCodecAlawToPCM16};
1.9079 + TBool testOK = EFalse;
1.9080 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KAlawToPCM16OptimumSrc, 0));
1.9081 +
1.9082 + if (err)
1.9083 + {
1.9084 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9085 + return EFail;
1.9086 + }
1.9087 + else if (!testOK)
1.9088 + {
1.9089 + INFO_PRINTF1(_L("Test failed"));
1.9090 + return EFail;
1.9091 + }
1.9092 + else
1.9093 + return EPass;
1.9094 + }
1.9095 +
1.9096 +//------------------------------------------------------------------
1.9097 +
1.9098 +/** @xxxx
1.9099 + * Constructor
1.9100 + */
1.9101 +CTest_MMF_ACOD_U_0181::CTest_MMF_ACOD_U_0181()
1.9102 + {
1.9103 + // store the name of this test case
1.9104 + // this is the name that is used by the script file
1.9105 + // Each test step initialises it's own name
1.9106 + iTestStepName = _L("MM-MMF-ACOD-U-0181-HP");
1.9107 + }
1.9108 +
1.9109 +/** @xxxx
1.9110 + * ALAW To PCM16 Test out of memory
1.9111 + * @test Req. under test REQ172.11
1.9112 + */
1.9113 +TVerdict CTest_MMF_ACOD_U_0181::DoTestStepL()
1.9114 + {
1.9115 + const TUid codecUid = {KMmfUidCodecAlawToPCM16};
1.9116 + TBool testOK = EFalse;
1.9117 +
1.9118 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.9119 + if (err==KErrNone && testOK)
1.9120 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.9121 +
1.9122 + if (err)
1.9123 + {
1.9124 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9125 + return EFail;
1.9126 + }
1.9127 + else if (!testOK)
1.9128 + {
1.9129 + INFO_PRINTF1(_L("Test failed"));
1.9130 + return EFail;
1.9131 + }
1.9132 + else
1.9133 + return EPass;
1.9134 + }
1.9135 +
1.9136 +//------------------------------------------------------------------
1.9137 +
1.9138 +
1.9139 +/** @xxxx
1.9140 + * Constructor
1.9141 + */
1.9142 +CTest_MMF_ACOD_U_0182::CTest_MMF_ACOD_U_0182()
1.9143 + {
1.9144 + // store the name of this test case
1.9145 + // this is the name that is used by the script file
1.9146 + // Each test step initialises it's own name
1.9147 + iTestStepName = _L("MM-MMF-ACOD-U-0182-HP");
1.9148 + }
1.9149 +
1.9150 +/** @xxxx
1.9151 + * ALAW To PCM16 Test for memory leaks
1.9152 + * @test Req. under test REQ172.11
1.9153 + */
1.9154 +TVerdict CTest_MMF_ACOD_U_0182::DoTestStepL()
1.9155 + {
1.9156 + const TUid codecUid = {KMmfUidCodecAlawToPCM16};
1.9157 + TBool testOK = EFalse;
1.9158 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.9159 +
1.9160 + if (err)
1.9161 + {
1.9162 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9163 + return EFail;
1.9164 + }
1.9165 + else if (!testOK)
1.9166 + {
1.9167 + INFO_PRINTF1(_L("Test failed"));
1.9168 + return EFail;
1.9169 + }
1.9170 + else
1.9171 + return EPass;
1.9172 + }
1.9173 +
1.9174 +//------------------------------------------------------------------
1.9175 +
1.9176 +
1.9177 +/** @xxxx
1.9178 + * Constructor
1.9179 + */
1.9180 +CTest_MMF_ACOD_U_0183::CTest_MMF_ACOD_U_0183()
1.9181 + {
1.9182 + // store the name of this test case
1.9183 + // this is the name that is used by the script file
1.9184 + // Each test step initialises it's own name
1.9185 + iTestStepName = _L("MM-MMF-ACOD-U-0183-HP");
1.9186 + }
1.9187 +
1.9188 +/** @xxxx
1.9189 + * ALAW To PCM16 Test for memory scribbles
1.9190 + * @test Req. under test REQ172.11
1.9191 + */
1.9192 +TVerdict CTest_MMF_ACOD_U_0183::DoTestStepL()
1.9193 + {
1.9194 + const TUid codecUid = {KMmfUidCodecAlawToPCM16};
1.9195 + TBool testOK = EFalse;
1.9196 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.9197 +
1.9198 + if (err)
1.9199 + {
1.9200 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9201 + return EFail;
1.9202 + }
1.9203 + else if (!testOK)
1.9204 + {
1.9205 + INFO_PRINTF1(_L("Test failed"));
1.9206 + return EFail;
1.9207 + }
1.9208 + else
1.9209 + return EPass;
1.9210 + }
1.9211 +
1.9212 +//------------------------------------------------------------------
1.9213 +
1.9214 +/** @xxxx
1.9215 + * Constructor
1.9216 + */
1.9217 +CTest_MMF_ACOD_U_0184::CTest_MMF_ACOD_U_0184()
1.9218 + {
1.9219 + // store the name of this test case
1.9220 + // this is the name that is used by the script file
1.9221 + // Each test step initialises it's own name
1.9222 + iTestStepName = _L("MM-MMF-ACOD-U-0184-HP");
1.9223 +
1.9224 + for (TUint i=0; i<5; i++)
1.9225 + {
1.9226 + iExpectedSrcBytesProcessed[i] = 0;
1.9227 + iExpectedDstBytesAdded[i] = 0;
1.9228 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.9229 + }
1.9230 + }
1.9231 +
1.9232 +/** @xxxx
1.9233 + * PCM16 to ALAW Pass in zero sized source buffer
1.9234 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.9235 + */
1.9236 +TVerdict CTest_MMF_ACOD_U_0184::DoTestStepL()
1.9237 + {
1.9238 + const TUid codecUid = {KMmfUidCodecPCM16ToAlaw};
1.9239 + TBool testOK = EFalse;
1.9240 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToAlawOptimumDst));
1.9241 +
1.9242 + if (err)
1.9243 + {
1.9244 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9245 + return EFail;
1.9246 + }
1.9247 + else if (!testOK)
1.9248 + {
1.9249 + INFO_PRINTF1(_L("Test failed"));
1.9250 + return EFail;
1.9251 + }
1.9252 + else
1.9253 + return EPass;
1.9254 + }
1.9255 +
1.9256 +//------------------------------------------------------------------
1.9257 +
1.9258 +/** @xxxx
1.9259 + * Constructor
1.9260 + */
1.9261 +CTest_MMF_ACOD_U_0185::CTest_MMF_ACOD_U_0185()
1.9262 + {
1.9263 + // store the name of this test case
1.9264 + // this is the name that is used by the script file
1.9265 + // Each test step initialises it's own name
1.9266 + iTestStepName = _L("MM-MMF-ACOD-U-0185-HP");
1.9267 +
1.9268 + iExpectedLeaveErrorCode = KErrArgument;
1.9269 + }
1.9270 +
1.9271 +/** @xxxx
1.9272 + * PCM16 to ALAW Pass in zero sized destination buffer
1.9273 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.9274 + */
1.9275 +TVerdict CTest_MMF_ACOD_U_0185::DoTestStepL()
1.9276 + {
1.9277 + const TUid codecUid = {KMmfUidCodecPCM16ToAlaw};
1.9278 + TBool testOK = EFalse;
1.9279 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToAlawOptimumSrc, 0));
1.9280 +
1.9281 + if (err)
1.9282 + {
1.9283 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9284 + return EFail;
1.9285 + }
1.9286 + else if (!testOK)
1.9287 + {
1.9288 + INFO_PRINTF1(_L("Test failed"));
1.9289 + return EFail;
1.9290 + }
1.9291 + else
1.9292 + return EPass;
1.9293 + }
1.9294 +
1.9295 +//------------------------------------------------------------------
1.9296 +
1.9297 +/** @xxxx
1.9298 + * Constructor
1.9299 + */
1.9300 +CTest_MMF_ACOD_U_0186::CTest_MMF_ACOD_U_0186()
1.9301 + {
1.9302 + // store the name of this test case
1.9303 + // this is the name that is used by the script file
1.9304 + // Each test step initialises it's own name
1.9305 + iTestStepName = _L("MM-MMF-ACOD-U-0186-HP");
1.9306 + }
1.9307 +
1.9308 +/** @xxxx
1.9309 + * PCM16 to ALAW Test out of memory
1.9310 + * @test Req. under test REQ172.11
1.9311 + */
1.9312 +TVerdict CTest_MMF_ACOD_U_0186::DoTestStepL()
1.9313 + {
1.9314 + const TUid codecUid = {KMmfUidCodecPCM16ToAlaw};
1.9315 + TBool testOK = EFalse;
1.9316 +
1.9317 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.9318 + if (err==KErrNone && testOK)
1.9319 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.9320 +
1.9321 + if (err)
1.9322 + {
1.9323 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9324 + return EFail;
1.9325 + }
1.9326 + else if (!testOK)
1.9327 + {
1.9328 + INFO_PRINTF1(_L("Test failed"));
1.9329 + return EFail;
1.9330 + }
1.9331 + else
1.9332 + return EPass;
1.9333 + }
1.9334 +
1.9335 +//------------------------------------------------------------------
1.9336 +
1.9337 +
1.9338 +/** @xxxx
1.9339 + * Constructor
1.9340 + */
1.9341 +CTest_MMF_ACOD_U_0187::CTest_MMF_ACOD_U_0187()
1.9342 + {
1.9343 + // store the name of this test case
1.9344 + // this is the name that is used by the script file
1.9345 + // Each test step initialises it's own name
1.9346 + iTestStepName = _L("MM-MMF-ACOD-U-0187-HP");
1.9347 + }
1.9348 +
1.9349 +/** @xxxx
1.9350 + * PCM16 to ALAW Test for memory leaks
1.9351 + * @test Req. under test REQ172.11
1.9352 + */
1.9353 +TVerdict CTest_MMF_ACOD_U_0187::DoTestStepL()
1.9354 + {
1.9355 + const TUid codecUid = {KMmfUidCodecPCM16ToAlaw};
1.9356 + TBool testOK = EFalse;
1.9357 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.9358 +
1.9359 + if (err)
1.9360 + {
1.9361 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9362 + return EFail;
1.9363 + }
1.9364 + else if (!testOK)
1.9365 + {
1.9366 + INFO_PRINTF1(_L("Test failed"));
1.9367 + return EFail;
1.9368 + }
1.9369 + else
1.9370 + return EPass;
1.9371 + }
1.9372 +
1.9373 +//------------------------------------------------------------------
1.9374 +
1.9375 +
1.9376 +/** @xxxx
1.9377 + * Constructor
1.9378 + */
1.9379 +CTest_MMF_ACOD_U_0188::CTest_MMF_ACOD_U_0188()
1.9380 + {
1.9381 + // store the name of this test case
1.9382 + // this is the name that is used by the script file
1.9383 + // Each test step initialises it's own name
1.9384 + iTestStepName = _L("MM-MMF-ACOD-U-0188-HP");
1.9385 + }
1.9386 +
1.9387 +/** @xxxx
1.9388 + * PCM16 to ALAW Test for memory scribbles
1.9389 + * @test Req. under test REQ172.11
1.9390 + */
1.9391 +TVerdict CTest_MMF_ACOD_U_0188::DoTestStepL()
1.9392 + {
1.9393 + const TUid codecUid = {KMmfUidCodecPCM16ToAlaw};
1.9394 + TBool testOK = EFalse;
1.9395 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.9396 +
1.9397 + if (err)
1.9398 + {
1.9399 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9400 + return EFail;
1.9401 + }
1.9402 + else if (!testOK)
1.9403 + {
1.9404 + INFO_PRINTF1(_L("Test failed"));
1.9405 + return EFail;
1.9406 + }
1.9407 + else
1.9408 + return EPass;
1.9409 + }
1.9410 +
1.9411 +//------------------------------------------------------------------
1.9412 +
1.9413 +/** @xxxx
1.9414 + * Constructor
1.9415 + */
1.9416 +CTest_MMF_ACOD_U_0189::CTest_MMF_ACOD_U_0189()
1.9417 + {
1.9418 + // store the name of this test case
1.9419 + // this is the name that is used by the script file
1.9420 + // Each test step initialises it's own name
1.9421 + iTestStepName = _L("MM-MMF-ACOD-U-0189-HP");
1.9422 +
1.9423 + for (TUint i=0; i<5; i++)
1.9424 + {
1.9425 + iExpectedSrcBytesProcessed[i] = 0;
1.9426 + iExpectedDstBytesAdded[i] = 0;
1.9427 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.9428 + }
1.9429 + }
1.9430 +
1.9431 +/** @xxxx
1.9432 + * PCM8 To PCM16 Pass in zero sized source buffer
1.9433 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.9434 + */
1.9435 +TVerdict CTest_MMF_ACOD_U_0189::DoTestStepL()
1.9436 + {
1.9437 + const TUid codecUid = {KMmfUidCodecPCM8ToPCM16};
1.9438 + TBool testOK = EFalse;
1.9439 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM8ToPCM16OptimumDst));
1.9440 +
1.9441 + if (err)
1.9442 + {
1.9443 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9444 + return EFail;
1.9445 + }
1.9446 + else if (!testOK)
1.9447 + {
1.9448 + INFO_PRINTF1(_L("Test failed"));
1.9449 + return EFail;
1.9450 + }
1.9451 + else
1.9452 + return EPass;
1.9453 + }
1.9454 +
1.9455 +//------------------------------------------------------------------
1.9456 +
1.9457 +/** @xxxx
1.9458 + * Constructor
1.9459 + */
1.9460 +CTest_MMF_ACOD_U_0190::CTest_MMF_ACOD_U_0190()
1.9461 + {
1.9462 + // store the name of this test case
1.9463 + // this is the name that is used by the script file
1.9464 + // Each test step initialises it's own name
1.9465 + iTestStepName = _L("MM-MMF-ACOD-U-0190-HP");
1.9466 +
1.9467 + iExpectedLeaveErrorCode = KErrArgument;
1.9468 + }
1.9469 +
1.9470 +/** @xxxx
1.9471 + * PCM8 To PCM16 Pass in zero sized destination buffer
1.9472 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.9473 + */
1.9474 +TVerdict CTest_MMF_ACOD_U_0190::DoTestStepL()
1.9475 + {
1.9476 + const TUid codecUid = {KMmfUidCodecPCM8ToPCM16};
1.9477 + TBool testOK = EFalse;
1.9478 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM8ToPCM16OptimumSrc, 0));
1.9479 +
1.9480 + if (err)
1.9481 + {
1.9482 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9483 + return EFail;
1.9484 + }
1.9485 + else if (!testOK)
1.9486 + {
1.9487 + INFO_PRINTF1(_L("Test failed"));
1.9488 + return EFail;
1.9489 + }
1.9490 + else
1.9491 + return EPass;
1.9492 + }
1.9493 +
1.9494 +//------------------------------------------------------------------
1.9495 +
1.9496 +/** @xxxx
1.9497 + * Constructor
1.9498 + */
1.9499 +CTest_MMF_ACOD_U_0191::CTest_MMF_ACOD_U_0191()
1.9500 + {
1.9501 + // store the name of this test case
1.9502 + // this is the name that is used by the script file
1.9503 + // Each test step initialises it's own name
1.9504 + iTestStepName = _L("MM-MMF-ACOD-U-0191-HP");
1.9505 + }
1.9506 +
1.9507 +/** @xxxx
1.9508 + * PCM8 To PCM16 Test out of memory
1.9509 + * @test Req. under test REQ172.11
1.9510 + */
1.9511 +TVerdict CTest_MMF_ACOD_U_0191::DoTestStepL()
1.9512 + {
1.9513 + const TUid codecUid = {KMmfUidCodecPCM8ToPCM16};
1.9514 + TBool testOK = EFalse;
1.9515 +
1.9516 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.9517 + if (err==KErrNone && testOK)
1.9518 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.9519 +
1.9520 + if (err)
1.9521 + {
1.9522 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9523 + return EFail;
1.9524 + }
1.9525 + else if (!testOK)
1.9526 + {
1.9527 + INFO_PRINTF1(_L("Test failed"));
1.9528 + return EFail;
1.9529 + }
1.9530 + else
1.9531 + return EPass;
1.9532 + }
1.9533 +
1.9534 +//------------------------------------------------------------------
1.9535 +
1.9536 +
1.9537 +/** @xxxx
1.9538 + * Constructor
1.9539 + */
1.9540 +CTest_MMF_ACOD_U_0192::CTest_MMF_ACOD_U_0192()
1.9541 + {
1.9542 + // store the name of this test case
1.9543 + // this is the name that is used by the script file
1.9544 + // Each test step initialises it's own name
1.9545 + iTestStepName = _L("MM-MMF-ACOD-U-0192-HP");
1.9546 + }
1.9547 +
1.9548 +/** @xxxx
1.9549 + * PCM8 To PCM16 Test for memory leaks
1.9550 + * @test Req. under test REQ172.11
1.9551 + */
1.9552 +TVerdict CTest_MMF_ACOD_U_0192::DoTestStepL()
1.9553 + {
1.9554 + const TUid codecUid = {KMmfUidCodecPCM8ToPCM16};
1.9555 + TBool testOK = EFalse;
1.9556 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.9557 +
1.9558 + if (err)
1.9559 + {
1.9560 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9561 + return EFail;
1.9562 + }
1.9563 + else if (!testOK)
1.9564 + {
1.9565 + INFO_PRINTF1(_L("Test failed"));
1.9566 + return EFail;
1.9567 + }
1.9568 + else
1.9569 + return EPass;
1.9570 + }
1.9571 +
1.9572 +//------------------------------------------------------------------
1.9573 +
1.9574 +
1.9575 +/** @xxxx
1.9576 + * Constructor
1.9577 + */
1.9578 +CTest_MMF_ACOD_U_0193::CTest_MMF_ACOD_U_0193()
1.9579 + {
1.9580 + // store the name of this test case
1.9581 + // this is the name that is used by the script file
1.9582 + // Each test step initialises it's own name
1.9583 + iTestStepName = _L("MM-MMF-ACOD-U-0193-HP");
1.9584 + }
1.9585 +
1.9586 +/** @xxxx
1.9587 + * PCM8 To PCM16 Test for memory scribbles
1.9588 + * @test Req. under test REQ172.11
1.9589 + */
1.9590 +TVerdict CTest_MMF_ACOD_U_0193::DoTestStepL()
1.9591 + {
1.9592 + const TUid codecUid = {KMmfUidCodecPCM8ToPCM16};
1.9593 + TBool testOK = EFalse;
1.9594 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.9595 +
1.9596 + if (err)
1.9597 + {
1.9598 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9599 + return EFail;
1.9600 + }
1.9601 + else if (!testOK)
1.9602 + {
1.9603 + INFO_PRINTF1(_L("Test failed"));
1.9604 + return EFail;
1.9605 + }
1.9606 + else
1.9607 + return EPass;
1.9608 + }
1.9609 +
1.9610 +//------------------------------------------------------------------
1.9611 +
1.9612 +/** @xxxx
1.9613 + * Constructor
1.9614 + */
1.9615 +CTest_MMF_ACOD_U_0194::CTest_MMF_ACOD_U_0194()
1.9616 + {
1.9617 + // store the name of this test case
1.9618 + // this is the name that is used by the script file
1.9619 + // Each test step initialises it's own name
1.9620 + iTestStepName = _L("MM-MMF-ACOD-U-0194-HP");
1.9621 +
1.9622 + for (TUint i=0; i<5; i++)
1.9623 + {
1.9624 + iExpectedSrcBytesProcessed[i] = 0;
1.9625 + iExpectedDstBytesAdded[i] = 0;
1.9626 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.9627 + }
1.9628 + }
1.9629 +
1.9630 +/** @xxxx
1.9631 + * PCM16 to PCM8 Pass in zero sized source buffer
1.9632 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.9633 + */
1.9634 +TVerdict CTest_MMF_ACOD_U_0194::DoTestStepL()
1.9635 + {
1.9636 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8};
1.9637 + TBool testOK = EFalse;
1.9638 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToPCM8OptimumDst));
1.9639 +
1.9640 + if (err)
1.9641 + {
1.9642 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9643 + return EFail;
1.9644 + }
1.9645 + else if (!testOK)
1.9646 + {
1.9647 + INFO_PRINTF1(_L("Test failed"));
1.9648 + return EFail;
1.9649 + }
1.9650 + else
1.9651 + return EPass;
1.9652 + }
1.9653 +
1.9654 +//------------------------------------------------------------------
1.9655 +
1.9656 +/** @xxxx
1.9657 + * Constructor
1.9658 + */
1.9659 +CTest_MMF_ACOD_U_0195::CTest_MMF_ACOD_U_0195()
1.9660 + {
1.9661 + // store the name of this test case
1.9662 + // this is the name that is used by the script file
1.9663 + // Each test step initialises it's own name
1.9664 + iTestStepName = _L("MM-MMF-ACOD-U-0195-HP");
1.9665 +
1.9666 + iExpectedLeaveErrorCode = KErrArgument;
1.9667 + }
1.9668 +
1.9669 +/** @xxxx
1.9670 + * PCM16 to PCM8 Pass in zero sized destination buffer
1.9671 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.9672 + */
1.9673 +TVerdict CTest_MMF_ACOD_U_0195::DoTestStepL()
1.9674 + {
1.9675 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8};
1.9676 + TBool testOK = EFalse;
1.9677 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCM8OptimumSrc, 0));
1.9678 +
1.9679 + if (err)
1.9680 + {
1.9681 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9682 + return EFail;
1.9683 + }
1.9684 + else if (!testOK)
1.9685 + {
1.9686 + INFO_PRINTF1(_L("Test failed"));
1.9687 + return EFail;
1.9688 + }
1.9689 + else
1.9690 + return EPass;
1.9691 + }
1.9692 +
1.9693 +//------------------------------------------------------------------
1.9694 +
1.9695 +/** @xxxx
1.9696 + * Constructor
1.9697 + */
1.9698 +CTest_MMF_ACOD_U_0196::CTest_MMF_ACOD_U_0196()
1.9699 + {
1.9700 + // store the name of this test case
1.9701 + // this is the name that is used by the script file
1.9702 + // Each test step initialises it's own name
1.9703 + iTestStepName = _L("MM-MMF-ACOD-U-0196-HP");
1.9704 + }
1.9705 +
1.9706 +/** @xxxx
1.9707 + * PCM16 to PCM8 Test out of memory
1.9708 + * @test Req. under test REQ172.11
1.9709 + */
1.9710 +TVerdict CTest_MMF_ACOD_U_0196::DoTestStepL()
1.9711 + {
1.9712 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8};
1.9713 + TBool testOK = EFalse;
1.9714 +
1.9715 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.9716 + if (err==KErrNone && testOK)
1.9717 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.9718 +
1.9719 + if (err)
1.9720 + {
1.9721 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9722 + return EFail;
1.9723 + }
1.9724 + else if (!testOK)
1.9725 + {
1.9726 + INFO_PRINTF1(_L("Test failed"));
1.9727 + return EFail;
1.9728 + }
1.9729 + else
1.9730 + return EPass;
1.9731 + }
1.9732 +
1.9733 +//------------------------------------------------------------------
1.9734 +
1.9735 +
1.9736 +/** @xxxx
1.9737 + * Constructor
1.9738 + */
1.9739 +CTest_MMF_ACOD_U_0197::CTest_MMF_ACOD_U_0197()
1.9740 + {
1.9741 + // store the name of this test case
1.9742 + // this is the name that is used by the script file
1.9743 + // Each test step initialises it's own name
1.9744 + iTestStepName = _L("MM-MMF-ACOD-U-0197-HP");
1.9745 + }
1.9746 +
1.9747 +/** @xxxx
1.9748 + * PCM16 to PCM8 Test for memory leaks
1.9749 + * @test Req. under test REQ172.11
1.9750 + */
1.9751 +TVerdict CTest_MMF_ACOD_U_0197::DoTestStepL()
1.9752 + {
1.9753 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8};
1.9754 + TBool testOK = EFalse;
1.9755 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.9756 +
1.9757 + if (err)
1.9758 + {
1.9759 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9760 + return EFail;
1.9761 + }
1.9762 + else if (!testOK)
1.9763 + {
1.9764 + INFO_PRINTF1(_L("Test failed"));
1.9765 + return EFail;
1.9766 + }
1.9767 + else
1.9768 + return EPass;
1.9769 + }
1.9770 +
1.9771 +//------------------------------------------------------------------
1.9772 +
1.9773 +
1.9774 +/** @xxxx
1.9775 + * Constructor
1.9776 + */
1.9777 +CTest_MMF_ACOD_U_0198::CTest_MMF_ACOD_U_0198()
1.9778 + {
1.9779 + // store the name of this test case
1.9780 + // this is the name that is used by the script file
1.9781 + // Each test step initialises it's own name
1.9782 + iTestStepName = _L("MM-MMF-ACOD-U-0198-HP");
1.9783 + }
1.9784 +
1.9785 +/** @xxxx
1.9786 + * PCM16 to PCM8 Test for memory scribbles
1.9787 + * @test Req. under test REQ172.11
1.9788 + */
1.9789 +TVerdict CTest_MMF_ACOD_U_0198::DoTestStepL()
1.9790 + {
1.9791 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMS8};
1.9792 + TBool testOK = EFalse;
1.9793 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.9794 +
1.9795 + if (err)
1.9796 + {
1.9797 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9798 + return EFail;
1.9799 + }
1.9800 + else if (!testOK)
1.9801 + {
1.9802 + INFO_PRINTF1(_L("Test failed"));
1.9803 + return EFail;
1.9804 + }
1.9805 + else
1.9806 + return EPass;
1.9807 + }
1.9808 +
1.9809 +//------------------------------------------------------------------
1.9810 +
1.9811 +/** @xxxx
1.9812 + * Constructor
1.9813 + */
1.9814 +CTest_MMF_ACOD_U_0199::CTest_MMF_ACOD_U_0199()
1.9815 + {
1.9816 + // store the name of this test case
1.9817 + // this is the name that is used by the script file
1.9818 + // Each test step initialises it's own name
1.9819 + iTestStepName = _L("MM-MMF-ACOD-U-0199-HP");
1.9820 +
1.9821 + for (TUint i=0; i<5; i++)
1.9822 + {
1.9823 + iExpectedSrcBytesProcessed[i] = 0;
1.9824 + iExpectedDstBytesAdded[i] = 0;
1.9825 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.9826 + }
1.9827 + }
1.9828 +
1.9829 +/** @xxxx
1.9830 + * Swap Endian Pass in zero sized source buffer
1.9831 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.9832 + */
1.9833 +TVerdict CTest_MMF_ACOD_U_0199::DoTestStepL()
1.9834 + {
1.9835 + //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian};
1.9836 + const TUid codecUid = {KMMFUidCodecPCM16toPCM16B};
1.9837 + TBool testOK = EFalse;
1.9838 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToPCM16BOptimumDst));
1.9839 +
1.9840 + if (err)
1.9841 + {
1.9842 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9843 + return EFail;
1.9844 + }
1.9845 + else if (!testOK)
1.9846 + {
1.9847 + INFO_PRINTF1(_L("Test failed"));
1.9848 + return EFail;
1.9849 + }
1.9850 + else
1.9851 + return EPass;
1.9852 + }
1.9853 +
1.9854 +//------------------------------------------------------------------
1.9855 +
1.9856 +/** @xxxx
1.9857 + * Constructor
1.9858 + */
1.9859 +CTest_MMF_ACOD_U_0200::CTest_MMF_ACOD_U_0200()
1.9860 + {
1.9861 + // store the name of this test case
1.9862 + // this is the name that is used by the script file
1.9863 + // Each test step initialises it's own name
1.9864 + iTestStepName = _L("MM-MMF-ACOD-U-0200-HP");
1.9865 +
1.9866 + iExpectedLeaveErrorCode = KErrArgument;
1.9867 + }
1.9868 +
1.9869 +/** @xxxx
1.9870 + * Swap Endian Pass in zero sized destination buffer
1.9871 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.9872 + */
1.9873 +TVerdict CTest_MMF_ACOD_U_0200::DoTestStepL()
1.9874 + {
1.9875 + //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian};
1.9876 + const TUid codecUid = {KMMFUidCodecPCM16toPCM16B};
1.9877 + TBool testOK = EFalse;
1.9878 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCM16BOptimumSrc, 0));
1.9879 +
1.9880 + if (err)
1.9881 + {
1.9882 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9883 + return EFail;
1.9884 + }
1.9885 + else if (!testOK)
1.9886 + {
1.9887 + INFO_PRINTF1(_L("Test failed"));
1.9888 + return EFail;
1.9889 + }
1.9890 + else
1.9891 + return EPass;
1.9892 + }
1.9893 +
1.9894 +//------------------------------------------------------------------
1.9895 +
1.9896 +/** @xxxx
1.9897 + * Constructor
1.9898 + */
1.9899 +CTest_MMF_ACOD_U_0201::CTest_MMF_ACOD_U_0201()
1.9900 + {
1.9901 + // store the name of this test case
1.9902 + // this is the name that is used by the script file
1.9903 + // Each test step initialises it's own name
1.9904 + iTestStepName = _L("MM-MMF-ACOD-U-0201-HP");
1.9905 + }
1.9906 +
1.9907 +/** @xxxx
1.9908 + * Swap Endian Test out of memory
1.9909 + * @test Req. under test REQ172.11
1.9910 + */
1.9911 +TVerdict CTest_MMF_ACOD_U_0201::DoTestStepL()
1.9912 + {
1.9913 + //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian};
1.9914 + const TUid codecUid = {KMMFUidCodecPCM16toPCM16B};
1.9915 + TBool testOK = EFalse;
1.9916 +
1.9917 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.9918 + if (err==KErrNone && testOK)
1.9919 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.9920 +
1.9921 + if (err)
1.9922 + {
1.9923 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9924 + return EFail;
1.9925 + }
1.9926 + else if (!testOK)
1.9927 + {
1.9928 + INFO_PRINTF1(_L("Test failed"));
1.9929 + return EFail;
1.9930 + }
1.9931 + else
1.9932 + return EPass;
1.9933 + }
1.9934 +
1.9935 +//------------------------------------------------------------------
1.9936 +
1.9937 +
1.9938 +/** @xxxx
1.9939 + * Constructor
1.9940 + */
1.9941 +CTest_MMF_ACOD_U_0202::CTest_MMF_ACOD_U_0202()
1.9942 + {
1.9943 + // store the name of this test case
1.9944 + // this is the name that is used by the script file
1.9945 + // Each test step initialises it's own name
1.9946 + iTestStepName = _L("MM-MMF-ACOD-U-0202-HP");
1.9947 + }
1.9948 +
1.9949 +/** @xxxx
1.9950 + * Swap Endian Test for memory leaks
1.9951 + * @test Req. under test REQ172.11
1.9952 + */
1.9953 +TVerdict CTest_MMF_ACOD_U_0202::DoTestStepL()
1.9954 + {
1.9955 + //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian};
1.9956 + const TUid codecUid = {KMMFUidCodecPCM16toPCM16B};
1.9957 + TBool testOK = EFalse;
1.9958 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.9959 +
1.9960 + if (err)
1.9961 + {
1.9962 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.9963 + return EFail;
1.9964 + }
1.9965 + else if (!testOK)
1.9966 + {
1.9967 + INFO_PRINTF1(_L("Test failed"));
1.9968 + return EFail;
1.9969 + }
1.9970 + else
1.9971 + return EPass;
1.9972 + }
1.9973 +
1.9974 +//------------------------------------------------------------------
1.9975 +
1.9976 +
1.9977 +/** @xxxx
1.9978 + * Constructor
1.9979 + */
1.9980 +CTest_MMF_ACOD_U_0203::CTest_MMF_ACOD_U_0203()
1.9981 + {
1.9982 + // store the name of this test case
1.9983 + // this is the name that is used by the script file
1.9984 + // Each test step initialises it's own name
1.9985 + iTestStepName = _L("MM-MMF-ACOD-U-0203-HP");
1.9986 + }
1.9987 +
1.9988 +/** @xxxx
1.9989 + * Swap Endian Test for memory scribbles
1.9990 + * @test Req. under test REQ172.11
1.9991 + */
1.9992 +TVerdict CTest_MMF_ACOD_U_0203::DoTestStepL()
1.9993 + {
1.9994 + //const TUid codecUid = {KMMFUidCodecPCM16SwapEndian};
1.9995 + const TUid codecUid = {KMMFUidCodecPCM16toPCM16B};
1.9996 + TBool testOK = EFalse;
1.9997 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.9998 +
1.9999 + if (err)
1.10000 + {
1.10001 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10002 + return EFail;
1.10003 + }
1.10004 + else if (!testOK)
1.10005 + {
1.10006 + INFO_PRINTF1(_L("Test failed"));
1.10007 + return EFail;
1.10008 + }
1.10009 + else
1.10010 + return EPass;
1.10011 + }
1.10012 +
1.10013 +//------------------------------------------------------------------
1.10014 +
1.10015 +/** @xxxx
1.10016 + * Constructor
1.10017 + */
1.10018 +CTest_MMF_ACOD_U_0204::CTest_MMF_ACOD_U_0204()
1.10019 + {
1.10020 + // store the name of this test case
1.10021 + // this is the name that is used by the script file
1.10022 + // Each test step initialises it's own name
1.10023 + iTestStepName = _L("MM-MMF-ACOD-U-0204-HP");
1.10024 +
1.10025 + for (TUint i=0; i<5; i++)
1.10026 + {
1.10027 + iExpectedSrcBytesProcessed[i] = 0;
1.10028 + iExpectedDstBytesAdded[i] = 0;
1.10029 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.10030 + }
1.10031 + }
1.10032 +
1.10033 +/** @xxxx
1.10034 + * PCM16 to PCMU16BE Pass in zero sized source buffer
1.10035 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.10036 + */
1.10037 +TVerdict CTest_MMF_ACOD_U_0204::DoTestStepL()
1.10038 + {
1.10039 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE};
1.10040 + TBool testOK = EFalse;
1.10041 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToPCMU16BOptimumDst));
1.10042 +
1.10043 + if (err)
1.10044 + {
1.10045 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10046 + return EFail;
1.10047 + }
1.10048 + else if (!testOK)
1.10049 + {
1.10050 + INFO_PRINTF1(_L("Test failed"));
1.10051 + return EFail;
1.10052 + }
1.10053 + else
1.10054 + return EPass;
1.10055 + }
1.10056 +
1.10057 +//------------------------------------------------------------------
1.10058 +
1.10059 +/** @xxxx
1.10060 + * Constructor
1.10061 + */
1.10062 +CTest_MMF_ACOD_U_0205::CTest_MMF_ACOD_U_0205()
1.10063 + {
1.10064 + // store the name of this test case
1.10065 + // this is the name that is used by the script file
1.10066 + // Each test step initialises it's own name
1.10067 + iTestStepName = _L("MM-MMF-ACOD-U-0205-HP");
1.10068 +
1.10069 + iExpectedLeaveErrorCode = KErrArgument;
1.10070 + }
1.10071 +
1.10072 +/** @xxxx
1.10073 + * PCM16 to PCMU16BE Pass in zero sized destination buffer
1.10074 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.10075 + */
1.10076 +TVerdict CTest_MMF_ACOD_U_0205::DoTestStepL()
1.10077 + {
1.10078 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE};
1.10079 + TBool testOK = EFalse;
1.10080 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU16BOptimumSrc, 0));
1.10081 +
1.10082 + if (err)
1.10083 + {
1.10084 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10085 + return EFail;
1.10086 + }
1.10087 + else if (!testOK)
1.10088 + {
1.10089 + INFO_PRINTF1(_L("Test failed"));
1.10090 + return EFail;
1.10091 + }
1.10092 + else
1.10093 + return EPass;
1.10094 + }
1.10095 +
1.10096 +//------------------------------------------------------------------
1.10097 +
1.10098 +/** @xxxx
1.10099 + * Constructor
1.10100 + */
1.10101 +CTest_MMF_ACOD_U_0206::CTest_MMF_ACOD_U_0206()
1.10102 + {
1.10103 + // store the name of this test case
1.10104 + // this is the name that is used by the script file
1.10105 + // Each test step initialises it's own name
1.10106 + iTestStepName = _L("MM-MMF-ACOD-U-0206-HP");
1.10107 + }
1.10108 +
1.10109 +/** @xxxx
1.10110 + * PCM16 to PCMU16BE Test out of memory
1.10111 + * @test Req. under test REQ172.11
1.10112 + */
1.10113 +TVerdict CTest_MMF_ACOD_U_0206::DoTestStepL()
1.10114 + {
1.10115 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE};
1.10116 + TBool testOK = EFalse;
1.10117 +
1.10118 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.10119 + if (err==KErrNone && testOK)
1.10120 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.10121 +
1.10122 + if (err)
1.10123 + {
1.10124 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10125 + return EFail;
1.10126 + }
1.10127 + else if (!testOK)
1.10128 + {
1.10129 + INFO_PRINTF1(_L("Test failed"));
1.10130 + return EFail;
1.10131 + }
1.10132 + else
1.10133 + return EPass;
1.10134 + }
1.10135 +
1.10136 +//------------------------------------------------------------------
1.10137 +
1.10138 +
1.10139 +/** @xxxx
1.10140 + * Constructor
1.10141 + */
1.10142 +CTest_MMF_ACOD_U_0207::CTest_MMF_ACOD_U_0207()
1.10143 + {
1.10144 + // store the name of this test case
1.10145 + // this is the name that is used by the script file
1.10146 + // Each test step initialises it's own name
1.10147 + iTestStepName = _L("MM-MMF-ACOD-U-0207-HP");
1.10148 + }
1.10149 +
1.10150 +/** @xxxx
1.10151 + * PCM16 to PCMU16BE Test for memory leaks
1.10152 + * @test Req. under test REQ172.11
1.10153 + */
1.10154 +TVerdict CTest_MMF_ACOD_U_0207::DoTestStepL()
1.10155 + {
1.10156 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE};
1.10157 + TBool testOK = EFalse;
1.10158 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.10159 +
1.10160 + if (err)
1.10161 + {
1.10162 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10163 + return EFail;
1.10164 + }
1.10165 + else if (!testOK)
1.10166 + {
1.10167 + INFO_PRINTF1(_L("Test failed"));
1.10168 + return EFail;
1.10169 + }
1.10170 + else
1.10171 + return EPass;
1.10172 + }
1.10173 +
1.10174 +//------------------------------------------------------------------
1.10175 +
1.10176 +
1.10177 +/** @xxxx
1.10178 + * Constructor
1.10179 + */
1.10180 +CTest_MMF_ACOD_U_0208::CTest_MMF_ACOD_U_0208()
1.10181 + {
1.10182 + // store the name of this test case
1.10183 + // this is the name that is used by the script file
1.10184 + // Each test step initialises it's own name
1.10185 + iTestStepName = _L("MM-MMF-ACOD-U-0208-HP");
1.10186 + }
1.10187 +
1.10188 +/** @xxxx
1.10189 + * PCM16 to PCMU16BE Test for memory scribbles
1.10190 + * @test Req. under test REQ172.11
1.10191 + */
1.10192 +TVerdict CTest_MMF_ACOD_U_0208::DoTestStepL()
1.10193 + {
1.10194 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16BE};
1.10195 + TBool testOK = EFalse;
1.10196 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.10197 +
1.10198 + if (err)
1.10199 + {
1.10200 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10201 + return EFail;
1.10202 + }
1.10203 + else if (!testOK)
1.10204 + {
1.10205 + INFO_PRINTF1(_L("Test failed"));
1.10206 + return EFail;
1.10207 + }
1.10208 + else
1.10209 + return EPass;
1.10210 + }
1.10211 +
1.10212 +//------------------------------------------------------------------
1.10213 +
1.10214 +/** @xxxx
1.10215 + * Constructor
1.10216 + */
1.10217 +CTest_MMF_ACOD_U_0209::CTest_MMF_ACOD_U_0209()
1.10218 + {
1.10219 + // store the name of this test case
1.10220 + // this is the name that is used by the script file
1.10221 + // Each test step initialises it's own name
1.10222 + iTestStepName = _L("MM-MMF-ACOD-U-0209-HP");
1.10223 +
1.10224 + for (TUint i=0; i<5; i++)
1.10225 + {
1.10226 + iExpectedSrcBytesProcessed[i] = 0;
1.10227 + iExpectedDstBytesAdded[i] = 0;
1.10228 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.10229 + }
1.10230 + }
1.10231 +
1.10232 +/** @xxxx
1.10233 + * PCM16 to PCMU16 Pass in zero sized source buffer
1.10234 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.10235 + */
1.10236 +TVerdict CTest_MMF_ACOD_U_0209::DoTestStepL()
1.10237 + {
1.10238 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16};
1.10239 + TBool testOK = EFalse;
1.10240 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToPCMU16OptimumDst));
1.10241 +
1.10242 + if (err)
1.10243 + {
1.10244 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10245 + return EFail;
1.10246 + }
1.10247 + else if (!testOK)
1.10248 + {
1.10249 + INFO_PRINTF1(_L("Test failed"));
1.10250 + return EFail;
1.10251 + }
1.10252 + else
1.10253 + return EPass;
1.10254 + }
1.10255 +
1.10256 +//------------------------------------------------------------------
1.10257 +
1.10258 +/** @xxxx
1.10259 + * Constructor
1.10260 + */
1.10261 +CTest_MMF_ACOD_U_0210::CTest_MMF_ACOD_U_0210()
1.10262 + {
1.10263 + // store the name of this test case
1.10264 + // this is the name that is used by the script file
1.10265 + // Each test step initialises it's own name
1.10266 + iTestStepName = _L("MM-MMF-ACOD-U-0210-HP");
1.10267 +
1.10268 + iExpectedLeaveErrorCode = KErrArgument;
1.10269 + }
1.10270 +
1.10271 +/** @xxxx
1.10272 + * PCM16 to PCMU16 Pass in zero sized destination buffer
1.10273 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.10274 + */
1.10275 +TVerdict CTest_MMF_ACOD_U_0210::DoTestStepL()
1.10276 + {
1.10277 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16};
1.10278 + TBool testOK = EFalse;
1.10279 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU16OptimumSrc, 0));
1.10280 +
1.10281 + if (err)
1.10282 + {
1.10283 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10284 + return EFail;
1.10285 + }
1.10286 + else if (!testOK)
1.10287 + {
1.10288 + INFO_PRINTF1(_L("Test failed"));
1.10289 + return EFail;
1.10290 + }
1.10291 + else
1.10292 + return EPass;
1.10293 + }
1.10294 +
1.10295 +//------------------------------------------------------------------
1.10296 +
1.10297 +/** @xxxx
1.10298 + * Constructor
1.10299 + */
1.10300 +CTest_MMF_ACOD_U_0211::CTest_MMF_ACOD_U_0211()
1.10301 + {
1.10302 + // store the name of this test case
1.10303 + // this is the name that is used by the script file
1.10304 + // Each test step initialises it's own name
1.10305 + iTestStepName = _L("MM-MMF-ACOD-U-0211-HP");
1.10306 + }
1.10307 +
1.10308 +/** @xxxx
1.10309 + * PCM16 to PCMU16 Test out of memory
1.10310 + * @test Req. under test REQ172.11
1.10311 + */
1.10312 +TVerdict CTest_MMF_ACOD_U_0211::DoTestStepL()
1.10313 + {
1.10314 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16};
1.10315 + TBool testOK = EFalse;
1.10316 +
1.10317 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.10318 + if (err==KErrNone && testOK)
1.10319 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.10320 +
1.10321 + if (err)
1.10322 + {
1.10323 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10324 + return EFail;
1.10325 + }
1.10326 + else if (!testOK)
1.10327 + {
1.10328 + INFO_PRINTF1(_L("Test failed"));
1.10329 + return EFail;
1.10330 + }
1.10331 + else
1.10332 + return EPass;
1.10333 + }
1.10334 +
1.10335 +//------------------------------------------------------------------
1.10336 +
1.10337 +
1.10338 +/** @xxxx
1.10339 + * Constructor
1.10340 + */
1.10341 +CTest_MMF_ACOD_U_0212::CTest_MMF_ACOD_U_0212()
1.10342 + {
1.10343 + // store the name of this test case
1.10344 + // this is the name that is used by the script file
1.10345 + // Each test step initialises it's own name
1.10346 + iTestStepName = _L("MM-MMF-ACOD-U-0212-HP");
1.10347 + }
1.10348 +
1.10349 +/** @xxxx
1.10350 + * PCM16 to PCMU16 Test for memory leaks
1.10351 + * @test Req. under test REQ172.11
1.10352 + */
1.10353 +TVerdict CTest_MMF_ACOD_U_0212::DoTestStepL()
1.10354 + {
1.10355 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16};
1.10356 + TBool testOK = EFalse;
1.10357 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.10358 +
1.10359 + if (err)
1.10360 + {
1.10361 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10362 + return EFail;
1.10363 + }
1.10364 + else if (!testOK)
1.10365 + {
1.10366 + INFO_PRINTF1(_L("Test failed"));
1.10367 + return EFail;
1.10368 + }
1.10369 + else
1.10370 + return EPass;
1.10371 + }
1.10372 +
1.10373 +//------------------------------------------------------------------
1.10374 +
1.10375 +
1.10376 +/** @xxxx
1.10377 + * Constructor
1.10378 + */
1.10379 +CTest_MMF_ACOD_U_0213::CTest_MMF_ACOD_U_0213()
1.10380 + {
1.10381 + // store the name of this test case
1.10382 + // this is the name that is used by the script file
1.10383 + // Each test step initialises it's own name
1.10384 + iTestStepName = _L("MM-MMF-ACOD-U-0213-HP");
1.10385 + }
1.10386 +
1.10387 +/** @xxxx
1.10388 + * PCM16 to PCMU16 Test for memory scribbles
1.10389 + * @test Req. under test REQ172.11
1.10390 + */
1.10391 +TVerdict CTest_MMF_ACOD_U_0213::DoTestStepL()
1.10392 + {
1.10393 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU16};
1.10394 + TBool testOK = EFalse;
1.10395 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.10396 +
1.10397 + if (err)
1.10398 + {
1.10399 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10400 + return EFail;
1.10401 + }
1.10402 + else if (!testOK)
1.10403 + {
1.10404 + INFO_PRINTF1(_L("Test failed"));
1.10405 + return EFail;
1.10406 + }
1.10407 + else
1.10408 + return EPass;
1.10409 + }
1.10410 +
1.10411 +//------------------------------------------------------------------
1.10412 +/** @xxxx
1.10413 + * Constructor
1.10414 + */
1.10415 +CTest_MMF_ACOD_U_0214::CTest_MMF_ACOD_U_0214()
1.10416 + {
1.10417 + // store the name of this test case
1.10418 + // this is the name that is used by the script file
1.10419 + // Each test step initialises it's own name
1.10420 + iTestStepName = _L("MM-MMF-ACOD-U-0214-HP");
1.10421 +
1.10422 + for (TUint i=0; i<5; i++)
1.10423 + {
1.10424 + iExpectedSrcBytesProcessed[i] = 0;
1.10425 + iExpectedDstBytesAdded[i] = 0;
1.10426 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.10427 + }
1.10428 + }
1.10429 +
1.10430 +/** @xxxx
1.10431 + * PCM16 to PCMU8 Pass in zero sized source buffer
1.10432 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.10433 + */
1.10434 +TVerdict CTest_MMF_ACOD_U_0214::DoTestStepL()
1.10435 + {
1.10436 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8};
1.10437 + TBool testOK = EFalse;
1.10438 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToPCMU8OptimumDst));
1.10439 +
1.10440 + if (err)
1.10441 + {
1.10442 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10443 + return EFail;
1.10444 + }
1.10445 + else if (!testOK)
1.10446 + {
1.10447 + INFO_PRINTF1(_L("Test failed"));
1.10448 + return EFail;
1.10449 + }
1.10450 + else
1.10451 + return EPass;
1.10452 + }
1.10453 +
1.10454 +//------------------------------------------------------------------
1.10455 +
1.10456 +/** @xxxx
1.10457 + * Constructor
1.10458 + */
1.10459 +CTest_MMF_ACOD_U_0215::CTest_MMF_ACOD_U_0215()
1.10460 + {
1.10461 + // store the name of this test case
1.10462 + // this is the name that is used by the script file
1.10463 + // Each test step initialises it's own name
1.10464 + iTestStepName = _L("MM-MMF-ACOD-U-0215-HP");
1.10465 +
1.10466 + iExpectedLeaveErrorCode = KErrArgument;
1.10467 + }
1.10468 +
1.10469 +/** @xxxx
1.10470 + * PCM16 to PCMU8 Pass in zero sized destination buffer
1.10471 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.10472 + */
1.10473 +TVerdict CTest_MMF_ACOD_U_0215::DoTestStepL()
1.10474 + {
1.10475 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8};
1.10476 + TBool testOK = EFalse;
1.10477 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToPCMU8OptimumSrc, 0));
1.10478 +
1.10479 + if (err)
1.10480 + {
1.10481 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10482 + return EFail;
1.10483 + }
1.10484 + else if (!testOK)
1.10485 + {
1.10486 + INFO_PRINTF1(_L("Test failed"));
1.10487 + return EFail;
1.10488 + }
1.10489 + else
1.10490 + return EPass;
1.10491 + }
1.10492 +
1.10493 +//------------------------------------------------------------------
1.10494 +
1.10495 +/** @xxxx
1.10496 + * Constructor
1.10497 + */
1.10498 +CTest_MMF_ACOD_U_0216::CTest_MMF_ACOD_U_0216()
1.10499 + {
1.10500 + // store the name of this test case
1.10501 + // this is the name that is used by the script file
1.10502 + // Each test step initialises it's own name
1.10503 + iTestStepName = _L("MM-MMF-ACOD-U-0216-HP");
1.10504 + }
1.10505 +
1.10506 +/** @xxxx
1.10507 + * PCM16 to PCMU8 Test out of memory
1.10508 + * @test Req. under test REQ172.11
1.10509 + */
1.10510 +TVerdict CTest_MMF_ACOD_U_0216::DoTestStepL()
1.10511 + {
1.10512 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8};
1.10513 + TBool testOK = EFalse;
1.10514 +
1.10515 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.10516 + if (err==KErrNone && testOK)
1.10517 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.10518 +
1.10519 + if (err)
1.10520 + {
1.10521 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10522 + return EFail;
1.10523 + }
1.10524 + else if (!testOK)
1.10525 + {
1.10526 + INFO_PRINTF1(_L("Test failed"));
1.10527 + return EFail;
1.10528 + }
1.10529 + else
1.10530 + return EPass;
1.10531 + }
1.10532 +
1.10533 +//------------------------------------------------------------------
1.10534 +
1.10535 +
1.10536 +/** @xxxx
1.10537 + * Constructor
1.10538 + */
1.10539 +CTest_MMF_ACOD_U_0217::CTest_MMF_ACOD_U_0217()
1.10540 + {
1.10541 + // store the name of this test case
1.10542 + // this is the name that is used by the script file
1.10543 + // Each test step initialises it's own name
1.10544 + iTestStepName = _L("MM-MMF-ACOD-U-0217-HP");
1.10545 + }
1.10546 +
1.10547 +/** @xxxx
1.10548 + * PCM16 to PCMU8 Test for memory leaks
1.10549 + * @test Req. under test REQ172.11
1.10550 + */
1.10551 +TVerdict CTest_MMF_ACOD_U_0217::DoTestStepL()
1.10552 + {
1.10553 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8};
1.10554 + TBool testOK = EFalse;
1.10555 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.10556 +
1.10557 + if (err)
1.10558 + {
1.10559 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10560 + return EFail;
1.10561 + }
1.10562 + else if (!testOK)
1.10563 + {
1.10564 + INFO_PRINTF1(_L("Test failed"));
1.10565 + return EFail;
1.10566 + }
1.10567 + else
1.10568 + return EPass;
1.10569 + }
1.10570 +
1.10571 +//------------------------------------------------------------------
1.10572 +
1.10573 +
1.10574 +/** @xxxx
1.10575 + * Constructor
1.10576 + */
1.10577 +CTest_MMF_ACOD_U_0218::CTest_MMF_ACOD_U_0218()
1.10578 + {
1.10579 + // store the name of this test case
1.10580 + // this is the name that is used by the script file
1.10581 + // Each test step initialises it's own name
1.10582 + iTestStepName = _L("MM-MMF-ACOD-U-0218-HP");
1.10583 + }
1.10584 +
1.10585 +/** @xxxx
1.10586 + * PCM16 to PCMU8 Test for memory scribbles
1.10587 + * @test Req. under test REQ172.11
1.10588 + */
1.10589 +TVerdict CTest_MMF_ACOD_U_0218::DoTestStepL()
1.10590 + {
1.10591 + const TUid codecUid = {KMmfUidCodecAudioS16ToPCMU8};
1.10592 + TBool testOK = EFalse;
1.10593 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.10594 +
1.10595 + if (err)
1.10596 + {
1.10597 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10598 + return EFail;
1.10599 + }
1.10600 + else if (!testOK)
1.10601 + {
1.10602 + INFO_PRINTF1(_L("Test failed"));
1.10603 + return EFail;
1.10604 + }
1.10605 + else
1.10606 + return EPass;
1.10607 + }
1.10608 +
1.10609 +//------------------------------------------------------------------
1.10610 +
1.10611 +/** @xxxx
1.10612 + * Constructor
1.10613 + */
1.10614 +CTest_MMF_ACOD_U_0219::CTest_MMF_ACOD_U_0219()
1.10615 + {
1.10616 + // store the name of this test case
1.10617 + // this is the name that is used by the script file
1.10618 + // Each test step initialises it's own name
1.10619 + iTestStepName = _L("MM-MMF-ACOD-U-0219-HP");
1.10620 +
1.10621 + for (TUint i=0; i<5; i++)
1.10622 + {
1.10623 + iExpectedSrcBytesProcessed[i] = 0;
1.10624 + iExpectedDstBytesAdded[i] = 0;
1.10625 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.10626 + }
1.10627 + }
1.10628 +
1.10629 +/** @xxxx
1.10630 + * PCMU16BE to PCM16 Pass in zero sized source buffer
1.10631 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.10632 + */
1.10633 +TVerdict CTest_MMF_ACOD_U_0219::DoTestStepL()
1.10634 + {
1.10635 + const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16};
1.10636 + TBool testOK = EFalse;
1.10637 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCMU16BToPCM16OptimumDst));
1.10638 +
1.10639 + if (err)
1.10640 + {
1.10641 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10642 + return EFail;
1.10643 + }
1.10644 + else if (!testOK)
1.10645 + {
1.10646 + INFO_PRINTF1(_L("Test failed"));
1.10647 + return EFail;
1.10648 + }
1.10649 + else
1.10650 + return EPass;
1.10651 + }
1.10652 +
1.10653 +//------------------------------------------------------------------
1.10654 +
1.10655 +/** @xxxx
1.10656 + * Constructor
1.10657 + */
1.10658 +CTest_MMF_ACOD_U_0220::CTest_MMF_ACOD_U_0220()
1.10659 + {
1.10660 + // store the name of this test case
1.10661 + // this is the name that is used by the script file
1.10662 + // Each test step initialises it's own name
1.10663 + iTestStepName = _L("MM-MMF-ACOD-U-0220-HP");
1.10664 +
1.10665 + iExpectedLeaveErrorCode = KErrArgument;
1.10666 + }
1.10667 +
1.10668 +/** @xxxx
1.10669 + * PCMU16BE to PCM16 Pass in zero sized destination buffer
1.10670 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.10671 + */
1.10672 +TVerdict CTest_MMF_ACOD_U_0220::DoTestStepL()
1.10673 + {
1.10674 + const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16};
1.10675 + TBool testOK = EFalse;
1.10676 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU16BToPCM16OptimumSrc, 0));
1.10677 +
1.10678 + if (err)
1.10679 + {
1.10680 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10681 + return EFail;
1.10682 + }
1.10683 + else if (!testOK)
1.10684 + {
1.10685 + INFO_PRINTF1(_L("Test failed"));
1.10686 + return EFail;
1.10687 + }
1.10688 + else
1.10689 + return EPass;
1.10690 + }
1.10691 +
1.10692 +//------------------------------------------------------------------
1.10693 +
1.10694 +/** @xxxx
1.10695 + * Constructor
1.10696 + */
1.10697 +CTest_MMF_ACOD_U_0221::CTest_MMF_ACOD_U_0221()
1.10698 + {
1.10699 + // store the name of this test case
1.10700 + // this is the name that is used by the script file
1.10701 + // Each test step initialises it's own name
1.10702 + iTestStepName = _L("MM-MMF-ACOD-U-0221-HP");
1.10703 + }
1.10704 +
1.10705 +/** @xxxx
1.10706 + * PCMU16BE to PCM16 Test out of memory
1.10707 + * @test Req. under test REQ172.11
1.10708 + */
1.10709 +TVerdict CTest_MMF_ACOD_U_0221::DoTestStepL()
1.10710 + {
1.10711 + const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16};
1.10712 + TBool testOK = EFalse;
1.10713 +
1.10714 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.10715 + if (err==KErrNone && testOK)
1.10716 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.10717 +
1.10718 + if (err)
1.10719 + {
1.10720 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10721 + return EFail;
1.10722 + }
1.10723 + else if (!testOK)
1.10724 + {
1.10725 + INFO_PRINTF1(_L("Test failed"));
1.10726 + return EFail;
1.10727 + }
1.10728 + else
1.10729 + return EPass;
1.10730 + }
1.10731 +
1.10732 +//------------------------------------------------------------------
1.10733 +
1.10734 +
1.10735 +/** @xxxx
1.10736 + * Constructor
1.10737 + */
1.10738 +CTest_MMF_ACOD_U_0222::CTest_MMF_ACOD_U_0222()
1.10739 + {
1.10740 + // store the name of this test case
1.10741 + // this is the name that is used by the script file
1.10742 + // Each test step initialises it's own name
1.10743 + iTestStepName = _L("MM-MMF-ACOD-U-0222-HP");
1.10744 + }
1.10745 +
1.10746 +/** @xxxx
1.10747 + * PCMU16BE to PCM16 Test for memory leaks
1.10748 + * @test Req. under test REQ172.11
1.10749 + */
1.10750 +TVerdict CTest_MMF_ACOD_U_0222::DoTestStepL()
1.10751 + {
1.10752 + const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16};
1.10753 + TBool testOK = EFalse;
1.10754 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.10755 +
1.10756 + if (err)
1.10757 + {
1.10758 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10759 + return EFail;
1.10760 + }
1.10761 + else if (!testOK)
1.10762 + {
1.10763 + INFO_PRINTF1(_L("Test failed"));
1.10764 + return EFail;
1.10765 + }
1.10766 + else
1.10767 + return EPass;
1.10768 + }
1.10769 +
1.10770 +//------------------------------------------------------------------
1.10771 +
1.10772 +
1.10773 +/** @xxxx
1.10774 + * Constructor
1.10775 + */
1.10776 +CTest_MMF_ACOD_U_0223::CTest_MMF_ACOD_U_0223()
1.10777 + {
1.10778 + // store the name of this test case
1.10779 + // this is the name that is used by the script file
1.10780 + // Each test step initialises it's own name
1.10781 + iTestStepName = _L("MM-MMF-ACOD-U-0223-HP");
1.10782 + }
1.10783 +
1.10784 +/** @xxxx
1.10785 + * PCMU16BE to PCM16 Test for memory scribbles
1.10786 + * @test Req. under test REQ172.11
1.10787 + */
1.10788 +TVerdict CTest_MMF_ACOD_U_0223::DoTestStepL()
1.10789 + {
1.10790 + const TUid codecUid = {KMmfUidCodecAudioU16BEToPCMS16};
1.10791 + TBool testOK = EFalse;
1.10792 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.10793 +
1.10794 + if (err)
1.10795 + {
1.10796 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10797 + return EFail;
1.10798 + }
1.10799 + else if (!testOK)
1.10800 + {
1.10801 + INFO_PRINTF1(_L("Test failed"));
1.10802 + return EFail;
1.10803 + }
1.10804 + else
1.10805 + return EPass;
1.10806 + }
1.10807 +
1.10808 +//------------------------------------------------------------------
1.10809 +
1.10810 +/** @xxxx
1.10811 + * Constructor
1.10812 + */
1.10813 +CTest_MMF_ACOD_U_0224::CTest_MMF_ACOD_U_0224()
1.10814 + {
1.10815 + // store the name of this test case
1.10816 + // this is the name that is used by the script file
1.10817 + // Each test step initialises it's own name
1.10818 + iTestStepName = _L("MM-MMF-ACOD-U-0224-HP");
1.10819 +
1.10820 + for (TUint i=0; i<5; i++)
1.10821 + {
1.10822 + iExpectedSrcBytesProcessed[i] = 0;
1.10823 + iExpectedDstBytesAdded[i] = 0;
1.10824 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.10825 + }
1.10826 + }
1.10827 +
1.10828 +/** @xxxx
1.10829 + * PCMU16 to PCM16 Pass in zero sized source buffer
1.10830 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.10831 + */
1.10832 +TVerdict CTest_MMF_ACOD_U_0224::DoTestStepL()
1.10833 + {
1.10834 + const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16};
1.10835 + TBool testOK = EFalse;
1.10836 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCMU16ToPCM16OptimumDst));
1.10837 +
1.10838 + if (err)
1.10839 + {
1.10840 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10841 + return EFail;
1.10842 + }
1.10843 + else if (!testOK)
1.10844 + {
1.10845 + INFO_PRINTF1(_L("Test failed"));
1.10846 + return EFail;
1.10847 + }
1.10848 + else
1.10849 + return EPass;
1.10850 + }
1.10851 +
1.10852 +//------------------------------------------------------------------
1.10853 +
1.10854 +/** @xxxx
1.10855 + * Constructor
1.10856 + */
1.10857 +CTest_MMF_ACOD_U_0225::CTest_MMF_ACOD_U_0225()
1.10858 + {
1.10859 + // store the name of this test case
1.10860 + // this is the name that is used by the script file
1.10861 + // Each test step initialises it's own name
1.10862 + iTestStepName = _L("MM-MMF-ACOD-U-0225-HP");
1.10863 +
1.10864 + iExpectedLeaveErrorCode = KErrArgument;
1.10865 + }
1.10866 +
1.10867 +/** @xxxx
1.10868 + * PCMU16 to PCM16 Pass in zero sized destination buffer
1.10869 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.10870 + */
1.10871 +TVerdict CTest_MMF_ACOD_U_0225::DoTestStepL()
1.10872 + {
1.10873 + const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16};
1.10874 + TBool testOK = EFalse;
1.10875 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU16ToPCM16OptimumSrc, 0));
1.10876 +
1.10877 + if (err)
1.10878 + {
1.10879 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10880 + return EFail;
1.10881 + }
1.10882 + else if (!testOK)
1.10883 + {
1.10884 + INFO_PRINTF1(_L("Test failed"));
1.10885 + return EFail;
1.10886 + }
1.10887 + else
1.10888 + return EPass;
1.10889 + }
1.10890 +
1.10891 +//------------------------------------------------------------------
1.10892 +
1.10893 +/** @xxxx
1.10894 + * Constructor
1.10895 + */
1.10896 +CTest_MMF_ACOD_U_0226::CTest_MMF_ACOD_U_0226()
1.10897 + {
1.10898 + // store the name of this test case
1.10899 + // this is the name that is used by the script file
1.10900 + // Each test step initialises it's own name
1.10901 + iTestStepName = _L("MM-MMF-ACOD-U-0226-HP");
1.10902 + }
1.10903 +
1.10904 +/** @xxxx
1.10905 + * PCMU16 to PCM16 Test out of memory
1.10906 + * @test Req. under test REQ172.11
1.10907 + */
1.10908 +TVerdict CTest_MMF_ACOD_U_0226::DoTestStepL()
1.10909 + {
1.10910 + const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16};
1.10911 + TBool testOK = EFalse;
1.10912 +
1.10913 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.10914 + if (err==KErrNone && testOK)
1.10915 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.10916 +
1.10917 + if (err)
1.10918 + {
1.10919 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10920 + return EFail;
1.10921 + }
1.10922 + else if (!testOK)
1.10923 + {
1.10924 + INFO_PRINTF1(_L("Test failed"));
1.10925 + return EFail;
1.10926 + }
1.10927 + else
1.10928 + return EPass;
1.10929 + }
1.10930 +
1.10931 +//------------------------------------------------------------------
1.10932 +
1.10933 +/** @xxxx
1.10934 + * Constructor
1.10935 + */
1.10936 +CTest_MMF_ACOD_U_0227::CTest_MMF_ACOD_U_0227()
1.10937 + {
1.10938 + // store the name of this test case
1.10939 + // this is the name that is used by the script file
1.10940 + // Each test step initialises it's own name
1.10941 + iTestStepName = _L("MM-MMF-ACOD-U-0227-HP");
1.10942 + }
1.10943 +
1.10944 +/** @xxxx
1.10945 + * PCMU16 to PCM16 Test for memory leaks
1.10946 + * @test Req. under test REQ172.11
1.10947 + */
1.10948 +TVerdict CTest_MMF_ACOD_U_0227::DoTestStepL()
1.10949 + {
1.10950 + const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16};
1.10951 + TBool testOK = EFalse;
1.10952 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.10953 +
1.10954 + if (err)
1.10955 + {
1.10956 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10957 + return EFail;
1.10958 + }
1.10959 + else if (!testOK)
1.10960 + {
1.10961 + INFO_PRINTF1(_L("Test failed"));
1.10962 + return EFail;
1.10963 + }
1.10964 + else
1.10965 + return EPass;
1.10966 + }
1.10967 +
1.10968 +//------------------------------------------------------------------
1.10969 +
1.10970 +/** @xxxx
1.10971 + * Constructor
1.10972 + */
1.10973 +CTest_MMF_ACOD_U_0228::CTest_MMF_ACOD_U_0228()
1.10974 + {
1.10975 + // store the name of this test case
1.10976 + // this is the name that is used by the script file
1.10977 + // Each test step initialises it's own name
1.10978 + iTestStepName = _L("MM-MMF-ACOD-U-0228-HP");
1.10979 + }
1.10980 +
1.10981 +/** @xxxx
1.10982 + * PCMU16 to PCM16 Test for memory scribbles
1.10983 + * @test Req. under test REQ172.11
1.10984 + */
1.10985 +TVerdict CTest_MMF_ACOD_U_0228::DoTestStepL()
1.10986 + {
1.10987 + const TUid codecUid = {KMmfUidCodecAudioU16ToPCMS16};
1.10988 + TBool testOK = EFalse;
1.10989 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.10990 +
1.10991 + if (err)
1.10992 + {
1.10993 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.10994 + return EFail;
1.10995 + }
1.10996 + else if (!testOK)
1.10997 + {
1.10998 + INFO_PRINTF1(_L("Test failed"));
1.10999 + return EFail;
1.11000 + }
1.11001 + else
1.11002 + return EPass;
1.11003 + }
1.11004 +
1.11005 +//------------------------------------------------------------------
1.11006 +
1.11007 +/** @xxxx
1.11008 + * Constructor
1.11009 + */
1.11010 +CTest_MMF_ACOD_U_0229::CTest_MMF_ACOD_U_0229()
1.11011 + {
1.11012 + // store the name of this test case
1.11013 + // this is the name that is used by the script file
1.11014 + // Each test step initialises it's own name
1.11015 + iTestStepName = _L("MM-MMF-ACOD-U-0229-HP");
1.11016 +
1.11017 + for (TUint i=0; i<5; i++)
1.11018 + {
1.11019 + iExpectedSrcBytesProcessed[i] = 0;
1.11020 + iExpectedDstBytesAdded[i] = 0;
1.11021 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.11022 + }
1.11023 + }
1.11024 +
1.11025 +/** @xxxx
1.11026 + * PCMU8 To PCM16 Pass in zero sized source buffer
1.11027 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.11028 + */
1.11029 +TVerdict CTest_MMF_ACOD_U_0229::DoTestStepL()
1.11030 + {
1.11031 + const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16};
1.11032 + TBool testOK = EFalse;
1.11033 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCMU8ToPCM16OptimumDst));
1.11034 +
1.11035 + if (err)
1.11036 + {
1.11037 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11038 + return EFail;
1.11039 + }
1.11040 + else if (!testOK)
1.11041 + {
1.11042 + INFO_PRINTF1(_L("Test failed"));
1.11043 + return EFail;
1.11044 + }
1.11045 + else
1.11046 + return EPass;
1.11047 + }
1.11048 +
1.11049 +//------------------------------------------------------------------
1.11050 +
1.11051 +/** @xxxx
1.11052 + * Constructor
1.11053 + */
1.11054 +CTest_MMF_ACOD_U_0230::CTest_MMF_ACOD_U_0230()
1.11055 + {
1.11056 + // store the name of this test case
1.11057 + // this is the name that is used by the script file
1.11058 + // Each test step initialises it's own name
1.11059 + iTestStepName = _L("MM-MMF-ACOD-U-0230-HP");
1.11060 +
1.11061 + iExpectedLeaveErrorCode = KErrArgument;
1.11062 + }
1.11063 +
1.11064 +/** @xxxx
1.11065 + * PCMU8 To PCM16 Pass in zero sized destination buffer
1.11066 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.11067 + */
1.11068 +TVerdict CTest_MMF_ACOD_U_0230::DoTestStepL()
1.11069 + {
1.11070 + const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16};
1.11071 + TBool testOK = EFalse;
1.11072 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCMU8ToPCM16OptimumSrc, 0));
1.11073 +
1.11074 + if (err)
1.11075 + {
1.11076 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11077 + return EFail;
1.11078 + }
1.11079 + else if (!testOK)
1.11080 + {
1.11081 + INFO_PRINTF1(_L("Test failed"));
1.11082 + return EFail;
1.11083 + }
1.11084 + else
1.11085 + return EPass;
1.11086 + }
1.11087 +
1.11088 +//------------------------------------------------------------------
1.11089 +
1.11090 +/** @xxxx
1.11091 + * Constructor
1.11092 + */
1.11093 +CTest_MMF_ACOD_U_0231::CTest_MMF_ACOD_U_0231()
1.11094 + {
1.11095 + // store the name of this test case
1.11096 + // this is the name that is used by the script file
1.11097 + // Each test step initialises it's own name
1.11098 + iTestStepName = _L("MM-MMF-ACOD-U-0231-HP");
1.11099 + }
1.11100 +
1.11101 +/** @xxxx
1.11102 + * PCMU8 To PCM16 Test out of memory
1.11103 + * @test Req. under test REQ172.11
1.11104 + */
1.11105 +TVerdict CTest_MMF_ACOD_U_0231::DoTestStepL()
1.11106 + {
1.11107 + const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16};
1.11108 + TBool testOK = EFalse;
1.11109 +
1.11110 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.11111 + if (err==KErrNone && testOK)
1.11112 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.11113 +
1.11114 + if (err)
1.11115 + {
1.11116 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11117 + return EFail;
1.11118 + }
1.11119 + else if (!testOK)
1.11120 + {
1.11121 + INFO_PRINTF1(_L("Test failed"));
1.11122 + return EFail;
1.11123 + }
1.11124 + else
1.11125 + return EPass;
1.11126 + }
1.11127 +
1.11128 +//------------------------------------------------------------------
1.11129 +
1.11130 +
1.11131 +/** @xxxx
1.11132 + * Constructor
1.11133 + */
1.11134 +CTest_MMF_ACOD_U_0232::CTest_MMF_ACOD_U_0232()
1.11135 + {
1.11136 + // store the name of this test case
1.11137 + // this is the name that is used by the script file
1.11138 + // Each test step initialises it's own name
1.11139 + iTestStepName = _L("MM-MMF-ACOD-U-0232-HP");
1.11140 + }
1.11141 +
1.11142 +/** @xxxx
1.11143 + * PCMU8 To PCM16 Test for memory leaks
1.11144 + * @test Req. under test REQ172.11
1.11145 + */
1.11146 +TVerdict CTest_MMF_ACOD_U_0232::DoTestStepL()
1.11147 + {
1.11148 + const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16};
1.11149 + TBool testOK = EFalse;
1.11150 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.11151 +
1.11152 + if (err)
1.11153 + {
1.11154 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11155 + return EFail;
1.11156 + }
1.11157 + else if (!testOK)
1.11158 + {
1.11159 + INFO_PRINTF1(_L("Test failed"));
1.11160 + return EFail;
1.11161 + }
1.11162 + else
1.11163 + return EPass;
1.11164 + }
1.11165 +
1.11166 +//------------------------------------------------------------------
1.11167 +
1.11168 +
1.11169 +/** @xxxx
1.11170 + * Constructor
1.11171 + */
1.11172 +CTest_MMF_ACOD_U_0233::CTest_MMF_ACOD_U_0233()
1.11173 + {
1.11174 + // store the name of this test case
1.11175 + // this is the name that is used by the script file
1.11176 + // Each test step initialises it's own name
1.11177 + iTestStepName = _L("MM-MMF-ACOD-U-0233-HP");
1.11178 + }
1.11179 +
1.11180 +/** @xxxx
1.11181 + * PCMU8 To PCM16 Test for memory scribbles
1.11182 + * @test Req. under test REQ172.11
1.11183 + */
1.11184 +TVerdict CTest_MMF_ACOD_U_0233::DoTestStepL()
1.11185 + {
1.11186 + const TUid codecUid = {KMmfUidCodecAudioU8ToPCMS16};
1.11187 + TBool testOK = EFalse;
1.11188 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.11189 +
1.11190 + if (err)
1.11191 + {
1.11192 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11193 + return EFail;
1.11194 + }
1.11195 + else if (!testOK)
1.11196 + {
1.11197 + INFO_PRINTF1(_L("Test failed"));
1.11198 + return EFail;
1.11199 + }
1.11200 + else
1.11201 + return EPass;
1.11202 + }
1.11203 +
1.11204 +//------------------------------------------------------------------
1.11205 +
1.11206 +/** @xxxx
1.11207 + * Constructor
1.11208 + */
1.11209 +CTest_MMF_ACOD_U_0234::CTest_MMF_ACOD_U_0234()
1.11210 + {
1.11211 + // store the name of this test case
1.11212 + // this is the name that is used by the script file
1.11213 + // Each test step initialises it's own name
1.11214 + iTestStepName = _L("MM-MMF-ACOD-U-0234-HP");
1.11215 +
1.11216 + for (TUint i=0; i<5; i++)
1.11217 + {
1.11218 + iExpectedSrcBytesProcessed[i] = 0;
1.11219 + iExpectedDstBytesAdded[i] = 0;
1.11220 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.11221 + }
1.11222 + }
1.11223 +
1.11224 +/** @xxxx
1.11225 + * MULAW To PCM16 Pass in zero sized source buffer
1.11226 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.11227 + */
1.11228 +TVerdict CTest_MMF_ACOD_U_0234::DoTestStepL()
1.11229 + {
1.11230 + const TUid codecUid = {KMmfUidCodecMulawToPCM16};
1.11231 + TBool testOK = EFalse;
1.11232 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KMulawToPCM16OptimumDst));
1.11233 +
1.11234 + if (err)
1.11235 + {
1.11236 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11237 + return EFail;
1.11238 + }
1.11239 + else if (!testOK)
1.11240 + {
1.11241 + INFO_PRINTF1(_L("Test failed"));
1.11242 + return EFail;
1.11243 + }
1.11244 + else
1.11245 + return EPass;
1.11246 + }
1.11247 +
1.11248 +//------------------------------------------------------------------
1.11249 +
1.11250 +/** @xxxx
1.11251 + * Constructor
1.11252 + */
1.11253 +CTest_MMF_ACOD_U_0235::CTest_MMF_ACOD_U_0235()
1.11254 + {
1.11255 + // store the name of this test case
1.11256 + // this is the name that is used by the script file
1.11257 + // Each test step initialises it's own name
1.11258 + iTestStepName = _L("MM-MMF-ACOD-U-0235-HP");
1.11259 +
1.11260 + iExpectedLeaveErrorCode = KErrArgument;
1.11261 + }
1.11262 +
1.11263 +/** @xxxx
1.11264 + * MULAW To PCM16 Pass in zero sized destination buffer
1.11265 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.11266 + */
1.11267 +TVerdict CTest_MMF_ACOD_U_0235::DoTestStepL()
1.11268 + {
1.11269 + const TUid codecUid = {KMmfUidCodecMulawToPCM16};
1.11270 + TBool testOK = EFalse;
1.11271 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KMulawToPCM16OptimumSrc, 0));
1.11272 +
1.11273 + if (err)
1.11274 + {
1.11275 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11276 + return EFail;
1.11277 + }
1.11278 + else if (!testOK)
1.11279 + {
1.11280 + INFO_PRINTF1(_L("Test failed"));
1.11281 + return EFail;
1.11282 + }
1.11283 + else
1.11284 + return EPass;
1.11285 + }
1.11286 +
1.11287 +//------------------------------------------------------------------
1.11288 +
1.11289 +/** @xxxx
1.11290 + * Constructor
1.11291 + */
1.11292 +CTest_MMF_ACOD_U_0236::CTest_MMF_ACOD_U_0236()
1.11293 + {
1.11294 + // store the name of this test case
1.11295 + // this is the name that is used by the script file
1.11296 + // Each test step initialises it's own name
1.11297 + iTestStepName = _L("MM-MMF-ACOD-U-0236-HP");
1.11298 + }
1.11299 +
1.11300 +/** @xxxx
1.11301 + * MULAW To PCM16 Test out of memory
1.11302 + * @test Req. under test REQ172.11
1.11303 + */
1.11304 +TVerdict CTest_MMF_ACOD_U_0236::DoTestStepL()
1.11305 + {
1.11306 + const TUid codecUid = {KMmfUidCodecMulawToPCM16};
1.11307 + TBool testOK = EFalse;
1.11308 +
1.11309 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.11310 + if (err==KErrNone && testOK)
1.11311 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.11312 +
1.11313 + if (err)
1.11314 + {
1.11315 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11316 + return EFail;
1.11317 + }
1.11318 + else if (!testOK)
1.11319 + {
1.11320 + INFO_PRINTF1(_L("Test failed"));
1.11321 + return EFail;
1.11322 + }
1.11323 + else
1.11324 + return EPass;
1.11325 + }
1.11326 +
1.11327 +//------------------------------------------------------------------
1.11328 +
1.11329 +
1.11330 +/** @xxxx
1.11331 + * Constructor
1.11332 + */
1.11333 +CTest_MMF_ACOD_U_0237::CTest_MMF_ACOD_U_0237()
1.11334 + {
1.11335 + // store the name of this test case
1.11336 + // this is the name that is used by the script file
1.11337 + // Each test step initialises it's own name
1.11338 + iTestStepName = _L("MM-MMF-ACOD-U-0237-HP");
1.11339 + }
1.11340 +
1.11341 +/** @xxxx
1.11342 + * MULAW To PCM16 Test for memory leaks
1.11343 + * @test Req. under test REQ172.11
1.11344 + */
1.11345 +TVerdict CTest_MMF_ACOD_U_0237::DoTestStepL()
1.11346 + {
1.11347 + const TUid codecUid = {KMmfUidCodecMulawToPCM16};
1.11348 + TBool testOK = EFalse;
1.11349 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.11350 +
1.11351 + if (err)
1.11352 + {
1.11353 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11354 + return EFail;
1.11355 + }
1.11356 + else if (!testOK)
1.11357 + {
1.11358 + INFO_PRINTF1(_L("Test failed"));
1.11359 + return EFail;
1.11360 + }
1.11361 + else
1.11362 + return EPass;
1.11363 + }
1.11364 +
1.11365 +//------------------------------------------------------------------
1.11366 +
1.11367 +
1.11368 +/** @xxxx
1.11369 + * Constructor
1.11370 + */
1.11371 +CTest_MMF_ACOD_U_0238::CTest_MMF_ACOD_U_0238()
1.11372 + {
1.11373 + // store the name of this test case
1.11374 + // this is the name that is used by the script file
1.11375 + // Each test step initialises it's own name
1.11376 + iTestStepName = _L("MM-MMF-ACOD-U-0238-HP");
1.11377 + }
1.11378 +
1.11379 +/** @xxxx
1.11380 + * MULAW To PCM16 Test for memory scribbles
1.11381 + * @test Req. under test REQ172.11
1.11382 + */
1.11383 +TVerdict CTest_MMF_ACOD_U_0238::DoTestStepL()
1.11384 + {
1.11385 + const TUid codecUid = {KMmfUidCodecMulawToPCM16};
1.11386 + TBool testOK = EFalse;
1.11387 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.11388 +
1.11389 + if (err)
1.11390 + {
1.11391 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11392 + return EFail;
1.11393 + }
1.11394 + else if (!testOK)
1.11395 + {
1.11396 + INFO_PRINTF1(_L("Test failed"));
1.11397 + return EFail;
1.11398 + }
1.11399 + else
1.11400 + return EPass;
1.11401 + }
1.11402 +
1.11403 +//------------------------------------------------------------------
1.11404 +
1.11405 +/** @xxxx
1.11406 + * Constructor
1.11407 + */
1.11408 +CTest_MMF_ACOD_U_0239::CTest_MMF_ACOD_U_0239()
1.11409 + {
1.11410 + // store the name of this test case
1.11411 + // this is the name that is used by the script file
1.11412 + // Each test step initialises it's own name
1.11413 + iTestStepName = _L("MM-MMF-ACOD-U-0239-HP");
1.11414 +
1.11415 + for (TUint i=0; i<5; i++)
1.11416 + {
1.11417 + iExpectedSrcBytesProcessed[i] = 0;
1.11418 + iExpectedDstBytesAdded[i] = 0;
1.11419 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.11420 + }
1.11421 + }
1.11422 +
1.11423 +/** @xxxx
1.11424 + * PCM16 to MULAW Pass in zero sized source buffer
1.11425 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.11426 + */
1.11427 +TVerdict CTest_MMF_ACOD_U_0239::DoTestStepL()
1.11428 + {
1.11429 + const TUid codecUid = {KMmfUidCodecPCM16ToMulaw};
1.11430 + TBool testOK = EFalse;
1.11431 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToMulawOptimumDst));
1.11432 +
1.11433 + if (err)
1.11434 + {
1.11435 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11436 + return EFail;
1.11437 + }
1.11438 + else if (!testOK)
1.11439 + {
1.11440 + INFO_PRINTF1(_L("Test failed"));
1.11441 + return EFail;
1.11442 + }
1.11443 + else
1.11444 + return EPass;
1.11445 + }
1.11446 +
1.11447 +//------------------------------------------------------------------
1.11448 +
1.11449 +/** @xxxx
1.11450 + * Constructor
1.11451 + */
1.11452 +CTest_MMF_ACOD_U_0240::CTest_MMF_ACOD_U_0240()
1.11453 + {
1.11454 + // store the name of this test case
1.11455 + // this is the name that is used by the script file
1.11456 + // Each test step initialises it's own name
1.11457 + iTestStepName = _L("MM-MMF-ACOD-U-0240-HP");
1.11458 +
1.11459 + iExpectedLeaveErrorCode = KErrArgument;
1.11460 + }
1.11461 +
1.11462 +/** @xxxx
1.11463 + * PCM16 to MULAW Pass in zero sized destination buffer
1.11464 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.11465 + */
1.11466 +TVerdict CTest_MMF_ACOD_U_0240::DoTestStepL()
1.11467 + {
1.11468 + const TUid codecUid = {KMmfUidCodecPCM16ToMulaw};
1.11469 + TBool testOK = EFalse;
1.11470 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToMulawOptimumSrc, 0));
1.11471 +
1.11472 + if (err)
1.11473 + {
1.11474 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11475 + return EFail;
1.11476 + }
1.11477 + else if (!testOK)
1.11478 + {
1.11479 + INFO_PRINTF1(_L("Test failed"));
1.11480 + return EFail;
1.11481 + }
1.11482 + else
1.11483 + return EPass;
1.11484 + }
1.11485 +
1.11486 +//------------------------------------------------------------------
1.11487 +
1.11488 +/** @xxxx
1.11489 + * Constructor
1.11490 + */
1.11491 +CTest_MMF_ACOD_U_0241::CTest_MMF_ACOD_U_0241()
1.11492 + {
1.11493 + // store the name of this test case
1.11494 + // this is the name that is used by the script file
1.11495 + // Each test step initialises it's own name
1.11496 + iTestStepName = _L("MM-MMF-ACOD-U-0241-HP");
1.11497 + }
1.11498 +
1.11499 +/** @xxxx
1.11500 + * PCM16 to MULAW Test out of memory
1.11501 + * @test Req. under test REQ172.11
1.11502 + */
1.11503 +TVerdict CTest_MMF_ACOD_U_0241::DoTestStepL()
1.11504 + {
1.11505 + const TUid codecUid = {KMmfUidCodecPCM16ToMulaw};
1.11506 + TBool testOK = EFalse;
1.11507 +
1.11508 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.11509 + if (err==KErrNone && testOK)
1.11510 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.11511 +
1.11512 + if (err)
1.11513 + {
1.11514 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11515 + return EFail;
1.11516 + }
1.11517 + else if (!testOK)
1.11518 + {
1.11519 + INFO_PRINTF1(_L("Test failed"));
1.11520 + return EFail;
1.11521 + }
1.11522 + else
1.11523 + return EPass;
1.11524 + }
1.11525 +
1.11526 +//------------------------------------------------------------------
1.11527 +
1.11528 +
1.11529 +/** @xxxx
1.11530 + * Constructor
1.11531 + */
1.11532 +CTest_MMF_ACOD_U_0242::CTest_MMF_ACOD_U_0242()
1.11533 + {
1.11534 + // store the name of this test case
1.11535 + // this is the name that is used by the script file
1.11536 + // Each test step initialises it's own name
1.11537 + iTestStepName = _L("MM-MMF-ACOD-U-0242-HP");
1.11538 + }
1.11539 +
1.11540 +/** @xxxx
1.11541 + * PCM16 to MULAW Test for memory leaks
1.11542 + * @test Req. under test REQ172.11
1.11543 + */
1.11544 +TVerdict CTest_MMF_ACOD_U_0242::DoTestStepL()
1.11545 + {
1.11546 + const TUid codecUid = {KMmfUidCodecPCM16ToMulaw};
1.11547 + TBool testOK = EFalse;
1.11548 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.11549 +
1.11550 + if (err)
1.11551 + {
1.11552 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11553 + return EFail;
1.11554 + }
1.11555 + else if (!testOK)
1.11556 + {
1.11557 + INFO_PRINTF1(_L("Test failed"));
1.11558 + return EFail;
1.11559 + }
1.11560 + else
1.11561 + return EPass;
1.11562 + }
1.11563 +
1.11564 +//------------------------------------------------------------------
1.11565 +
1.11566 +
1.11567 +/** @xxxx
1.11568 + * Constructor
1.11569 + */
1.11570 +CTest_MMF_ACOD_U_0243::CTest_MMF_ACOD_U_0243()
1.11571 + {
1.11572 + // store the name of this test case
1.11573 + // this is the name that is used by the script file
1.11574 + // Each test step initialises it's own name
1.11575 + iTestStepName = _L("MM-MMF-ACOD-U-0243-HP");
1.11576 + }
1.11577 +
1.11578 +/** @xxxx
1.11579 + * PCM16 to MULAW Test for memory scribbles
1.11580 + * @test Req. under test REQ172.11
1.11581 + */
1.11582 +TVerdict CTest_MMF_ACOD_U_0243::DoTestStepL()
1.11583 + {
1.11584 + const TUid codecUid = {KMmfUidCodecPCM16ToMulaw};
1.11585 + TBool testOK = EFalse;
1.11586 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.11587 +
1.11588 + if (err)
1.11589 + {
1.11590 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11591 + return EFail;
1.11592 + }
1.11593 + else if (!testOK)
1.11594 + {
1.11595 + INFO_PRINTF1(_L("Test failed"));
1.11596 + return EFail;
1.11597 + }
1.11598 + else
1.11599 + return EPass;
1.11600 + }
1.11601 +
1.11602 +//------------------------------------------------------------------
1.11603 +
1.11604 +/** @xxxx
1.11605 + * Constructor
1.11606 + */
1.11607 +CTest_MMF_ACOD_U_0244::CTest_MMF_ACOD_U_0244()
1.11608 + {
1.11609 + // store the name of this test case
1.11610 + // this is the name that is used by the script file
1.11611 + // Each test step initialises it's own name
1.11612 + iTestStepName = _L("MM-MMF-ACOD-U-0244-HP");
1.11613 +
1.11614 + for (TUint i=0; i<5; i++)
1.11615 + {
1.11616 + iExpectedSrcBytesProcessed[i] = 0;
1.11617 + iExpectedDstBytesAdded[i] = 0;
1.11618 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.11619 + }
1.11620 + }
1.11621 +
1.11622 +/** @xxxx
1.11623 + * IMAD To PCM16 Pass in zero sized source buffer
1.11624 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.11625 + */
1.11626 +TVerdict CTest_MMF_ACOD_U_0244::DoTestStepL()
1.11627 + {
1.11628 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16};
1.11629 + TBool testOK = EFalse;
1.11630 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KAdpcmToPCM16OptimumDst));
1.11631 +
1.11632 + if (err)
1.11633 + {
1.11634 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11635 + return EFail;
1.11636 + }
1.11637 + else if (!testOK)
1.11638 + {
1.11639 + INFO_PRINTF1(_L("Test failed"));
1.11640 + return EFail;
1.11641 + }
1.11642 + else
1.11643 + return EPass;
1.11644 + }
1.11645 +
1.11646 +//------------------------------------------------------------------
1.11647 +
1.11648 +/** @xxxx
1.11649 + * Constructor
1.11650 + */
1.11651 +CTest_MMF_ACOD_U_0245::CTest_MMF_ACOD_U_0245()
1.11652 + {
1.11653 + // store the name of this test case
1.11654 + // this is the name that is used by the script file
1.11655 + // Each test step initialises it's own name
1.11656 + iTestStepName = _L("MM-MMF-ACOD-U-0245-HP");
1.11657 +
1.11658 + iExpectedLeaveErrorCode = KErrArgument;
1.11659 + }
1.11660 +
1.11661 +/** @xxxx
1.11662 + * IMAD To PCM16 Pass in zero sized destination buffer
1.11663 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.11664 + */
1.11665 +TVerdict CTest_MMF_ACOD_U_0245::DoTestStepL()
1.11666 + {
1.11667 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16};
1.11668 + TBool testOK = EFalse;
1.11669 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KAdpcmToPCM16OptimumSrc, 0));
1.11670 +
1.11671 + if (err)
1.11672 + {
1.11673 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11674 + return EFail;
1.11675 + }
1.11676 + else if (!testOK)
1.11677 + {
1.11678 + INFO_PRINTF1(_L("Test failed"));
1.11679 + return EFail;
1.11680 + }
1.11681 + else
1.11682 + return EPass;
1.11683 + }
1.11684 +
1.11685 +//------------------------------------------------------------------
1.11686 +
1.11687 +/** @xxxx
1.11688 + * Constructor
1.11689 + */
1.11690 +CTest_MMF_ACOD_U_0246::CTest_MMF_ACOD_U_0246()
1.11691 + {
1.11692 + // store the name of this test case
1.11693 + // this is the name that is used by the script file
1.11694 + // Each test step initialises it's own name
1.11695 + iTestStepName = _L("MM-MMF-ACOD-U-0246-HP");
1.11696 + }
1.11697 +
1.11698 +/** @xxxx
1.11699 + * IMAD To PCM16 Test out of memory
1.11700 + * @test Req. under test REQ172.11
1.11701 + */
1.11702 +TVerdict CTest_MMF_ACOD_U_0246::DoTestStepL()
1.11703 + {
1.11704 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16};
1.11705 + TBool testOK = EFalse;
1.11706 +
1.11707 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.11708 + if (err==KErrNone && testOK)
1.11709 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.11710 +
1.11711 + if (err)
1.11712 + {
1.11713 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11714 + return EFail;
1.11715 + }
1.11716 + else if (!testOK)
1.11717 + {
1.11718 + INFO_PRINTF1(_L("Test failed"));
1.11719 + return EFail;
1.11720 + }
1.11721 + else
1.11722 + return EPass;
1.11723 + }
1.11724 +
1.11725 +//------------------------------------------------------------------
1.11726 +
1.11727 +/** @xxxx
1.11728 + * Constructor
1.11729 + */
1.11730 +CTest_MMF_ACOD_U_0247::CTest_MMF_ACOD_U_0247()
1.11731 + {
1.11732 + // store the name of this test case
1.11733 + // this is the name that is used by the script file
1.11734 + // Each test step initialises it's own name
1.11735 + iTestStepName = _L("MM-MMF-ACOD-U-0247-HP");
1.11736 + }
1.11737 +
1.11738 +/** @xxxx
1.11739 + * IMAD To PCM16 Test for memory leaks
1.11740 + * @test Req. under test REQ172.11
1.11741 + */
1.11742 +TVerdict CTest_MMF_ACOD_U_0247::DoTestStepL()
1.11743 + {
1.11744 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16};
1.11745 + TBool testOK = EFalse;
1.11746 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.11747 +
1.11748 + if (err)
1.11749 + {
1.11750 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11751 + return EFail;
1.11752 + }
1.11753 + else if (!testOK)
1.11754 + {
1.11755 + INFO_PRINTF1(_L("Test failed"));
1.11756 + return EFail;
1.11757 + }
1.11758 + else
1.11759 + return EPass;
1.11760 + }
1.11761 +
1.11762 +//------------------------------------------------------------------
1.11763 +
1.11764 +/** @xxxx
1.11765 + * Constructor
1.11766 + */
1.11767 +CTest_MMF_ACOD_U_0248::CTest_MMF_ACOD_U_0248()
1.11768 + {
1.11769 + // store the name of this test case
1.11770 + // this is the name that is used by the script file
1.11771 + // Each test step initialises it's own name
1.11772 + iTestStepName = _L("MM-MMF-ACOD-U-0248-HP");
1.11773 + }
1.11774 +
1.11775 +/** @xxxx
1.11776 + * IMAD To PCM16 Test for memory scribbles
1.11777 + * @test Req. under test REQ172.11
1.11778 + */
1.11779 +TVerdict CTest_MMF_ACOD_U_0248::DoTestStepL()
1.11780 + {
1.11781 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16};
1.11782 + TBool testOK = EFalse;
1.11783 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.11784 +
1.11785 + if (err)
1.11786 + {
1.11787 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11788 + return EFail;
1.11789 + }
1.11790 + else if (!testOK)
1.11791 + {
1.11792 + INFO_PRINTF1(_L("Test failed"));
1.11793 + return EFail;
1.11794 + }
1.11795 + else
1.11796 + return EPass;
1.11797 + }
1.11798 +
1.11799 +//------------------------------------------------------------------
1.11800 +
1.11801 +/** @xxxx
1.11802 + * Constructor
1.11803 + */
1.11804 +CTest_MMF_ACOD_U_0249::CTest_MMF_ACOD_U_0249()
1.11805 + {
1.11806 + // store the name of this test case
1.11807 + // this is the name that is used by the script file
1.11808 + // Each test step initialises it's own name
1.11809 + iTestStepName = _L("MM-MMF-ACOD-U-0249-HP");
1.11810 +
1.11811 + for (TUint i=0; i<5; i++)
1.11812 + {
1.11813 + iExpectedSrcBytesProcessed[i] = 0;
1.11814 + iExpectedDstBytesAdded[i] = 0;
1.11815 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.11816 + }
1.11817 + }
1.11818 +
1.11819 +/** @xxxx
1.11820 + * PCM16 to IMAD Pass in zero sized source buffer
1.11821 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.11822 + */
1.11823 +TVerdict CTest_MMF_ACOD_U_0249::DoTestStepL()
1.11824 + {
1.11825 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM};
1.11826 + TBool testOK = EFalse;
1.11827 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToAdpcmOptimumDst));
1.11828 +
1.11829 + if (err)
1.11830 + {
1.11831 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11832 + return EFail;
1.11833 + }
1.11834 + else if (!testOK)
1.11835 + {
1.11836 + INFO_PRINTF1(_L("Test failed"));
1.11837 + return EFail;
1.11838 + }
1.11839 + else
1.11840 + return EPass;
1.11841 + }
1.11842 +
1.11843 +//------------------------------------------------------------------
1.11844 +
1.11845 +/** @xxxx
1.11846 + * Constructor
1.11847 + */
1.11848 +CTest_MMF_ACOD_U_0250::CTest_MMF_ACOD_U_0250()
1.11849 + {
1.11850 + // store the name of this test case
1.11851 + // this is the name that is used by the script file
1.11852 + // Each test step initialises it's own name
1.11853 + iTestStepName = _L("MM-MMF-ACOD-U-0250-HP");
1.11854 +
1.11855 + iExpectedLeaveErrorCode = KErrArgument;
1.11856 + }
1.11857 +
1.11858 +/** @xxxx
1.11859 + * PCM16 to IMAD Pass in zero sized destination buffer
1.11860 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.11861 + */
1.11862 +TVerdict CTest_MMF_ACOD_U_0250::DoTestStepL()
1.11863 + {
1.11864 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM};
1.11865 + TBool testOK = EFalse;
1.11866 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToAdpcmOptimumSrc, 0));
1.11867 +
1.11868 + if (err)
1.11869 + {
1.11870 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11871 + return EFail;
1.11872 + }
1.11873 + else if (!testOK)
1.11874 + {
1.11875 + INFO_PRINTF1(_L("Test failed"));
1.11876 + return EFail;
1.11877 + }
1.11878 + else
1.11879 + return EPass;
1.11880 + }
1.11881 +
1.11882 +//------------------------------------------------------------------
1.11883 +
1.11884 +/** @xxxx
1.11885 + * Constructor
1.11886 + */
1.11887 +CTest_MMF_ACOD_U_0251::CTest_MMF_ACOD_U_0251()
1.11888 + {
1.11889 + // store the name of this test case
1.11890 + // this is the name that is used by the script file
1.11891 + // Each test step initialises it's own name
1.11892 + iTestStepName = _L("MM-MMF-ACOD-U-0251-HP");
1.11893 + }
1.11894 +
1.11895 +/** @xxxx
1.11896 + * PCM16 to IMAD Test out of memory
1.11897 + * @test Req. under test REQ172.11
1.11898 + */
1.11899 +TVerdict CTest_MMF_ACOD_U_0251::DoTestStepL()
1.11900 + {
1.11901 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM};
1.11902 + TBool testOK = EFalse;
1.11903 +
1.11904 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.11905 + if (err==KErrNone && testOK)
1.11906 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.11907 +
1.11908 + if (err)
1.11909 + {
1.11910 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11911 + return EFail;
1.11912 + }
1.11913 + else if (!testOK)
1.11914 + {
1.11915 + INFO_PRINTF1(_L("Test failed"));
1.11916 + return EFail;
1.11917 + }
1.11918 + else
1.11919 + return EPass;
1.11920 + }
1.11921 +
1.11922 +//------------------------------------------------------------------
1.11923 +
1.11924 +
1.11925 +/** @xxxx
1.11926 + * Constructor
1.11927 + */
1.11928 +CTest_MMF_ACOD_U_0252::CTest_MMF_ACOD_U_0252()
1.11929 + {
1.11930 + // store the name of this test case
1.11931 + // this is the name that is used by the script file
1.11932 + // Each test step initialises it's own name
1.11933 + iTestStepName = _L("MM-MMF-ACOD-U-0252-HP");
1.11934 + }
1.11935 +
1.11936 +/** @xxxx
1.11937 + * PCM16 to IMAD Test for memory leaks
1.11938 + * @test Req. under test REQ172.11
1.11939 + */
1.11940 +TVerdict CTest_MMF_ACOD_U_0252::DoTestStepL()
1.11941 + {
1.11942 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM};
1.11943 + TBool testOK = EFalse;
1.11944 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.11945 +
1.11946 + if (err)
1.11947 + {
1.11948 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11949 + return EFail;
1.11950 + }
1.11951 + else if (!testOK)
1.11952 + {
1.11953 + INFO_PRINTF1(_L("Test failed"));
1.11954 + return EFail;
1.11955 + }
1.11956 + else
1.11957 + return EPass;
1.11958 + }
1.11959 +
1.11960 +//------------------------------------------------------------------
1.11961 +
1.11962 +/** @xxxx
1.11963 + * Constructor
1.11964 + */
1.11965 +CTest_MMF_ACOD_U_0253::CTest_MMF_ACOD_U_0253()
1.11966 + {
1.11967 + // store the name of this test case
1.11968 + // this is the name that is used by the script file
1.11969 + // Each test step initialises it's own name
1.11970 + iTestStepName = _L("MM-MMF-ACOD-U-0253-HP");
1.11971 + }
1.11972 +
1.11973 +/** @xxxx
1.11974 + * PCM16 to IMAD Test for memory scribbles
1.11975 + * @test Req. under test REQ172.11
1.11976 + */
1.11977 +TVerdict CTest_MMF_ACOD_U_0253::DoTestStepL()
1.11978 + {
1.11979 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCM};
1.11980 + TBool testOK = EFalse;
1.11981 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.11982 +
1.11983 + if (err)
1.11984 + {
1.11985 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.11986 + return EFail;
1.11987 + }
1.11988 + else if (!testOK)
1.11989 + {
1.11990 + INFO_PRINTF1(_L("Test failed"));
1.11991 + return EFail;
1.11992 + }
1.11993 + else
1.11994 + return EPass;
1.11995 + }
1.11996 +
1.11997 +//------------------------------------------------------------------
1.11998 +
1.11999 +/** @xxxx
1.12000 + * Constructor
1.12001 + */
1.12002 +CTest_MMF_ACOD_U_0254::CTest_MMF_ACOD_U_0254()
1.12003 + {
1.12004 + // store the name of this test case
1.12005 + // this is the name that is used by the script file
1.12006 + // Each test step initialises it's own name
1.12007 + iTestStepName = _L("MM-MMF-ACOD-U-0254-HP");
1.12008 +
1.12009 + for (TUint i=0; i<5; i++)
1.12010 + {
1.12011 + iExpectedSrcBytesProcessed[i] = 0;
1.12012 + iExpectedDstBytesAdded[i] = 0;
1.12013 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.12014 + }
1.12015 + }
1.12016 +
1.12017 +/** @xxxx
1.12018 + * IMAS To PCM16 Pass in zero sized source buffer
1.12019 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.12020 + */
1.12021 +TVerdict CTest_MMF_ACOD_U_0254::DoTestStepL()
1.12022 + {
1.12023 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo};
1.12024 + TBool testOK = EFalse;
1.12025 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KStereoAdpcmToPCM16OptimumDst));
1.12026 +
1.12027 + if (err)
1.12028 + {
1.12029 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12030 + return EFail;
1.12031 + }
1.12032 + else if (!testOK)
1.12033 + {
1.12034 + INFO_PRINTF1(_L("Test failed"));
1.12035 + return EFail;
1.12036 + }
1.12037 + else
1.12038 + return EPass;
1.12039 + }
1.12040 +
1.12041 +//------------------------------------------------------------------
1.12042 +
1.12043 +/** @xxxx
1.12044 + * Constructor
1.12045 + */
1.12046 +CTest_MMF_ACOD_U_0255::CTest_MMF_ACOD_U_0255()
1.12047 + {
1.12048 + // store the name of this test case
1.12049 + // this is the name that is used by the script file
1.12050 + // Each test step initialises it's own name
1.12051 + iTestStepName = _L("MM-MMF-ACOD-U-0255-HP");
1.12052 +
1.12053 + iExpectedLeaveErrorCode = KErrArgument;
1.12054 + }
1.12055 +
1.12056 +/** @xxxx
1.12057 + * IMAS To PCM16 Pass in zero sized destination buffer
1.12058 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.12059 + */
1.12060 +TVerdict CTest_MMF_ACOD_U_0255::DoTestStepL()
1.12061 + {
1.12062 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo};
1.12063 + TBool testOK = EFalse;
1.12064 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KStereoAdpcmToPCM16OptimumSrc, 0));
1.12065 +
1.12066 + if (err)
1.12067 + {
1.12068 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12069 + return EFail;
1.12070 + }
1.12071 + else if (!testOK)
1.12072 + {
1.12073 + INFO_PRINTF1(_L("Test failed"));
1.12074 + return EFail;
1.12075 + }
1.12076 + else
1.12077 + return EPass;
1.12078 + }
1.12079 +
1.12080 +//------------------------------------------------------------------
1.12081 +
1.12082 +/** @xxxx
1.12083 + * Constructor
1.12084 + */
1.12085 +CTest_MMF_ACOD_U_0256::CTest_MMF_ACOD_U_0256()
1.12086 + {
1.12087 + // store the name of this test case
1.12088 + // this is the name that is used by the script file
1.12089 + // Each test step initialises it's own name
1.12090 + iTestStepName = _L("MM-MMF-ACOD-U-0256-HP");
1.12091 + }
1.12092 +
1.12093 +/** @xxxx
1.12094 + * IMAS To PCM16 Test out of memory
1.12095 + * @test Req. under test REQ172.11
1.12096 + */
1.12097 +TVerdict CTest_MMF_ACOD_U_0256::DoTestStepL()
1.12098 + {
1.12099 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo};
1.12100 + TBool testOK = EFalse;
1.12101 +
1.12102 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.12103 + if (err==KErrNone && testOK)
1.12104 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.12105 +
1.12106 + if (err)
1.12107 + {
1.12108 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12109 + return EFail;
1.12110 + }
1.12111 + else if (!testOK)
1.12112 + {
1.12113 + INFO_PRINTF1(_L("Test failed"));
1.12114 + return EFail;
1.12115 + }
1.12116 + else
1.12117 + return EPass;
1.12118 + }
1.12119 +
1.12120 +//------------------------------------------------------------------
1.12121 +
1.12122 +/** @xxxx
1.12123 + * Constructor
1.12124 + */
1.12125 +CTest_MMF_ACOD_U_0257::CTest_MMF_ACOD_U_0257()
1.12126 + {
1.12127 + // store the name of this test case
1.12128 + // this is the name that is used by the script file
1.12129 + // Each test step initialises it's own name
1.12130 + iTestStepName = _L("MM-MMF-ACOD-U-0257-HP");
1.12131 + }
1.12132 +
1.12133 +/** @xxxx
1.12134 + * IMAS To PCM16 Test for memory leaks
1.12135 + * @test Req. under test REQ172.11
1.12136 + */
1.12137 +TVerdict CTest_MMF_ACOD_U_0257::DoTestStepL()
1.12138 + {
1.12139 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo};
1.12140 + TBool testOK = EFalse;
1.12141 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.12142 +
1.12143 + if (err)
1.12144 + {
1.12145 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12146 + return EFail;
1.12147 + }
1.12148 + else if (!testOK)
1.12149 + {
1.12150 + INFO_PRINTF1(_L("Test failed"));
1.12151 + return EFail;
1.12152 + }
1.12153 + else
1.12154 + return EPass;
1.12155 + }
1.12156 +
1.12157 +//------------------------------------------------------------------
1.12158 +
1.12159 +/** @xxxx
1.12160 + * Constructor
1.12161 + */
1.12162 +CTest_MMF_ACOD_U_0258::CTest_MMF_ACOD_U_0258()
1.12163 + {
1.12164 + // store the name of this test case
1.12165 + // this is the name that is used by the script file
1.12166 + // Each test step initialises it's own name
1.12167 + iTestStepName = _L("MM-MMF-ACOD-U-0258-HP");
1.12168 + }
1.12169 +
1.12170 +/** @xxxx
1.12171 + * IMAS To PCM16 Test for memory scribbles
1.12172 + * @test Req. under test REQ172.11
1.12173 + */
1.12174 +TVerdict CTest_MMF_ACOD_U_0258::DoTestStepL()
1.12175 + {
1.12176 + const TUid codecUid = {KMmfUidCodecIMAADPCMToPCM16Stereo};
1.12177 + TBool testOK = EFalse;
1.12178 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.12179 +
1.12180 + if (err)
1.12181 + {
1.12182 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12183 + return EFail;
1.12184 + }
1.12185 + else if (!testOK)
1.12186 + {
1.12187 + INFO_PRINTF1(_L("Test failed"));
1.12188 + return EFail;
1.12189 + }
1.12190 + else
1.12191 + return EPass;
1.12192 + }
1.12193 +
1.12194 +//------------------------------------------------------------------
1.12195 +
1.12196 +/** @xxxx
1.12197 + * Constructor
1.12198 + */
1.12199 +CTest_MMF_ACOD_U_0259::CTest_MMF_ACOD_U_0259()
1.12200 + {
1.12201 + // store the name of this test case
1.12202 + // this is the name that is used by the script file
1.12203 + // Each test step initialises it's own name
1.12204 + iTestStepName = _L("MM-MMF-ACOD-U-0259-HP");
1.12205 +
1.12206 + for (TUint i=0; i<5; i++)
1.12207 + {
1.12208 + iExpectedSrcBytesProcessed[i] = 0;
1.12209 + iExpectedDstBytesAdded[i] = 0;
1.12210 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.12211 + }
1.12212 + }
1.12213 +
1.12214 +/** @xxxx
1.12215 + * PCM16 to IMAS Pass in zero sized source buffer
1.12216 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.12217 + */
1.12218 +TVerdict CTest_MMF_ACOD_U_0259::DoTestStepL()
1.12219 + {
1.12220 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo};
1.12221 + TBool testOK = EFalse;
1.12222 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToStereoAdpcmOptimumDst));
1.12223 +
1.12224 + if (err)
1.12225 + {
1.12226 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12227 + return EFail;
1.12228 + }
1.12229 + else if (!testOK)
1.12230 + {
1.12231 + INFO_PRINTF1(_L("Test failed"));
1.12232 + return EFail;
1.12233 + }
1.12234 + else
1.12235 + return EPass;
1.12236 + }
1.12237 +
1.12238 +//------------------------------------------------------------------
1.12239 +
1.12240 +/** @xxxx
1.12241 + * Constructor
1.12242 + */
1.12243 +CTest_MMF_ACOD_U_0260::CTest_MMF_ACOD_U_0260()
1.12244 + {
1.12245 + // store the name of this test case
1.12246 + // this is the name that is used by the script file
1.12247 + // Each test step initialises it's own name
1.12248 + iTestStepName = _L("MM-MMF-ACOD-U-0260-HP");
1.12249 +
1.12250 + iExpectedLeaveErrorCode = KErrArgument;
1.12251 + }
1.12252 +
1.12253 +/** @xxxx
1.12254 + * PCM16 to IMAS Pass in zero sized destination buffer
1.12255 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.12256 + */
1.12257 +TVerdict CTest_MMF_ACOD_U_0260::DoTestStepL()
1.12258 + {
1.12259 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo};
1.12260 + TBool testOK = EFalse;
1.12261 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToStereoAdpcmOptimumSrc, 0));
1.12262 +
1.12263 + if (err)
1.12264 + {
1.12265 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12266 + return EFail;
1.12267 + }
1.12268 + else if (!testOK)
1.12269 + {
1.12270 + INFO_PRINTF1(_L("Test failed"));
1.12271 + return EFail;
1.12272 + }
1.12273 + else
1.12274 + return EPass;
1.12275 + }
1.12276 +
1.12277 +//------------------------------------------------------------------
1.12278 +
1.12279 +/** @xxxx
1.12280 + * Constructor
1.12281 + */
1.12282 +CTest_MMF_ACOD_U_0261::CTest_MMF_ACOD_U_0261()
1.12283 + {
1.12284 + // store the name of this test case
1.12285 + // this is the name that is used by the script file
1.12286 + // Each test step initialises it's own name
1.12287 + iTestStepName = _L("MM-MMF-ACOD-U-0261-HP");
1.12288 + }
1.12289 +
1.12290 +/** @xxxx
1.12291 + * PCM16 to IMAS Test out of memory
1.12292 + * @test Req. under test REQ172.11
1.12293 + */
1.12294 +TVerdict CTest_MMF_ACOD_U_0261::DoTestStepL()
1.12295 + {
1.12296 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo};
1.12297 + TBool testOK = EFalse;
1.12298 +
1.12299 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.12300 + if (err==KErrNone && testOK)
1.12301 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.12302 +
1.12303 + if (err)
1.12304 + {
1.12305 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12306 + return EFail;
1.12307 + }
1.12308 + else if (!testOK)
1.12309 + {
1.12310 + INFO_PRINTF1(_L("Test failed"));
1.12311 + return EFail;
1.12312 + }
1.12313 + else
1.12314 + return EPass;
1.12315 + }
1.12316 +
1.12317 +//------------------------------------------------------------------
1.12318 +
1.12319 +
1.12320 +/** @xxxx
1.12321 + * Constructor
1.12322 + */
1.12323 +CTest_MMF_ACOD_U_0262::CTest_MMF_ACOD_U_0262()
1.12324 + {
1.12325 + // store the name of this test case
1.12326 + // this is the name that is used by the script file
1.12327 + // Each test step initialises it's own name
1.12328 + iTestStepName = _L("MM-MMF-ACOD-U-0262-HP");
1.12329 + }
1.12330 +
1.12331 +/** @xxxx
1.12332 + * PCM16 to IMAS Test for memory leaks
1.12333 + * @test Req. under test REQ172.11
1.12334 + */
1.12335 +TVerdict CTest_MMF_ACOD_U_0262::DoTestStepL()
1.12336 + {
1.12337 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo};
1.12338 + TBool testOK = EFalse;
1.12339 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.12340 +
1.12341 + if (err)
1.12342 + {
1.12343 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12344 + return EFail;
1.12345 + }
1.12346 + else if (!testOK)
1.12347 + {
1.12348 + INFO_PRINTF1(_L("Test failed"));
1.12349 + return EFail;
1.12350 + }
1.12351 + else
1.12352 + return EPass;
1.12353 + }
1.12354 +
1.12355 +//------------------------------------------------------------------
1.12356 +
1.12357 +/** @xxxx
1.12358 + * Constructor
1.12359 + */
1.12360 +CTest_MMF_ACOD_U_0263::CTest_MMF_ACOD_U_0263()
1.12361 + {
1.12362 + // store the name of this test case
1.12363 + // this is the name that is used by the script file
1.12364 + // Each test step initialises it's own name
1.12365 + iTestStepName = _L("MM-MMF-ACOD-U-0263-HP");
1.12366 + }
1.12367 +
1.12368 +/** @xxxx
1.12369 + * PCM16 to IMAS Test for memory scribbles
1.12370 + * @test Req. under test REQ172.11
1.12371 + */
1.12372 +TVerdict CTest_MMF_ACOD_U_0263::DoTestStepL()
1.12373 + {
1.12374 + const TUid codecUid = {KMmfUidCodecPCM16ToIMAADPCMStereo};
1.12375 + TBool testOK = EFalse;
1.12376 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.12377 +
1.12378 + if (err)
1.12379 + {
1.12380 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12381 + return EFail;
1.12382 + }
1.12383 + else if (!testOK)
1.12384 + {
1.12385 + INFO_PRINTF1(_L("Test failed"));
1.12386 + return EFail;
1.12387 + }
1.12388 + else
1.12389 + return EPass;
1.12390 + }
1.12391 +
1.12392 +//------------------------------------------------------------------
1.12393 +
1.12394 +/** @xxxx
1.12395 + * Constructor
1.12396 + */
1.12397 +CTest_MMF_ACOD_U_0264::CTest_MMF_ACOD_U_0264()
1.12398 + {
1.12399 + // store the name of this test case
1.12400 + // this is the name that is used by the script file
1.12401 + // Each test step initialises it's own name
1.12402 + iTestStepName = _L("MM-MMF-ACOD-U-0264-HP");
1.12403 +
1.12404 + for (TUint i=0; i<5; i++)
1.12405 + {
1.12406 + iExpectedSrcBytesProcessed[i] = 0;
1.12407 + iExpectedDstBytesAdded[i] = 0;
1.12408 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.12409 + }
1.12410 + }
1.12411 +
1.12412 +/** @xxxx
1.12413 + * GSM610 To PCM16 Pass in zero sized source buffer
1.12414 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.12415 + */
1.12416 +TVerdict CTest_MMF_ACOD_U_0264::DoTestStepL()
1.12417 + {
1.12418 + const TUid codecUid = {KMmfUidCodecGSM610ToPCM16};
1.12419 + TBool testOK = EFalse;
1.12420 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KGSM610ToPCM16OptimumDst));
1.12421 +
1.12422 + if (err)
1.12423 + {
1.12424 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12425 + return EFail;
1.12426 + }
1.12427 + else if (!testOK)
1.12428 + {
1.12429 + INFO_PRINTF1(_L("Test failed"));
1.12430 + return EFail;
1.12431 + }
1.12432 + else
1.12433 + return EPass;
1.12434 + }
1.12435 +
1.12436 +//------------------------------------------------------------------
1.12437 +
1.12438 +/** @xxxx
1.12439 + * Constructor
1.12440 + */
1.12441 +CTest_MMF_ACOD_U_0265::CTest_MMF_ACOD_U_0265()
1.12442 + {
1.12443 + // store the name of this test case
1.12444 + // this is the name that is used by the script file
1.12445 + // Each test step initialises it's own name
1.12446 + iTestStepName = _L("MM-MMF-ACOD-U-0265-HP");
1.12447 +
1.12448 + iExpectedLeaveErrorCode = KErrArgument;
1.12449 + }
1.12450 +
1.12451 +/** @xxxx
1.12452 + * GSM610 To PCM16 Pass in zero sized destination buffer
1.12453 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.12454 + */
1.12455 +TVerdict CTest_MMF_ACOD_U_0265::DoTestStepL()
1.12456 + {
1.12457 + const TUid codecUid = {KMmfUidCodecGSM610ToPCM16};
1.12458 + TBool testOK = EFalse;
1.12459 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KGSM610ToPCM16OptimumSrc, 0));
1.12460 +
1.12461 + if (err)
1.12462 + {
1.12463 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12464 + return EFail;
1.12465 + }
1.12466 + else if (!testOK)
1.12467 + {
1.12468 + INFO_PRINTF1(_L("Test failed"));
1.12469 + return EFail;
1.12470 + }
1.12471 + else
1.12472 + return EPass;
1.12473 + }
1.12474 +
1.12475 +//------------------------------------------------------------------
1.12476 +
1.12477 +/** @xxxx
1.12478 + * Constructor
1.12479 + */
1.12480 +CTest_MMF_ACOD_U_0266::CTest_MMF_ACOD_U_0266()
1.12481 + {
1.12482 + // store the name of this test case
1.12483 + // this is the name that is used by the script file
1.12484 + // Each test step initialises it's own name
1.12485 + iTestStepName = _L("MM-MMF-ACOD-U-0266-HP");
1.12486 + }
1.12487 +
1.12488 +/** @xxxx
1.12489 + * GSM610 To PCM16 Test out of memory
1.12490 + * @test Req. under test REQ172.11
1.12491 + */
1.12492 +TVerdict CTest_MMF_ACOD_U_0266::DoTestStepL()
1.12493 + {
1.12494 + const TUid codecUid = {KMmfUidCodecGSM610ToPCM16};
1.12495 + TBool testOK = EFalse;
1.12496 +
1.12497 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.12498 + if (err==KErrNone && testOK)
1.12499 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.12500 +
1.12501 + if (err)
1.12502 + {
1.12503 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12504 + return EFail;
1.12505 + }
1.12506 + else if (!testOK)
1.12507 + {
1.12508 + INFO_PRINTF1(_L("Test failed"));
1.12509 + return EFail;
1.12510 + }
1.12511 + else
1.12512 + return EPass;
1.12513 + }
1.12514 +
1.12515 +//------------------------------------------------------------------
1.12516 +
1.12517 +/** @xxxx
1.12518 + * Constructor
1.12519 + */
1.12520 +CTest_MMF_ACOD_U_0267::CTest_MMF_ACOD_U_0267()
1.12521 + {
1.12522 + // store the name of this test case
1.12523 + // this is the name that is used by the script file
1.12524 + // Each test step initialises it's own name
1.12525 + iTestStepName = _L("MM-MMF-ACOD-U-0267-HP");
1.12526 + }
1.12527 +
1.12528 +/** @xxxx
1.12529 + * GSM610 To PCM16 Test for memory leaks
1.12530 + * @test Req. under test REQ172.11
1.12531 + */
1.12532 +TVerdict CTest_MMF_ACOD_U_0267::DoTestStepL()
1.12533 + {
1.12534 + const TUid codecUid = {KMmfUidCodecGSM610ToPCM16};
1.12535 + TBool testOK = EFalse;
1.12536 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.12537 +
1.12538 + if (err)
1.12539 + {
1.12540 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12541 + return EFail;
1.12542 + }
1.12543 + else if (!testOK)
1.12544 + {
1.12545 + INFO_PRINTF1(_L("Test failed"));
1.12546 + return EFail;
1.12547 + }
1.12548 + else
1.12549 + return EPass;
1.12550 + }
1.12551 +
1.12552 +//------------------------------------------------------------------
1.12553 +
1.12554 +/** @xxxx
1.12555 + * Constructor
1.12556 + */
1.12557 +CTest_MMF_ACOD_U_0268::CTest_MMF_ACOD_U_0268()
1.12558 + {
1.12559 + // store the name of this test case
1.12560 + // this is the name that is used by the script file
1.12561 + // Each test step initialises it's own name
1.12562 + iTestStepName = _L("MM-MMF-ACOD-U-0268-HP");
1.12563 + }
1.12564 +
1.12565 +/** @xxxx
1.12566 + * GSM610 To PCM16 Test for memory scribbles
1.12567 + * @test Req. under test REQ172.11
1.12568 + */
1.12569 +TVerdict CTest_MMF_ACOD_U_0268::DoTestStepL()
1.12570 + {
1.12571 + const TUid codecUid = {KMmfUidCodecGSM610ToPCM16};
1.12572 + TBool testOK = EFalse;
1.12573 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.12574 +
1.12575 + if (err)
1.12576 + {
1.12577 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12578 + return EFail;
1.12579 + }
1.12580 + else if (!testOK)
1.12581 + {
1.12582 + INFO_PRINTF1(_L("Test failed"));
1.12583 + return EFail;
1.12584 + }
1.12585 + else
1.12586 + return EPass;
1.12587 + }
1.12588 +
1.12589 +//------------------------------------------------------------------
1.12590 +
1.12591 +/** @xxxx
1.12592 + * Constructor
1.12593 + */
1.12594 +CTest_MMF_ACOD_U_0269::CTest_MMF_ACOD_U_0269()
1.12595 + {
1.12596 + // store the name of this test case
1.12597 + // this is the name that is used by the script file
1.12598 + // Each test step initialises it's own name
1.12599 + iTestStepName = _L("MM-MMF-ACOD-U-0269-HP");
1.12600 +
1.12601 + for (TUint i=0; i<5; i++)
1.12602 + {
1.12603 + iExpectedSrcBytesProcessed[i] = 0;
1.12604 + iExpectedDstBytesAdded[i] = 0;
1.12605 + iExpectedReturnValue[i].iStatus = TCodecProcessResult::EDstNotFilled;
1.12606 + }
1.12607 + }
1.12608 +
1.12609 +/** @xxxx
1.12610 + * PCM16 to GSM610 Pass in zero sized source buffer
1.12611 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.12612 + */
1.12613 +TVerdict CTest_MMF_ACOD_U_0269::DoTestStepL()
1.12614 + {
1.12615 + const TUid codecUid = {KMmfUidCodecPCM16ToGSM610};
1.12616 + TBool testOK = EFalse;
1.12617 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, 0, KPCM16ToGSM610OptimumDst));
1.12618 +
1.12619 + if (err)
1.12620 + {
1.12621 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12622 + return EFail;
1.12623 + }
1.12624 + else if (!testOK)
1.12625 + {
1.12626 + INFO_PRINTF1(_L("Test failed"));
1.12627 + return EFail;
1.12628 + }
1.12629 + else
1.12630 + return EPass;
1.12631 + }
1.12632 +
1.12633 +//------------------------------------------------------------------
1.12634 +
1.12635 +/** @xxxx
1.12636 + * Constructor
1.12637 + */
1.12638 +CTest_MMF_ACOD_U_0270::CTest_MMF_ACOD_U_0270()
1.12639 + {
1.12640 + // store the name of this test case
1.12641 + // this is the name that is used by the script file
1.12642 + // Each test step initialises it's own name
1.12643 + iTestStepName = _L("MM-MMF-ACOD-U-0270-HP");
1.12644 +
1.12645 + iExpectedLeaveErrorCode = KErrArgument;
1.12646 + }
1.12647 +
1.12648 +/** @xxxx
1.12649 + * PCM16 to GSM610 Pass in zero sized destination buffer
1.12650 + * @test Req. under test REQ172.6.4, REQ172.6.5
1.12651 + */
1.12652 +TVerdict CTest_MMF_ACOD_U_0270::DoTestStepL()
1.12653 + {
1.12654 + const TUid codecUid = {KMmfUidCodecPCM16ToGSM610};
1.12655 + TBool testOK = EFalse;
1.12656 + TRAPD(err, testOK = TestProcessLLoopFiveTimesL(codecUid, KPCM16ToGSM610OptimumSrc, 0));
1.12657 +
1.12658 + if (err)
1.12659 + {
1.12660 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12661 + return EFail;
1.12662 + }
1.12663 + else if (!testOK)
1.12664 + {
1.12665 + INFO_PRINTF1(_L("Test failed"));
1.12666 + return EFail;
1.12667 + }
1.12668 + else
1.12669 + return EPass;
1.12670 + }
1.12671 +
1.12672 +//------------------------------------------------------------------
1.12673 +
1.12674 +/** @xxxx
1.12675 + * Constructor
1.12676 + */
1.12677 +CTest_MMF_ACOD_U_0271::CTest_MMF_ACOD_U_0271()
1.12678 + {
1.12679 + // store the name of this test case
1.12680 + // this is the name that is used by the script file
1.12681 + // Each test step initialises it's own name
1.12682 + iTestStepName = _L("MM-MMF-ACOD-U-0271-HP");
1.12683 + }
1.12684 +
1.12685 +/** @xxxx
1.12686 + * PCM16 to GSM610 Test out of memory
1.12687 + * @test Req. under test REQ172.11
1.12688 + */
1.12689 +TVerdict CTest_MMF_ACOD_U_0271::DoTestStepL()
1.12690 + {
1.12691 + const TUid codecUid = {KMmfUidCodecPCM16ToGSM610};
1.12692 + TBool testOK = EFalse;
1.12693 +
1.12694 + TRAPD(err, testOK = TestNewLOutOfMemoryL(codecUid));
1.12695 + if (err==KErrNone && testOK)
1.12696 + TRAP(err, testOK = TestProcessLOutOfMemoryL(codecUid));
1.12697 +
1.12698 + if (err)
1.12699 + {
1.12700 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12701 + return EFail;
1.12702 + }
1.12703 + else if (!testOK)
1.12704 + {
1.12705 + INFO_PRINTF1(_L("Test failed"));
1.12706 + return EFail;
1.12707 + }
1.12708 + else
1.12709 + return EPass;
1.12710 + }
1.12711 +
1.12712 +//------------------------------------------------------------------
1.12713 +
1.12714 +
1.12715 +/** @xxxx
1.12716 + * Constructor
1.12717 + */
1.12718 +CTest_MMF_ACOD_U_0272::CTest_MMF_ACOD_U_0272()
1.12719 + {
1.12720 + // store the name of this test case
1.12721 + // this is the name that is used by the script file
1.12722 + // Each test step initialises it's own name
1.12723 + iTestStepName = _L("MM-MMF-ACOD-U-0272-HP");
1.12724 + }
1.12725 +
1.12726 +/** @xxxx
1.12727 + * PCM16 to GSM610 Test for memory leaks
1.12728 + * @test Req. under test REQ172.11
1.12729 + */
1.12730 +TVerdict CTest_MMF_ACOD_U_0272::DoTestStepL()
1.12731 + {
1.12732 + const TUid codecUid = {KMmfUidCodecPCM16ToGSM610};
1.12733 + TBool testOK = EFalse;
1.12734 + TRAPD(err, testOK = TestMemoryLeakL(codecUid));
1.12735 +
1.12736 + if (err)
1.12737 + {
1.12738 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12739 + return EFail;
1.12740 + }
1.12741 + else if (!testOK)
1.12742 + {
1.12743 + INFO_PRINTF1(_L("Test failed"));
1.12744 + return EFail;
1.12745 + }
1.12746 + else
1.12747 + return EPass;
1.12748 + }
1.12749 +
1.12750 +//------------------------------------------------------------------
1.12751 +
1.12752 +/** @xxxx
1.12753 + * Constructor
1.12754 + */
1.12755 +CTest_MMF_ACOD_U_0273::CTest_MMF_ACOD_U_0273()
1.12756 + {
1.12757 + // store the name of this test case
1.12758 + // this is the name that is used by the script file
1.12759 + // Each test step initialises it's own name
1.12760 + iTestStepName = _L("MM-MMF-ACOD-U-0273-HP");
1.12761 + }
1.12762 +
1.12763 +/** @xxxx
1.12764 + * PCM16 to GSM610 Test for memory scribbles
1.12765 + * @test Req. under test REQ172.11
1.12766 + */
1.12767 +TVerdict CTest_MMF_ACOD_U_0273::DoTestStepL()
1.12768 + {
1.12769 + const TUid codecUid = {KMmfUidCodecPCM16ToGSM610};
1.12770 + TBool testOK = EFalse;
1.12771 + TRAPD(err, testOK = TestMemoryScribbleL(codecUid));
1.12772 +
1.12773 + if (err)
1.12774 + {
1.12775 + INFO_PRINTF2(_L("Test left with status %d"), err);
1.12776 + return EFail;
1.12777 + }
1.12778 + else if (!testOK)
1.12779 + {
1.12780 + INFO_PRINTF1(_L("Test failed"));
1.12781 + return EFail;
1.12782 + }
1.12783 + else
1.12784 + return EPass;
1.12785 + }
1.12786 +
1.12787 +//------------------------------------------------------------------
1.12788 +