OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 |
11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_ |
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_ | 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 | 15 |
16 #include "webrtc/modules/audio_processing/include/aec_dump.h" | |
16 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 17 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
17 #include "webrtc/test/gmock.h" | 18 #include "webrtc/test/gmock.h" |
18 | 19 |
19 namespace webrtc { | 20 namespace webrtc { |
20 | 21 |
21 namespace test { | 22 namespace test { |
22 | 23 |
23 class MockEchoCancellation : public EchoCancellation { | 24 class MockEchoCancellation : public EchoCancellation { |
24 public: | 25 public: |
25 virtual ~MockEchoCancellation() {} | 26 virtual ~MockEchoCancellation() {} |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 } | 202 } |
202 virtual MockNoiseSuppression* noise_suppression() const { | 203 virtual MockNoiseSuppression* noise_suppression() const { |
203 return noise_suppression_.get(); | 204 return noise_suppression_.get(); |
204 } | 205 } |
205 virtual MockVoiceDetection* voice_detection() const { | 206 virtual MockVoiceDetection* voice_detection() const { |
206 return voice_detection_.get(); | 207 return voice_detection_.get(); |
207 } | 208 } |
208 | 209 |
209 MOCK_CONST_METHOD0(GetConfig, AudioProcessing::Config()); | 210 MOCK_CONST_METHOD0(GetConfig, AudioProcessing::Config()); |
210 | 211 |
212 virtual void StartDebugRecording(std::unique_ptr<AecDump> aec_dump) {} | |
peah-webrtc
2017/04/07 12:57:16
Why don't we want to mock this method similarly to
aleloi
2017/04/12 11:05:30
Mocked methods can't have move-only arguments. If
| |
213 | |
211 private: | 214 private: |
212 std::unique_ptr<MockEchoCancellation> echo_cancellation_; | 215 std::unique_ptr<MockEchoCancellation> echo_cancellation_; |
213 std::unique_ptr<MockEchoControlMobile> echo_control_mobile_; | 216 std::unique_ptr<MockEchoControlMobile> echo_control_mobile_; |
214 std::unique_ptr<MockGainControl> gain_control_; | 217 std::unique_ptr<MockGainControl> gain_control_; |
215 std::unique_ptr<MockHighPassFilter> high_pass_filter_; | 218 std::unique_ptr<MockHighPassFilter> high_pass_filter_; |
216 std::unique_ptr<MockLevelEstimator> level_estimator_; | 219 std::unique_ptr<MockLevelEstimator> level_estimator_; |
217 std::unique_ptr<MockNoiseSuppression> noise_suppression_; | 220 std::unique_ptr<MockNoiseSuppression> noise_suppression_; |
218 std::unique_ptr<MockVoiceDetection> voice_detection_; | 221 std::unique_ptr<MockVoiceDetection> voice_detection_; |
219 }; | 222 }; |
220 | 223 |
221 } // namespace test | 224 } // namespace test |
222 } // namespace webrtc | 225 } // namespace webrtc |
223 | 226 |
224 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_ | 227 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_INCLUDE_MOCK_AUDIO_PROCESSING_H_ |
OLD | NEW |