diff options
author | Abseil Team <absl-team@google.com> | 2018-10-04 22:28:05 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-10-05 16:54:14 (GMT) |
commit | 4bb49ed640e34e23187ad7ea689693ef9927033f (patch) | |
tree | 31bfca77d3e46134fddebe28118bcba3af711e45 /googlemock/test/gmock-spec-builders_test.cc | |
parent | f13bbe2992d188e834339abe6f715b2b2f840a77 (diff) | |
download | googletest-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.cc | 6 |
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( |