From 526b350199e604b62daaee9febc5d8a8d593a010 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Mon, 6 Aug 2018 23:10:16 +0800 Subject: 4593 Replace all occurrences of "NULL" to nullptr in src/google/protobug/stubs --- src/google/protobuf/stubs/common_unittest.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/google/protobuf/stubs/common_unittest.cc') diff --git a/src/google/protobuf/stubs/common_unittest.cc b/src/google/protobuf/stubs/common_unittest.cc index 798a2a27..3ce1c49a 100644 --- a/src/google/protobuf/stubs/common_unittest.cc +++ b/src/google/protobuf/stubs/common_unittest.cc @@ -100,14 +100,14 @@ TEST(LoggingTest, DefaultLogging) { } TEST(LoggingTest, NullLogging) { - LogHandler* old_handler = SetLogHandler(NULL); + LogHandler* old_handler = SetLogHandler(nullptr); CaptureTestStderr(); GOOGLE_LOG(INFO ) << "A message."; GOOGLE_LOG(WARNING) << "A warning."; GOOGLE_LOG(ERROR ) << "An error."; - EXPECT_TRUE(SetLogHandler(old_handler) == NULL); + EXPECT_TRUE(SetLogHandler(old_handler) == nullptr); string text = GetCapturedTestStderr(); EXPECT_EQ("", text); @@ -179,9 +179,9 @@ class ClosureTest : public testing::Test { virtual void SetUp() { current_instance_ = this; a_ = 0; - b_ = NULL; + b_ = nullptr; c_.clear(); - permanent_closure_ = NULL; + permanent_closure_ = nullptr; } void DeleteClosureInCallback() { @@ -196,7 +196,7 @@ class ClosureTest : public testing::Test { static ClosureTest* current_instance_; }; -ClosureTest* ClosureTest::current_instance_ = NULL; +ClosureTest* ClosureTest::current_instance_ = nullptr; TEST_F(ClosureTest, TestClosureFunction0) { Closure* closure = NewCallback(&SetA123Function); @@ -321,7 +321,7 @@ TEST_F(ClosureTest, TestPermanentClosureFunction2) { EXPECT_EQ(789, a_); EXPECT_EQ(cstr, b_); a_ = 0; - b_ = NULL; + b_ = nullptr; closure->Run(); EXPECT_EQ(789, a_); EXPECT_EQ(cstr, b_); @@ -338,7 +338,7 @@ TEST_F(ClosureTest, TestPermanentClosureMethod2) { EXPECT_EQ(789, a_); EXPECT_EQ(cstr, b_); a_ = 0; - b_ = NULL; + b_ = nullptr; closure->Run(); EXPECT_EQ(789, a_); EXPECT_EQ(cstr, b_); -- cgit v1.2.3