OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 |
(...skipping 23 matching lines...) Expand all Loading... |
34 VoiceEngine* voe_; | 34 VoiceEngine* voe_; |
35 VoEBase* base_; | 35 VoEBase* base_; |
36 FakeAudioDeviceModule adm_; | 36 FakeAudioDeviceModule adm_; |
37 rtc::scoped_refptr<AudioProcessing> apm_; | 37 rtc::scoped_refptr<AudioProcessing> apm_; |
38 }; | 38 }; |
39 | 39 |
40 TEST_F(VoEBaseTest, InitWithExternalAudioDevice) { | 40 TEST_F(VoEBaseTest, InitWithExternalAudioDevice) { |
41 EXPECT_EQ(0, base_->Init(&adm_, apm_.get())); | 41 EXPECT_EQ(0, base_->Init(&adm_, apm_.get())); |
42 } | 42 } |
43 | 43 |
44 TEST_F(VoEBaseTest, CreateChannelBeforeInitShouldFail) { | |
45 int channelID = base_->CreateChannel(); | |
46 EXPECT_EQ(channelID, -1); | |
47 } | |
48 | |
49 TEST_F(VoEBaseTest, CreateChannelAfterInit) { | 44 TEST_F(VoEBaseTest, CreateChannelAfterInit) { |
50 EXPECT_EQ(0, base_->Init(&adm_, apm_.get(), nullptr)); | 45 EXPECT_EQ(0, base_->Init(&adm_, apm_.get(), nullptr)); |
51 int channelID = base_->CreateChannel(); | 46 int channelID = base_->CreateChannel(); |
52 EXPECT_NE(channelID, -1); | 47 EXPECT_NE(channelID, -1); |
53 EXPECT_EQ(0, base_->DeleteChannel(channelID)); | 48 EXPECT_EQ(0, base_->DeleteChannel(channelID)); |
54 } | 49 } |
55 | 50 |
56 } // namespace webrtc | 51 } // namespace webrtc |
OLD | NEW |