summaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock-spec-builders_test.cc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-10-04 22:28:05 (GMT)
committerGennadiy Civil <misterg@google.com>2018-10-05 16:54:14 (GMT)
commit4bb49ed640e34e23187ad7ea689693ef9927033f (patch)
tree31bfca77d3e46134fddebe28118bcba3af711e45 /googlemock/test/gmock-spec-builders_test.cc
parentf13bbe2992d188e834339abe6f715b2b2f840a77 (diff)
downloadgoogletest-4bb49ed640e34e23187ad7ea689693ef9927033f.zip
googletest-4bb49ed640e34e23187ad7ea689693ef9927033f.tar.gz
googletest-4bb49ed640e34e23187ad7ea689693ef9927033f.tar.bz2
Apply clang-tidy modernize-use-nullptr to googletest.
Now that googletest has moved to C++11, it should no longer use NULL or 0 for the null pointer. This patch converts all such usages to nullptr using clang-tidy. This prevents LLVM from issuing -Wzero-as-null-pointer-constant warnings. PiperOrigin-RevId: 215814400
Diffstat (limited to 'googlemock/test/gmock-spec-builders_test.cc')
-rw-r--r--googlemock/test/gmock-spec-builders_test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc
index 7056c43..65c9fcc 100644
--- a/googlemock/test/gmock-spec-builders_test.cc
+++ b/googlemock/test/gmock-spec-builders_test.cc
@@ -2041,7 +2041,7 @@ TEST(FunctionCallMessageTest,
GMOCK_FLAG(verbose) = kWarningVerbosity;
NaggyMock<MockC> c;
CaptureStdout();
- c.VoidMethod(false, 5, "Hi", NULL, Printable(), Unprintable());
+ c.VoidMethod(false, 5, "Hi", nullptr, Printable(), Unprintable());
const std::string output = GetCapturedStdout();
EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", output);
EXPECT_PRED_FORMAT2(IsNotSubstring, "Stack trace:", output);
@@ -2055,7 +2055,7 @@ TEST(FunctionCallMessageTest,
GMOCK_FLAG(verbose) = kInfoVerbosity;
NaggyMock<MockC> c;
CaptureStdout();
- c.VoidMethod(false, 5, "Hi", NULL, Printable(), Unprintable());
+ c.VoidMethod(false, 5, "Hi", nullptr, Printable(), Unprintable());
const std::string output = GetCapturedStdout();
EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", output);
EXPECT_PRED_FORMAT2(IsSubstring, "Stack trace:", output);
@@ -2098,7 +2098,7 @@ TEST(FunctionCallMessageTest,
// A void mock function.
NaggyMock<MockC> c;
CaptureStdout();
- c.VoidMethod(false, 5, "Hi", NULL, Printable(), Unprintable());
+ c.VoidMethod(false, 5, "Hi", nullptr, Printable(), Unprintable());
const std::string output2 = GetCapturedStdout();
EXPECT_THAT(output2.c_str(),
ContainsRegex(