Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: webrtc/modules/audio_coding/acm2/rent_a_codec_unittest.cc

Issue 1677013002: Switch to using new ACM methods for encoder management (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@acm-13
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698