aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/stubs/common_unittest.cc
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2018-08-08 17:14:42 -0700
committerFeng Xiao <xfxyjwf@gmail.com>2018-08-08 17:14:42 -0700
commita8465b738e5a1f346ece58ea6f82612bcd6659d2 (patch)
treeb755540a5d7d2cc988eabc7ac594e6abd9da29d1 /src/google/protobuf/stubs/common_unittest.cc
parent6bbe197e9c1b6fc38cbdc45e3bf83fa7ced792a3 (diff)
parent9bbc4b1fab8262958c172f2d8e87b486c950a051 (diff)
downloadprotobuf-a8465b738e5a1f346ece58ea6f82612bcd6659d2.tar.gz
protobuf-a8465b738e5a1f346ece58ea6f82612bcd6659d2.tar.bz2
protobuf-a8465b738e5a1f346ece58ea6f82612bcd6659d2.zip
Merge master branch.
Diffstat (limited to 'src/google/protobuf/stubs/common_unittest.cc')
-rw-r--r--src/google/protobuf/stubs/common_unittest.cc14
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_);