OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | |
3 * | |
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 | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #include "webrtc/modules/audio_processing/aec3/power_echo_model.h" | |
12 | |
13 #include <array> | |
14 #include <string> | |
15 #include <vector> | |
16 | |
17 #include "webrtc/base/random.h" | |
18 #include "webrtc/modules/audio_processing/aec3/aec_state.h" | |
19 #include "webrtc/modules/audio_processing/aec3/aec3_common.h" | |
20 #include "webrtc/modules/audio_processing/aec3/aec3_fft.h" | |
21 #include "webrtc/modules/audio_processing/aec3/echo_path_variability.h" | |
22 #include "webrtc/modules/audio_processing/test/echo_canceller_test_tools.h" | |
23 | |
24 #include "webrtc/test/gtest.h" | |
25 | |
26 namespace webrtc { | |
27 | |
28 #if RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) | |
29 | |
30 // Verifies that the check for non-null output parameter works. | |
31 TEST(PowerEchoModel, NullEstimateEchoOutput) { | |
32 PowerEchoModel model; | |
33 std::array<float, kFftLengthBy2Plus1> Y2; | |
34 AecState aec_state; | |
35 RenderBuffer X_buffer(Aec3Optimization::kNone, 3, | |
36 model.MinFarendBufferLength(), | |
37 std::vector<size_t>(1, model.MinFarendBufferLength())); | |
38 | |
39 EXPECT_DEATH(model.EstimateEcho(X_buffer, Y2, aec_state, nullptr), ""); | |
40 } | |
41 | |
42 #endif | |
43 | |
44 | |
45 } // namespace webrtc | |
OLD | NEW |