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/echo_path_variability.h" |
| 12 #include "webrtc/test/gtest.h" |
| 13 |
| 14 namespace webrtc { |
| 15 |
| 16 TEST(EchoPathVariability, CorrectBehavior) { |
| 17 // Test correct passing and reporting of the gain change information. |
| 18 EchoPathVariability v(true, true); |
| 19 EXPECT_TRUE(v.gain_change); |
| 20 EXPECT_TRUE(v.delay_change); |
| 21 EXPECT_TRUE(v.AudioPathChanged()); |
| 22 |
| 23 v = EchoPathVariability(true, false); |
| 24 EXPECT_TRUE(v.gain_change); |
| 25 EXPECT_FALSE(v.delay_change); |
| 26 EXPECT_TRUE(v.AudioPathChanged()); |
| 27 |
| 28 v = EchoPathVariability(false, true); |
| 29 EXPECT_FALSE(v.gain_change); |
| 30 EXPECT_TRUE(v.delay_change); |
| 31 EXPECT_TRUE(v.AudioPathChanged()); |
| 32 |
| 33 v = EchoPathVariability(false, false); |
| 34 EXPECT_FALSE(v.gain_change); |
| 35 EXPECT_FALSE(v.delay_change); |
| 36 EXPECT_FALSE(v.AudioPathChanged()); |
| 37 } |
| 38 |
| 39 } // namespace webrtc |
OLD | NEW |