OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 TestCngAndRedResetSpeechEncoder(false, false); | 215 TestCngAndRedResetSpeechEncoder(false, false); |
216 } | 216 } |
217 | 217 |
218 TEST(RentACodecTest, RentEncoderError) { | 218 TEST(RentACodecTest, RentEncoderError) { |
219 const CodecInst codec_inst = { | 219 const CodecInst codec_inst = { |
220 0, "Robert'); DROP TABLE Students;", 8000, 160, 1, 64000}; | 220 0, "Robert'); DROP TABLE Students;", 8000, 160, 1, 64000}; |
221 RentACodec rent_a_codec; | 221 RentACodec rent_a_codec; |
222 EXPECT_FALSE(rent_a_codec.RentEncoder(codec_inst)); | 222 EXPECT_FALSE(rent_a_codec.RentEncoder(codec_inst)); |
223 } | 223 } |
224 | 224 |
225 #if GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) | |
226 TEST(RentACodecTest, RentEncoderStackWithoutSpeechEncoder) { | 225 TEST(RentACodecTest, RentEncoderStackWithoutSpeechEncoder) { |
227 RentACodec::StackParameters sp; | 226 RentACodec::StackParameters sp; |
228 EXPECT_EQ(nullptr, sp.speech_encoder); | 227 EXPECT_EQ(nullptr, sp.speech_encoder); |
229 EXPECT_DEATH(RentACodec().RentEncoderStack(&sp), ""); | 228 EXPECT_EQ(nullptr, RentACodec().RentEncoderStack(&sp)); |
230 } | 229 } |
231 #endif | |
232 | 230 |
233 } // namespace acm2 | 231 } // namespace acm2 |
234 } // namespace webrtc | 232 } // namespace webrtc |
OLD | NEW |