OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 |
11 #include <memory> | 11 #include <memory> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "webrtc/base/checks.h" | 14 #include "webrtc/base/checks.h" |
15 #include "webrtc/modules/audio_coding/codecs/mock/mock_audio_encoder.h" | |
16 #include "webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h" | 15 #include "webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.h" |
17 #include "webrtc/test/gtest.h" | 16 #include "webrtc/test/gtest.h" |
| 17 #include "webrtc/test/mock_audio_encoder.h" |
18 | 18 |
19 using ::testing::Return; | 19 using ::testing::Return; |
20 using ::testing::_; | 20 using ::testing::_; |
21 using ::testing::SetArgPointee; | 21 using ::testing::SetArgPointee; |
22 using ::testing::InSequence; | 22 using ::testing::InSequence; |
23 using ::testing::Invoke; | 23 using ::testing::Invoke; |
24 using ::testing::MockFunction; | 24 using ::testing::MockFunction; |
25 | 25 |
26 namespace webrtc { | 26 namespace webrtc { |
27 | 27 |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 config.speech_encoder = NULL; | 298 config.speech_encoder = NULL; |
299 EXPECT_DEATH(red = new AudioEncoderCopyRed(std::move(config)), | 299 EXPECT_DEATH(red = new AudioEncoderCopyRed(std::move(config)), |
300 "Speech encoder not provided."); | 300 "Speech encoder not provided."); |
301 // The delete operation is needed to avoid leak reports from memcheck. | 301 // The delete operation is needed to avoid leak reports from memcheck. |
302 delete red; | 302 delete red; |
303 } | 303 } |
304 | 304 |
305 #endif // GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) | 305 #endif // GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) |
306 | 306 |
307 } // namespace webrtc | 307 } // namespace webrtc |
OLD | NEW |