|
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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This file contains the test suite class implementation for A3F DevSound Integration tests. |
|
15 // |
|
16 // |
|
17 |
|
18 #include "tsi_a3f_devsound_testsuite.h" |
|
19 #include "tsi_a3f_devsound_record.h" |
|
20 #include "tsi_a3f_devsound_play.h" |
|
21 #include "tsi_a3f_devsound_tone.h" |
|
22 |
|
23 /* |
|
24 * |
|
25 * NewTestSuiteL is exported at ordinal 1 |
|
26 * - this provides the interface to allow schedule test to create instances of this test suite |
|
27 * |
|
28 */ |
|
29 // Entry function - create a test suite object |
|
30 EXPORT_C CTestSuiteA3FDevSound* CTestSuiteA3FDevSound::NewTestSuiteL() |
|
31 { |
|
32 return CTestSuiteA3FDevSound::NewL(); |
|
33 |
|
34 } |
|
35 |
|
36 /* |
|
37 * |
|
38 * NewL |
|
39 * |
|
40 */ |
|
41 CTestSuiteA3FDevSound* CTestSuiteA3FDevSound::NewL() |
|
42 { |
|
43 CTestSuiteA3FDevSound* result = new (ELeave) CTestSuiteA3FDevSound(); |
|
44 CleanupStack::PushL(result); |
|
45 result->ConstructL(); |
|
46 CleanupStack::Pop(result); |
|
47 return result; |
|
48 |
|
49 } |
|
50 |
|
51 /* |
|
52 * |
|
53 * CTestSuiteA3FDevSound - Constructor |
|
54 * |
|
55 */ |
|
56 CTestSuiteA3FDevSound::CTestSuiteA3FDevSound() |
|
57 { |
|
58 iSuiteName = _L("TSI_A3F_DEVSOUND"); |
|
59 |
|
60 } |
|
61 |
|
62 /* |
|
63 * |
|
64 * ~CTestSuiteA3FDevSound - Destructor |
|
65 * |
|
66 */ |
|
67 CTestSuiteA3FDevSound::~CTestSuiteA3FDevSound() |
|
68 { |
|
69 } |
|
70 |
|
71 /* |
|
72 * GetVersion |
|
73 * - Get test suite version |
|
74 * |
|
75 */ |
|
76 TPtrC CTestSuiteA3FDevSound::GetVersion() const |
|
77 { |
|
78 _LIT(KTxtVersion, "1.0"); |
|
79 return KTxtVersion(); |
|
80 |
|
81 } |
|
82 |
|
83 /* |
|
84 * |
|
85 * InitialiseL - Constructor for test suite |
|
86 * - creates all the test steps and stores them inside CTestSuiteA3FDevSound |
|
87 * |
|
88 */ |
|
89 void CTestSuiteA3FDevSound::InitialiseL() |
|
90 { |
|
91 const TUint32 KMMFFourCCCodeInvalid = 0x414d5121; |
|
92 TFourCC fourCCCodePCM8(KMMFFourCCCodePCM8); |
|
93 TFourCC fourCCCodePCMU8(KMMFFourCCCodePCMU8); |
|
94 TFourCC fourCCCodePCM16(KMMFFourCCCodePCM16); |
|
95 TFourCC fourCCCodeMuLAW(KMMFFourCCCodeMuLAW); |
|
96 TFourCC fourCCCodeInvalid(KMMFFourCCCodeInvalid); |
|
97 |
|
98 // to play AAC audio without OpenMAX IL HwDevice, use this FourCC code |
|
99 TFourCC fourCCCodeAAC(KMMFFourCCCodeAAC); |
|
100 |
|
101 // to play AAC audio with OpenMAX IL HwDevice, use this FourCC code |
|
102 // note: IL HwDevice has been classified as AAC2 which is a test FourCC code and not a real one |
|
103 const TUint32 KMMFFourCCCodeAAC2 = 0x32434141; //('A','A','C','2') |
|
104 TFourCC fourCCCodeAAC2(KMMFFourCCCodeAAC2); |
|
105 |
|
106 // DevSound PCM - Play test cases |
|
107 |
|
108 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0001"), _L("SectionPCM-0001"), fourCCCodePCM16)); |
|
109 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0002"), _L("SectionPCM-0002"), fourCCCodePCM16)); |
|
110 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0003"), _L("SectionPCM-0003"), fourCCCodePCM16)); |
|
111 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0004"), _L("SectionPCM-0004"), fourCCCodePCM16)); |
|
112 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0005"), _L("SectionPCM-0005"), fourCCCodePCM16)); |
|
113 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0006"), _L("SectionPCM-0006"), fourCCCodePCM16)); |
|
114 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0007"), _L("SectionPCM-0007"), fourCCCodePCM16)); |
|
115 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0008"), _L("SectionPCM-0008"), fourCCCodePCM16)); |
|
116 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0009"), _L("SectionPCM-0009"), fourCCCodePCM16)); |
|
117 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0010"), _L("SectionPCM-0010"), fourCCCodePCM16)); |
|
118 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0011"), _L("SectionPCM-0011"), fourCCCodePCM16)); |
|
119 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0012"), _L("SectionPCM-0012"), fourCCCodePCM16)); |
|
120 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0013"), _L("SectionPCM-0013"), fourCCCodePCM16)); |
|
121 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0014"), _L("SectionPCM-0014"), fourCCCodePCM16)); |
|
122 AddTestStepL(RStepA3FDevSoundPlayEmpty::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0015"), _L("SectionPCM-0015"), fourCCCodePCM16)); |
|
123 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0016"), _L("SectionPCM-0016"), fourCCCodePCM16)); |
|
124 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0017"), _L("SectionPCM-0017"), fourCCCodeMuLAW)); |
|
125 AddTestStepL(RStepA3FDevSoundPlayInvalidConfig::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0018"), _L("SectionPCM-0018"), fourCCCodePCM16)); |
|
126 AddTestStepL(RStepA3FDevSoundPlayInvalidConfig::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0019"), _L("SectionPCM-0019"), fourCCCodePCM16)); |
|
127 AddTestStepL(RStepA3FDevSoundPlayInvalidFourCC::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0020"), fourCCCodeInvalid)); |
|
128 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0021"), _L("SectionPCM-0021"), fourCCCodePCM16)); |
|
129 AddTestStepL(RStepA3FDevSoundPlayEOFPlayMultipleTimes::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0022"), _L("SectionPCM-0022"))); |
|
130 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0023"), _L("SectionPCM-0023"))); |
|
131 AddTestStepL(RStepA3FDevSoundPlayStopMultipleTimes::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0024"), _L("SectionPCM-0024"), fourCCCodePCM16)); |
|
132 AddTestStepL(RStepA3FDevSoundReadConfigDuringPlay::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0025"), _L("SectionPCM-0025"), fourCCCodePCM16)); |
|
133 AddTestStepL(RStepA3FDevSoundSetVolPlayStopGetVol::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0026"), _L("SectionPCM-0026"), fourCCCodePCM16)); |
|
134 AddTestStepL(RStepA3FDevSoundFlushBuffersPaused::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0027"), _L("SectionPCM-0027"), fourCCCodePCM16)); |
|
135 AddTestStepL(RStepA3FDevSoundInvalidStatePlay::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0028"), _L("SectionPCM-0028"), fourCCCodePCM16)); |
|
136 AddTestStepL(RStepA3FDevSoundFlushBuffersPlaying::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0029"), _L("SectionPCM-0029"), fourCCCodePCM16)); |
|
137 AddTestStepL(RStepA3FDevSoundInitializeWhilePlaying::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0030"), _L("SectionPCM-0030"), fourCCCodePCM16)); |
|
138 AddTestStepL(RStepA3FDevSoundInitializeWithHwDeviceUID::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0031"))); |
|
139 AddTestStepL(RStepA3FDevSoundSetBalanceDuringPlay::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0032"), _L("SectionPCM-0032"), fourCCCodePCM16)); |
|
140 AddTestStepL(RStepA3FDevSoundGetSampleNumsAfterStop::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0033"), _L("SectionPCM-0033"), fourCCCodePCM16)); |
|
141 AddTestStepL(RStepA3FDevSoundInititalizeDuringInitialize::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0034"), _L("SectionPCM-0034"), fourCCCodePCM16)); |
|
142 AddTestStepL(RStepA3FDevSoundPlayInitDuringPlayInit::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0035"), _L("SectionPCM-0035"), fourCCCodePCM16)); |
|
143 AddTestStepL(RStepA3FDevSoundVolumeCrop::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0036"), _L("SectionPCM-0036"), fourCCCodePCM16)); |
|
144 AddTestStepL(RStepA3FDevSoundInitializeForConverting::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0037"), _L("SectionPCM-0037"), fourCCCodePCM16)); |
|
145 AddTestStepL(RStepA3FDevSoundCancelInitializePlay::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0038"), _L("SectionPCM-0038"), fourCCCodePCM16)); |
|
146 AddTestStepL(RStepA3FDevSoundNegCancelInitializePlay::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0039"), _L("SectionPCM-0039"), fourCCCodePCM16)); |
|
147 AddTestStepL(RStepA3FDevSoundEmptyBuffersInCreatedState::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0040"))); |
|
148 AddTestStepL(RStepA3FDevSoundEmptyBuffersInInitializedState::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0041"), _L("SectionPCM-0041"), fourCCCodePCM16)); |
|
149 AddTestStepL(RStepA3FDevSoundEmptyBuffersInInitializingState::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-I-0042"), _L("SectionPCM-0042"), fourCCCodePCM16)); |
|
150 |
|
151 // DevSound PCM - Long Play test cases |
|
152 |
|
153 AddTestStepL(RStepA3FDevSoundPlaySimple::NewL(_L("MM-A3F-DEVSOUND-PLAY-PCM-LONG-I-0001"), _L("SectionPCM-Long-0001"), fourCCCodePCM16)); |
|
154 |
|
155 // DevSound PCM - Record test cases |
|
156 |
|
157 AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0001"), _L("SectionPCM-0001"), fourCCCodePCM16)); |
|
158 AddTestStepL(RStepA3FDevSoundRecordMultipleTimes::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0002"), _L("SectionPCM-0002"), fourCCCodePCM16)); |
|
159 AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0003"), _L("SectionPCM-0003"), fourCCCodePCM16)); |
|
160 AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0004"), _L("SectionPCM-0004"), fourCCCodePCM16)); |
|
161 AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0005"), _L("SectionPCM-0005"), fourCCCodePCM16)); |
|
162 AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0006"), _L("SectionPCM-0006"), fourCCCodePCM16)); |
|
163 AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0007"), _L("SectionPCM-0007"), fourCCCodePCM16)); |
|
164 AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0008"), _L("SectionPCM-0008"), fourCCCodePCM16)); |
|
165 AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0009"), _L("SectionPCM-0009"), fourCCCodePCM16)); |
|
166 AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0010"), _L("SectionPCM-0010"), fourCCCodePCM16)); |
|
167 AddTestStepL(RStepA3FDevSoundRecordSimple::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0011"), _L("SectionPCM-0011"), fourCCCodePCM16)); |
|
168 AddTestStepL(RStepA3FDevSoundRecordAndPlay::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0012"), _L("SectionPCM-0012"), fourCCCodePCM16)); |
|
169 AddTestStepL(RStepA3FDevSoundSetGainDuringRecord::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0013"), _L("SectionPCM-0013"), fourCCCodePCM8)); |
|
170 AddTestStepL(RStepA3FDevSoundSetGainDuringRecord::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0014"), _L("SectionPCM-0014"), fourCCCodePCM16)); |
|
171 AddTestStepL(RStepA3FDevSoundInvalidModeRecord::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0015"), fourCCCodePCM16)); |
|
172 AddTestStepL(RStepA3FDevSoundInitializeWhileRecording::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0016"), fourCCCodePCM16)); |
|
173 AddTestStepL(RStepA3FDevSoundCancelInitializeRecord::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0017"), _L("SectionPCM-0017"), fourCCCodePCM16)); |
|
174 AddTestStepL(RStepA3FDevSoundEmptyBuffersInitializedToRecord::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0018"), _L("SectionPCM-0018"), fourCCCodePCM16)); |
|
175 AddTestStepL(RStepA3FDevSoundEmptyBuffersWhileRecording::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-I-0019"), fourCCCodePCM16)); |
|
176 |
|
177 // DevSound PCM - Long Record test cases |
|
178 |
|
179 AddTestStepL(RStepA3FDevSoundRecordLong::NewL(_L("MM-A3F-DEVSOUND-REC-PCM-LONG-I-0001"), _L("SectionPCM-Long-0001"), fourCCCodePCM16)); |
|
180 |
|
181 // DevSound - Tone test cases |
|
182 |
|
183 AddTestStepL(RStepA3FDevSoundDTMFTonePlay::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0001"))); |
|
184 AddTestStepL(RStepA3FDevSoundNormalAndDualTonePlay::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0002"), _L("SectionTONE-0002"))); |
|
185 AddTestStepL(RStepA3FDevSoundNormalAndDualTonePlay::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0003"), _L("SectionTONE-0003"))); |
|
186 AddTestStepL(RStepA3FDevSoundInitializeWhileTonePlaying::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0004"))); |
|
187 AddTestStepL(RStepA3FDevSoundNotSupportedPlayFixedSeq::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0005"))); |
|
188 AddTestStepL(RStepA3FDevSoundInvalidInitializeForTone::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0006"))); |
|
189 AddTestStepL(RStepA3FDevSoundCancelInitializeTone::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0007"), _L("SectionTONE-0007"))); |
|
190 AddTestStepL(RStepA3FDevSoundEmptyBuffersInitializedForTone::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0008"), _L("SectionTONE-0008"))); |
|
191 AddTestStepL(RStepA3FDevSoundEmptyBuffersWhileTonePlaying::NewL(_L("MM-A3F-DEVSOUND-TONE-I-0009"))); |
|
192 |
|
193 } |
|
194 |
|
195 // End of File |