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 <memory> |
| 12 |
| 13 #include "webrtc/modules/audio_processing/agc2/gain_controller2.h" |
| 14 #include "webrtc/test/gtest.h" |
| 15 |
| 16 namespace webrtc { |
| 17 namespace test { |
| 18 |
| 19 TEST(GainController2, Instance) { |
| 20 std::unique_ptr<GainController2> gain_controller2; |
| 21 gain_controller2.reset(new GainController2( |
| 22 AudioProcessing::kSampleRate48kHz)); |
| 23 } |
| 24 |
| 25 TEST(GainController2, ToString) { |
| 26 AudioProcessing::Config config; |
| 27 |
| 28 config.gain_controller2.enabled = false; |
| 29 EXPECT_EQ("{enabled: false}", |
| 30 GainController2::ToString(config.gain_controller2)); |
| 31 |
| 32 config.gain_controller2.enabled = true; |
| 33 EXPECT_EQ("{enabled: true}", |
| 34 GainController2::ToString(config.gain_controller2)); |
| 35 } |
| 36 |
| 37 } // namespace test |
| 38 } // namespace webrtc |
OLD | NEW |