Index: webrtc/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc |
diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc b/webrtc/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc |
index 3f7170c30b63014f291e368d28d28f270ff65605..1bc186807956af3185a01fa0dff04b4f5fab4c65 100644 |
--- a/webrtc/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc |
+++ b/webrtc/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc |
@@ -35,9 +35,7 @@ class IsacTest : public ::testing::Test { |
uint8_t bitstream_small_[7]; // Simulate sync packets. |
}; |
-IsacTest::IsacTest() |
- : isac_codec_(NULL) { |
-} |
+IsacTest::IsacTest() : isac_codec_(nullptr) {} |
void IsacTest::SetUp() { |
// Read some samples from a speech file, to be used in the encode test. |
@@ -45,30 +43,30 @@ void IsacTest::SetUp() { |
const std::string file_name = |
webrtc::test::ResourcePath("audio_coding/testfile32kHz", "pcm"); |
input_file = fopen(file_name.c_str(), "rb"); |
- ASSERT_TRUE(input_file != NULL); |
+ ASSERT_TRUE(input_file != nullptr); |
ASSERT_EQ(kIsacNumberOfSamples, |
static_cast<int32_t>(fread(speech_data_, sizeof(int16_t), |
kIsacNumberOfSamples, input_file))); |
fclose(input_file); |
- input_file = NULL; |
+ input_file = nullptr; |
} |
// Test failing Create. |
TEST_F(IsacTest, IsacCreateFail) { |
// Test to see that an invalid pointer is caught. |
- EXPECT_EQ(-1, WebRtcIsac_Create(NULL)); |
+ EXPECT_EQ(-1, WebRtcIsac_Create(nullptr)); |
} |
// Test failing Free. |
TEST_F(IsacTest, IsacFreeFail) { |
// Test to see that free function doesn't crash. |
- EXPECT_EQ(0, WebRtcIsac_Free(NULL)); |
+ EXPECT_EQ(0, WebRtcIsac_Free(nullptr)); |
} |
// Test normal Create and Free. |
TEST_F(IsacTest, IsacCreateFree) { |
EXPECT_EQ(0, WebRtcIsac_Create(&isac_codec_)); |
- EXPECT_TRUE(isac_codec_ != NULL); |
+ EXPECT_TRUE(isac_codec_ != nullptr); |
EXPECT_EQ(0, WebRtcIsac_Free(isac_codec_));} |
TEST_F(IsacTest, IsacUpdateBWE) { |