diff options
author | Adam Cozzette <acozzette@gmail.com> | 2018-08-07 12:05:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-07 12:05:29 -0700 |
commit | f504d95d461319ad9fc11e0925569b84a4c65d7d (patch) | |
tree | 0d30b048b4176ec9aa7d3b14a60925cb74c6cc2b /src/google/protobuf/stubs/common_unittest.cc | |
parent | 3389bd965b1fb6687056d81b069e99f8c2543cba (diff) | |
parent | 526b350199e604b62daaee9febc5d8a8d593a010 (diff) | |
download | protobuf-f504d95d461319ad9fc11e0925569b84a4c65d7d.tar.gz protobuf-f504d95d461319ad9fc11e0925569b84a4c65d7d.tar.bz2 protobuf-f504d95d461319ad9fc11e0925569b84a4c65d7d.zip |
Merge pull request #5010 from batradhruv/4593
#4593 Replace all occurrences of "NULL" to nullptr in src/google/proto…
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_); |