diff options
author | Dhruv <dhruv.batra@hotmail.com> | 2018-08-06 23:10:16 +0800 |
---|---|---|
committer | Dhruv <dhruv.batra@hotmail.com> | 2018-08-07 08:03:57 +0800 |
commit | 526b350199e604b62daaee9febc5d8a8d593a010 (patch) | |
tree | b5b0408408979675429fab071c5ce1cae1313a54 /src/google/protobuf/stubs/common_unittest.cc | |
parent | e9a5412afcb5035c02136ba65210bf2cb69d9ab5 (diff) | |
download | protobuf-526b350199e604b62daaee9febc5d8a8d593a010.tar.gz protobuf-526b350199e604b62daaee9febc5d8a8d593a010.tar.bz2 protobuf-526b350199e604b62daaee9febc5d8a8d593a010.zip |
4593 Replace all occurrences of "NULL" to nullptr in src/google/protobug/stubs
Diffstat (limited to 'src/google/protobuf/stubs/common_unittest.cc')
-rw-r--r-- | src/google/protobuf/stubs/common_unittest.cc | 14 |
1 files changed, 7 insertions, 7 deletions
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_); |