OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 actual_config.digitalCompressionGaindB); | 103 actual_config.digitalCompressionGaindB); |
104 EXPECT_EQ(agc_config.limiterEnable, | 104 EXPECT_EQ(agc_config.limiterEnable, |
105 actual_config.limiterEnable); | 105 actual_config.limiterEnable); |
106 EXPECT_EQ(agc_config.targetLeveldBOv, | 106 EXPECT_EQ(agc_config.targetLeveldBOv, |
107 actual_config.targetLeveldBOv); | 107 actual_config.targetLeveldBOv); |
108 } | 108 } |
109 | 109 |
110 TEST(ApmHelpersTest, AgcStatus_DefaultMode) { | 110 TEST(ApmHelpersTest, AgcStatus_DefaultMode) { |
111 TestHelper helper; | 111 TestHelper helper; |
112 GainControl* gc = helper.apm()->gain_control(); | 112 GainControl* gc = helper.apm()->gain_control(); |
113 #if defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) | 113 #if defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR |
kthelgason
2017/06/22 08:16:32
I don't think there is any reason to check both, j
oprypin_webrtc
2017/06/22 08:20:46
This macro is defined only on Mac, and using it di
oprypin_webrtc
2017/06/22 08:23:19
Oh, and patch set 8 is not correct either, checkin
| |
114 EXPECT_FALSE(gc->is_enabled()); | |
115 EXPECT_EQ(GainControl::kAdaptiveDigital, gc->mode()); | |
116 #elif defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) | |
114 EXPECT_FALSE(gc->is_enabled()); | 117 EXPECT_FALSE(gc->is_enabled()); |
115 EXPECT_EQ(GainControl::kFixedDigital, gc->mode()); | 118 EXPECT_EQ(GainControl::kFixedDigital, gc->mode()); |
116 #else | 119 #else |
117 EXPECT_TRUE(gc->is_enabled()); | 120 EXPECT_TRUE(gc->is_enabled()); |
118 EXPECT_EQ(GainControl::kAdaptiveAnalog, gc->mode()); | 121 EXPECT_EQ(GainControl::kAdaptiveAnalog, gc->mode()); |
119 #endif | 122 #endif |
120 } | 123 } |
121 | 124 |
122 TEST(ApmHelpersTest, AgcStatus_EnableDisable) { | 125 TEST(ApmHelpersTest, AgcStatus_EnableDisable) { |
123 TestHelper helper; | 126 TestHelper helper; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
242 EXPECT_EQ(NoiseSuppression::kHigh, ns->level()); | 245 EXPECT_EQ(NoiseSuppression::kHigh, ns->level()); |
243 EXPECT_FALSE(ns->is_enabled()); | 246 EXPECT_FALSE(ns->is_enabled()); |
244 } | 247 } |
245 | 248 |
246 TEST(ApmHelpersTest, TypingDetectionStatus_DefaultMode) { | 249 TEST(ApmHelpersTest, TypingDetectionStatus_DefaultMode) { |
247 TestHelper helper; | 250 TestHelper helper; |
248 VoiceDetection* vd = helper.apm()->voice_detection(); | 251 VoiceDetection* vd = helper.apm()->voice_detection(); |
249 EXPECT_FALSE(vd->is_enabled()); | 252 EXPECT_FALSE(vd->is_enabled()); |
250 } | 253 } |
251 | 254 |
252 TEST(ApmHelpersTest, TypingDetectionStatus_EnableDisable) { | 255 // TODO(kthelgason): Reenable this test on simulator. |
256 // See bugs.webrtc.org/5569 | |
257 #if defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR | |
kthelgason
2017/06/22 08:16:32
ditto
| |
258 #define MAYBE_TypingDetectionStatus_EnableDisable DISABLED_TypingDetectionStatus _EnableDisable | |
259 #else | |
260 #define MAYBE_TypingDetectionStatus_EnableDisable TypingDetectionStatus_EnableDi sable | |
261 #endif | |
262 TEST(ApmHelpersTest, MAYBE_TypingDetectionStatus_EnableDisable) { | |
253 TestHelper helper; | 263 TestHelper helper; |
254 VoiceDetection* vd = helper.apm()->voice_detection(); | 264 VoiceDetection* vd = helper.apm()->voice_detection(); |
255 apm_helpers::SetTypingDetectionStatus(helper.apm(), true); | 265 apm_helpers::SetTypingDetectionStatus(helper.apm(), true); |
256 EXPECT_TRUE(vd->is_enabled()); | 266 EXPECT_TRUE(vd->is_enabled()); |
257 apm_helpers::SetTypingDetectionStatus(helper.apm(), false); | 267 apm_helpers::SetTypingDetectionStatus(helper.apm(), false); |
258 EXPECT_FALSE(vd->is_enabled()); | 268 EXPECT_FALSE(vd->is_enabled()); |
259 } | 269 } |
260 | 270 |
261 // TODO(solenberg): Move this test to a better place - added here for the sake | 271 // TODO(solenberg): Move this test to a better place - added here for the sake |
262 // of duplicating all relevant tests from audio_processing_test.cc. | 272 // of duplicating all relevant tests from audio_processing_test.cc. |
(...skipping 12 matching lines...) Expand all Loading... | |
275 // TODO(solenberg): Move this test to a better place - added here for the sake | 285 // TODO(solenberg): Move this test to a better place - added here for the sake |
276 // of duplicating all relevant tests from audio_processing_test.cc. | 286 // of duplicating all relevant tests from audio_processing_test.cc. |
277 TEST(ApmHelpersTest, StereoSwapping_EnableDisable) { | 287 TEST(ApmHelpersTest, StereoSwapping_EnableDisable) { |
278 TestHelper helper; | 288 TestHelper helper; |
279 helper.transmit_mixer()->EnableStereoChannelSwapping(true); | 289 helper.transmit_mixer()->EnableStereoChannelSwapping(true); |
280 EXPECT_TRUE(helper.transmit_mixer()->IsStereoChannelSwappingEnabled()); | 290 EXPECT_TRUE(helper.transmit_mixer()->IsStereoChannelSwappingEnabled()); |
281 helper.transmit_mixer()->EnableStereoChannelSwapping(false); | 291 helper.transmit_mixer()->EnableStereoChannelSwapping(false); |
282 EXPECT_FALSE(helper.transmit_mixer()->IsStereoChannelSwappingEnabled()); | 292 EXPECT_FALSE(helper.transmit_mixer()->IsStereoChannelSwappingEnabled()); |
283 } | 293 } |
284 } // namespace webrtc | 294 } // namespace webrtc |
OLD | NEW |