Jelena Marusic | 46bd31b | 2015-04-30 10:57:10 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015 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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #include "voice_engine/voice_engine_fixture.h" |
| 12 | #include "modules/audio_processing/include/mock_audio_processing.h" |
Jelena Marusic | 46bd31b | 2015-04-30 10:57:10 +0200 | [diff] [blame] | 13 | |
| 14 | namespace webrtc { |
| 15 | |
| 16 | VoiceEngineFixture::VoiceEngineFixture() |
| 17 | : voe_(VoiceEngine::Create()), |
| 18 | base_(VoEBase::GetInterface(voe_)), |
| 19 | network_(VoENetwork::GetInterface(voe_)) { |
| 20 | EXPECT_NE(nullptr, base_); |
| 21 | EXPECT_NE(nullptr, network_); |
peah | a9cc40b | 2017-06-29 08:32:09 -0700 | [diff] [blame] | 22 | apm_ = new rtc::RefCountedObject<test::MockAudioProcessing>(); |
Jelena Marusic | 46bd31b | 2015-04-30 10:57:10 +0200 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | VoiceEngineFixture::~VoiceEngineFixture() { |
| 26 | EXPECT_EQ(2, network_->Release()); |
Jelena Marusic | 46bd31b | 2015-04-30 10:57:10 +0200 | [diff] [blame] | 27 | EXPECT_EQ(0, base_->Terminate()); |
| 28 | EXPECT_EQ(1, base_->Release()); |
| 29 | EXPECT_TRUE(VoiceEngine::Delete(voe_)); |
| 30 | } |
| 31 | |
| 32 | } // namespace webrtc |