Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1056)

Side by Side Diff: webrtc/modules/audio_processing/aec3/block_processor_unittest.cc

Issue 2678423005: Finalization of the first version of EchoCanceller 3 (Closed)
Patch Set: Fixed compilation error Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 #include "webrtc/modules/audio_processing/aec3/block_processor.h" 11 #include "webrtc/modules/audio_processing/aec3/block_processor.h"
12 12
13 #include <memory> 13 #include <memory>
14 #include <sstream> 14 #include <sstream>
15 #include <string> 15 #include <string>
16 #include <vector> 16 #include <vector>
17 17
18 #include "webrtc/base/checks.h" 18 #include "webrtc/base/checks.h"
19 #include "webrtc/base/random.h" 19 #include "webrtc/base/random.h"
20 #include "webrtc/modules/audio_processing/aec3/aec3_constants.h" 20 #include "webrtc/modules/audio_processing/aec3/aec3_common.h"
21 #include "webrtc/modules/audio_processing/aec3/mock/mock_echo_remover.h" 21 #include "webrtc/modules/audio_processing/aec3/mock/mock_echo_remover.h"
22 #include "webrtc/modules/audio_processing/aec3/mock/mock_render_delay_buffer.h" 22 #include "webrtc/modules/audio_processing/aec3/mock/mock_render_delay_buffer.h"
23 #include "webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller .h" 23 #include "webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller .h"
24 #include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h" 24 #include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h"
25 #include "webrtc/test/gmock.h" 25 #include "webrtc/test/gmock.h"
26 #include "webrtc/test/gtest.h" 26 #include "webrtc/test/gtest.h"
27 27
28 namespace webrtc { 28 namespace webrtc {
29 namespace { 29 namespace {
30 30
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 224 }
225 } 225 }
226 226
227 TEST(BlockProcessor, VerifyRenderNumBandsCheck) { 227 TEST(BlockProcessor, VerifyRenderNumBandsCheck) {
228 for (auto rate : {8000, 16000, 32000, 48000}) { 228 for (auto rate : {8000, 16000, 32000, 48000}) {
229 SCOPED_TRACE(ProduceDebugText(rate)); 229 SCOPED_TRACE(ProduceDebugText(rate));
230 RunRenderNumBandsVerificationTest(rate); 230 RunRenderNumBandsVerificationTest(rate);
231 } 231 }
232 } 232 }
233 233
234 // TODO(peah): Verify the check for correct number of bands in the capture
235 // signal.
234 TEST(BlockProcessor, VerifyCaptureNumBandsCheck) { 236 TEST(BlockProcessor, VerifyCaptureNumBandsCheck) {
235 for (auto rate : {8000, 16000, 32000, 48000}) { 237 for (auto rate : {8000, 16000, 32000, 48000}) {
236 SCOPED_TRACE(ProduceDebugText(rate)); 238 SCOPED_TRACE(ProduceDebugText(rate));
237 RunCaptureNumBandsVerificationTest(rate); 239 RunCaptureNumBandsVerificationTest(rate);
238 } 240 }
239 } 241 }
240 242
241 // Verifiers that the verification for null ProcessCapture input works. 243 // Verifiers that the verification for null ProcessCapture input works.
242 TEST(BlockProcessor, NullProcessCaptureParameter) { 244 TEST(BlockProcessor, NullProcessCaptureParameter) {
243 EXPECT_DEATH(std::unique_ptr<BlockProcessor>(BlockProcessor::Create(8000)) 245 EXPECT_DEATH(std::unique_ptr<BlockProcessor>(BlockProcessor::Create(8000))
(...skipping 10 matching lines...) Expand all
254 256
255 // Verifies the check for correct sample rate. 257 // Verifies the check for correct sample rate.
256 TEST(BlockProcessor, WrongSampleRate) { 258 TEST(BlockProcessor, WrongSampleRate) {
257 EXPECT_DEATH(std::unique_ptr<BlockProcessor>(BlockProcessor::Create(8001)), 259 EXPECT_DEATH(std::unique_ptr<BlockProcessor>(BlockProcessor::Create(8001)),
258 ""); 260 "");
259 } 261 }
260 262
261 #endif 263 #endif
262 264
263 } // namespace webrtc 265 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698