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

Unified Diff: webrtc/modules/audio_coding/codecs/opus/opus_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/codecs/opus/opus_unittest.cc
diff --git a/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc b/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc
index febea2f869fe7ca94897015ac2d35df7219233b7..1041c624ee5e617315145b924717ef00d377f713 100644
--- a/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/opus/opus_unittest.cc
@@ -71,12 +71,11 @@ class OpusTest : public TestWithParam<::testing::tuple<int, int>> {
};
OpusTest::OpusTest()
- : opus_encoder_(NULL),
- opus_decoder_(NULL),
+ : opus_encoder_(nullptr),
+ opus_decoder_(nullptr),
encoded_bytes_(0),
channels_(static_cast<size_t>(::testing::get<0>(GetParam()))),
- application_(::testing::get<1>(GetParam())) {
-}
+ application_(::testing::get<1>(GetParam())) {}
void OpusTest::PrepareSpeechData(size_t channel, int block_length_ms,
int loop_length_ms) {
@@ -306,13 +305,13 @@ TEST(OpusTest, OpusCreateFail) {
WebRtcOpusDecInst* opus_decoder;
// Test to see that an invalid pointer is caught.
- EXPECT_EQ(-1, WebRtcOpus_EncoderCreate(NULL, 1, 0));
+ EXPECT_EQ(-1, WebRtcOpus_EncoderCreate(nullptr, 1, 0));
// Invalid channel number.
EXPECT_EQ(-1, WebRtcOpus_EncoderCreate(&opus_encoder, 3, 0));
// Invalid applciation mode.
EXPECT_EQ(-1, WebRtcOpus_EncoderCreate(&opus_encoder, 1, 2));
- EXPECT_EQ(-1, WebRtcOpus_DecoderCreate(NULL, 1));
+ EXPECT_EQ(-1, WebRtcOpus_DecoderCreate(nullptr, 1));
// Invalid channel number.
EXPECT_EQ(-1, WebRtcOpus_DecoderCreate(&opus_decoder, 3));
}
@@ -320,8 +319,8 @@ TEST(OpusTest, OpusCreateFail) {
// Test failing Free.
TEST(OpusTest, OpusFreeFail) {
// Test to see that an invalid pointer is caught.
- EXPECT_EQ(-1, WebRtcOpus_EncoderFree(NULL));
- EXPECT_EQ(-1, WebRtcOpus_DecoderFree(NULL));
+ EXPECT_EQ(-1, WebRtcOpus_EncoderFree(nullptr));
+ EXPECT_EQ(-1, WebRtcOpus_DecoderFree(nullptr));
}
// Test normal Create and Free.
@@ -330,8 +329,8 @@ TEST_P(OpusTest, OpusCreateFree) {
channels_,
application_));
EXPECT_EQ(0, WebRtcOpus_DecoderCreate(&opus_decoder_, channels_));
- EXPECT_TRUE(opus_encoder_ != NULL);
- EXPECT_TRUE(opus_decoder_ != NULL);
+ EXPECT_TRUE(opus_encoder_ != nullptr);
+ EXPECT_TRUE(opus_decoder_ != nullptr);
// Free encoder and decoder memory.
EXPECT_EQ(0, WebRtcOpus_EncoderFree(opus_encoder_));
EXPECT_EQ(0, WebRtcOpus_DecoderFree(opus_decoder_));

Powered by Google App Engine
This is Rietveld 408576698