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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_format_vp8_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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
index 0e1a474e35a47b8af7988b77214651b6090546ee..0b8876b62c712d4cae13d6f2383cdcda2b8a5209 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
@@ -60,7 +60,7 @@ constexpr RtpPacketToSend::ExtensionManager* kNoExtensions = nullptr;
// : :
// +-+-+-+-+-+-+-+-+
void VerifyBasicHeader(RTPTypeHeader* type, bool N, bool S, int part_id) {
- ASSERT_TRUE(type != NULL);
+ ASSERT_TRUE(type != nullptr);
EXPECT_EQ(N, type->Video.codecHeader.VP8.nonReference);
EXPECT_EQ(S, type->Video.codecHeader.VP8.beginningOfPartition);
EXPECT_EQ(part_id, type->Video.codecHeader.VP8.partitionId);
@@ -71,7 +71,7 @@ void VerifyExtensions(RTPTypeHeader* type,
int16_t tl0_pic_idx, /* L */
uint8_t temporal_idx, /* T */
int key_idx /* K */) {
- ASSERT_TRUE(type != NULL);
+ ASSERT_TRUE(type != nullptr);
EXPECT_EQ(picture_id, type->Video.codecHeader.VP8.pictureId);
EXPECT_EQ(tl0_pic_idx, type->Video.codecHeader.VP8.tl0PicIdx);
EXPECT_EQ(temporal_idx, type->Video.codecHeader.VP8.temporalIdx);
@@ -81,7 +81,7 @@ void VerifyExtensions(RTPTypeHeader* type,
class RtpPacketizerVp8Test : public ::testing::Test {
protected:
- RtpPacketizerVp8Test() : helper_(NULL) {}
+ RtpPacketizerVp8Test() : helper_(nullptr) {}
virtual void TearDown() { delete helper_; }
bool Init(const size_t* partition_sizes, size_t num_partitions) {
hdr_info_.pictureId = kNoPictureId;
@@ -90,7 +90,7 @@ class RtpPacketizerVp8Test : public ::testing::Test {
hdr_info_.layerSync = false;
hdr_info_.tl0PicIdx = kNoTl0PicIdx;
hdr_info_.keyIdx = kNoKeyIdx;
- if (helper_ != NULL)
+ if (helper_ != nullptr)
return false;
helper_ = new test::RtpFormatVp8TestHelper(&hdr_info_);
return helper_->Init(partition_sizes, num_partitions);
@@ -271,8 +271,8 @@ TEST_F(RtpPacketizerVp8Test, TestEqualSizeModeFallback) {
hdr_info_.pictureId = 200; // > 0x7F should produce 2-byte PictureID
const size_t kMaxPayloadSize = 12; // Small enough to produce 4 packets.
RtpPacketizerVp8 packetizer(hdr_info_, kMaxPayloadSize);
- packetizer.SetPayloadData(
- helper_->payload_data(), helper_->payload_size(), NULL);
+ packetizer.SetPayloadData(helper_->payload_data(), helper_->payload_size(),
+ nullptr);
// Expecting three full packets, and one with the remainder.
const size_t kExpectedSizes[] = {12, 11, 12, 11};
@@ -300,8 +300,8 @@ TEST_F(RtpPacketizerVp8Test, TestNonReferenceBit) {
hdr_info_.nonReference = true;
const size_t kMaxPayloadSize = 25; // Small enough to produce two packets.
RtpPacketizerVp8 packetizer(hdr_info_, kMaxPayloadSize);
- packetizer.SetPayloadData(
- helper_->payload_data(), helper_->payload_size(), NULL);
+ packetizer.SetPayloadData(helper_->payload_data(), helper_->payload_size(),
+ nullptr);
// EqualSize mode => First packet full; other not.
const size_t kExpectedSizes[] = {16, 16};
@@ -418,7 +418,7 @@ class RtpDepacketizerVp8Test : public ::testing::Test {
void ExpectPacket(RtpDepacketizer::ParsedPayload* parsed_payload,
const uint8_t* data,
size_t length) {
- ASSERT_TRUE(parsed_payload != NULL);
+ ASSERT_TRUE(parsed_payload != nullptr);
EXPECT_THAT(std::vector<uint8_t>(
parsed_payload->payload,
parsed_payload->payload + parsed_payload->payload_length),
@@ -580,7 +580,7 @@ TEST_F(RtpDepacketizerVp8Test, TestWithPacketizer) {
input_header.tl0PicIdx = kNoTl0PicIdx; // Disable.
input_header.keyIdx = 31;
RtpPacketizerVp8 packetizer(input_header, 20);
- packetizer.SetPayloadData(data, 10, NULL);
+ packetizer.SetPayloadData(data, 10, nullptr);
bool last;
ASSERT_TRUE(packetizer.NextPacket(&packet, &last));
EXPECT_TRUE(last);

Powered by Google App Engine
This is Rietveld 408576698