aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/stubs/common_unittest.cc
diff options
context:
space:
mode:
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_);