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

Side by Side Diff: webrtc/modules/audio_coding/neteq/timestamp_scaler_unittest.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 internal_timestamp += kStep; 293 internal_timestamp += kStep;
294 } 294 }
295 295
296 EXPECT_CALL(db, Die()); // Called when database object is deleted. 296 EXPECT_CALL(db, Die()); // Called when database object is deleted.
297 } 297 }
298 298
299 TEST(TimestampScaler, Failures) { 299 TEST(TimestampScaler, Failures) {
300 static const uint8_t kRtpPayloadType = 17; 300 static const uint8_t kRtpPayloadType = 17;
301 MockDecoderDatabase db; 301 MockDecoderDatabase db;
302 EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType)) 302 EXPECT_CALL(db, GetDecoderInfo(kRtpPayloadType))
303 .WillOnce(ReturnNull()); // Return NULL to indicate unknown payload type. 303 .WillOnce(
304 ReturnNull()); // Return nullptr to indicate unknown payload type.
304 305
305 TimestampScaler scaler(db); 306 TimestampScaler scaler(db);
306 uint32_t timestamp = 4711; // Some number. 307 uint32_t timestamp = 4711; // Some number.
307 EXPECT_EQ(timestamp, scaler.ToInternal(timestamp, kRtpPayloadType)); 308 EXPECT_EQ(timestamp, scaler.ToInternal(timestamp, kRtpPayloadType));
308 309
309 Packet* packet = NULL; 310 Packet* packet = nullptr;
310 scaler.ToInternal(packet); // Should not crash. That's all we can test. 311 scaler.ToInternal(packet); // Should not crash. That's all we can test.
311 312
312 EXPECT_CALL(db, Die()); // Called when database object is deleted. 313 EXPECT_CALL(db, Die()); // Called when database object is deleted.
313 } 314 }
314 315
315 } // namespace webrtc 316 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698