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

Unified Diff: webrtc/modules/audio_coding/neteq/decoder_database_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/audio_coding/neteq/decoder_database_unittest.cc
diff --git a/webrtc/modules/audio_coding/neteq/decoder_database_unittest.cc b/webrtc/modules/audio_coding/neteq/decoder_database_unittest.cc
index f3e6a64673833288223f0e57322b6d61e3c17f6d..2d569af20e27ca160b697c687ee2fca4ac4e697e 100644
--- a/webrtc/modules/audio_coding/neteq/decoder_database_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/decoder_database_unittest.cc
@@ -79,12 +79,12 @@ TEST(DecoderDatabase, GetDecoderInfo) {
db.RegisterPayload(kPayloadType, NetEqDecoder::kDecoderPCMu, kCodecName));
const DecoderDatabase::DecoderInfo* info;
info = db.GetDecoderInfo(kPayloadType);
- ASSERT_TRUE(info != NULL);
+ ASSERT_TRUE(info != nullptr);
EXPECT_TRUE(info->IsType("pcmu"));
EXPECT_EQ(kCodecName, info->get_name());
EXPECT_EQ(decoder, db.GetDecoder(kPayloadType));
info = db.GetDecoderInfo(kPayloadType + 1); // Other payload type.
- EXPECT_TRUE(info == NULL); // Should not be found.
+ EXPECT_TRUE(info == nullptr); // Should not be found.
}
TEST(DecoderDatabase, GetDecoder) {
@@ -95,7 +95,7 @@ TEST(DecoderDatabase, GetDecoder) {
db.RegisterPayload(kPayloadType, NetEqDecoder::kDecoderPCM16B,
kCodecName));
AudioDecoder* dec = db.GetDecoder(kPayloadType);
- ASSERT_TRUE(dec != NULL);
+ ASSERT_TRUE(dec != nullptr);
}
TEST(DecoderDatabase, TypeTests) {
@@ -148,7 +148,7 @@ TEST(DecoderDatabase, ExternalDecoder) {
// Get the decoder info struct and check it too.
const DecoderDatabase::DecoderInfo* info;
info = db.GetDecoderInfo(kPayloadType);
- ASSERT_TRUE(info != NULL);
+ ASSERT_TRUE(info != nullptr);
EXPECT_TRUE(info->IsType("pcmu"));
EXPECT_EQ(info->get_name(), kCodecName);
EXPECT_EQ(kCodecName, info->get_name());
@@ -212,40 +212,40 @@ TEST(DecoderDatabase, IF_ISAC(ActiveDecoders)) {
ASSERT_EQ(DecoderDatabase::kOK,
db.RegisterPayload(13, NetEqDecoder::kDecoderCNGnb, "cng-nb"));
// Verify that no decoders are active from the start.
- EXPECT_EQ(NULL, db.GetActiveDecoder());
- EXPECT_EQ(NULL, db.GetActiveCngDecoder());
+ EXPECT_EQ(nullptr, db.GetActiveDecoder());
+ EXPECT_EQ(nullptr, db.GetActiveCngDecoder());
// Set active speech codec.
bool changed; // Should be true when the active decoder changed.
EXPECT_EQ(DecoderDatabase::kOK, db.SetActiveDecoder(0, &changed));
EXPECT_TRUE(changed);
AudioDecoder* decoder = db.GetActiveDecoder();
- ASSERT_FALSE(decoder == NULL); // Should get a decoder here.
+ ASSERT_FALSE(decoder == nullptr); // Should get a decoder here.
// Set the same again. Expect no change.
EXPECT_EQ(DecoderDatabase::kOK, db.SetActiveDecoder(0, &changed));
EXPECT_FALSE(changed);
decoder = db.GetActiveDecoder();
- ASSERT_FALSE(decoder == NULL); // Should get a decoder here.
+ ASSERT_FALSE(decoder == nullptr); // Should get a decoder here.
// Change active decoder.
EXPECT_EQ(DecoderDatabase::kOK, db.SetActiveDecoder(103, &changed));
EXPECT_TRUE(changed);
decoder = db.GetActiveDecoder();
- ASSERT_FALSE(decoder == NULL); // Should get a decoder here.
+ ASSERT_FALSE(decoder == nullptr); // Should get a decoder here.
- // Remove the active decoder, and verify that the active becomes NULL.
+ // Remove the active decoder, and verify that the active becomes null.
EXPECT_EQ(DecoderDatabase::kOK, db.Remove(103));
- EXPECT_EQ(NULL, db.GetActiveDecoder());
+ EXPECT_EQ(nullptr, db.GetActiveDecoder());
// Set active CNG codec.
EXPECT_EQ(DecoderDatabase::kOK, db.SetActiveCngDecoder(13));
ComfortNoiseDecoder* cng = db.GetActiveCngDecoder();
- ASSERT_FALSE(cng == NULL); // Should get a decoder here.
+ ASSERT_FALSE(cng == nullptr); // Should get a decoder here.
- // Remove the active CNG decoder, and verify that the active becomes NULL.
+ // Remove the active CNG decoder, and verify that the active becomes null.
EXPECT_EQ(DecoderDatabase::kOK, db.Remove(13));
- EXPECT_EQ(NULL, db.GetActiveCngDecoder());
+ EXPECT_EQ(nullptr, db.GetActiveCngDecoder());
// Try to set non-existing codecs as active.
EXPECT_EQ(DecoderDatabase::kDecoderNotFound,

Powered by Google App Engine
This is Rietveld 408576698