os/mm/mmlibs/mmfw/tsrc/mmfunittest/DevSoundTest/CIPlugins/src/teststepcig729decoderconfig.cpp
Update contrib.
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #include "teststepcig729decoderconfig.h"
19 TVerdict CTestStepCIG729DecoderConfig::DoTestStepL()
21 iTestStepResult = ETestSuiteError;
23 INFO_PRINTF1(_L("Initializing test CI device"));
25 if (iTestStepName.Compare(_L("MM-MMF-DEVSOUNDCI-U-0049-HP")) == 0)
27 iTestStepResult = DoTestStep0049L();
29 else if (iTestStepName.Compare(_L("MM-MMF-DEVSOUNDCI-U-0050-HP")) == 0)
31 iTestStepResult = DoTestStep0050L();
34 return iTestStepResult;
38 TVerdict CTestStepCIG729DecoderConfig::DoTestStep0049L()
40 iTestStepResult = EFail;
42 INFO_PRINTF1(_L("G729DecoderIntfc - Instantiating"));
44 //Initialize - with the UID of our test HwDevice
45 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
46 TUid testUID = {KUidG729DecoderConfigTestDevice};
48 TFourCC testUID('T','0','0','9');
51 iTestStepResult = TestInitialize(testUID, EMMFStatePlaying);
53 if (iTestStepResult != EPass)
55 INFO_PRINTF1(_L("DevSound failed to instantiate test device"));
59 // reset the value as previous test is pass
60 iTestStepResult = EFail;
62 // KUidG729DecoderIntfc
63 MG729DecoderIntfc* ptr = static_cast <MG729DecoderIntfc*> (iMMFDevSound->CustomInterface(KUidG729DecoderIntfc));
67 INFO_PRINTF1(_L("MG729DecoderIntfc instantiated successfully"));
69 iTestStepResult = EPass;
73 INFO_PRINTF1(_L("MG729DecoderIntfc failed to retrieve the interface"));
74 iTestStepResult = EInconclusive;
77 return iTestStepResult;
81 TVerdict CTestStepCIG729DecoderConfig::DoTestStep0050L()
83 iTestStepResult = EFail;
84 TInt result = KErrGeneral;
86 INFO_PRINTF1(_L("G729DecoderIntfc - BadLsfNextBuffer"));
88 //Initialize - with the UID of our test HwDevice
89 #ifndef SYMBIAN_MULTIMEDIA_A3FDEVSOUND
90 TUid testUID = {KUidG729DecoderConfigTestDevice};
92 TFourCC testUID('T','0','0','9');
95 iTestStepResult = TestInitialize(testUID, EMMFStatePlaying);
97 if (iTestStepResult != EPass)
99 INFO_PRINTF1(_L("DevSound failed to instantiate test device"));
100 return EInconclusive;
103 // reset the value as previous test is pass
104 iTestStepResult = EFail;
106 // KUidG729DecoderIntfc
107 MG729DecoderIntfc* ptr = static_cast <MG729DecoderIntfc*> (iMMFDevSound->CustomInterface(KUidG729DecoderIntfc));
111 result = ptr->BadLsfNextBuffer(); // call method
113 if (result == KErrNone)
115 INFO_PRINTF1(_L("MG729DecoderIntfc::BadLsfNextBuffer finished successfully"));
117 iTestStepResult = EPass;
121 ERR_PRINTF2(_L("MG729DecoderIntfc::BadLsfNextBuffer failed with result %d"), result);
126 INFO_PRINTF1(_L("MG729DecoderIntfc failed to retrieve the interface"));
127 iTestStepResult = EInconclusive;
130 return iTestStepResult;