From 3feffddd1e8381209a48c24587e36e030051499f Mon Sep 17 00:00:00 2001 From: Vadim Barkov Date: Sun, 28 Oct 2018 03:27:51 +0300 Subject: Replaced all NULLs with nullptr in googlemock --- googlemock/test/gmock-generated-function-mockers_test.cc | 6 +++--- googlemock/test/gmock-matchers_test.cc | 6 +++--- googlemock/test/gmock_link_test.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'googlemock/test') diff --git a/googlemock/test/gmock-generated-function-mockers_test.cc b/googlemock/test/gmock-generated-function-mockers_test.cc index 820a2b69..799790c2 100644 --- a/googlemock/test/gmock-generated-function-mockers_test.cc +++ b/googlemock/test/gmock-generated-function-mockers_test.cc @@ -225,7 +225,7 @@ TEST_F(FunctionMockerTest, MocksBinaryFunction) { // Tests mocking a decimal function. TEST_F(FunctionMockerTest, MocksDecimalFunction) { EXPECT_CALL(mock_foo_, Decimal(true, 'a', 0, 0, 1L, A(), - Lt(100), 5U, NULL, "hi")) + Lt(100), 5U, nullptr, "hi")) .WillOnce(Return(5)); EXPECT_EQ(5, foo_->Decimal(true, 'a', 0, 0, 1, 0, 0, 5, nullptr, "hi")); @@ -327,10 +327,10 @@ TEST_F(FunctionMockerTest, MocksUnaryFunctionWithCallType) { // Tests mocking a decimal function with calltype. TEST_F(FunctionMockerTest, MocksDecimalFunctionWithCallType) { EXPECT_CALL(mock_foo_, CTDecimal(true, 'a', 0, 0, 1L, A(), - Lt(100), 5U, NULL, "hi")) + Lt(100), 5U, nullptr, "hi")) .WillOnce(Return(10)); - EXPECT_EQ(10, foo_->CTDecimal(true, 'a', 0, 0, 1, 0, 0, 5, NULL, "hi")); + EXPECT_EQ(10, foo_->CTDecimal(true, 'a', 0, 0, 1, 0, 0, 5, nullptr, "hi")); } // Tests mocking functions overloaded on the const-ness of this object. diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index f4e9e9f7..416e9f69 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -323,7 +323,7 @@ TEST(MatcherTest, CanBeImplicitlyConstructedFromValue) { // Tests that NULL can be used in place of Eq(NULL). TEST(MatcherTest, CanBeImplicitlyConstructedFromNULL) { - Matcher m1 = NULL; + Matcher m1 = nullptr; EXPECT_TRUE(m1.Matches(nullptr)); int n = 0; EXPECT_FALSE(m1.Matches(&n)); @@ -4779,8 +4779,8 @@ TEST(IsTrueTest, IsTrueIsFalse) { EXPECT_THAT(false, Not(IsTrue())); EXPECT_THAT(0, Not(IsTrue())); EXPECT_THAT(0, IsFalse()); - EXPECT_THAT(NULL, Not(IsTrue())); - EXPECT_THAT(NULL, IsFalse()); + EXPECT_THAT(nullptr, Not(IsTrue())); + EXPECT_THAT(nullptr, IsFalse()); EXPECT_THAT(-1, IsTrue()); EXPECT_THAT(-1, Not(IsFalse())); EXPECT_THAT(1, IsTrue()); diff --git a/googlemock/test/gmock_link_test.h b/googlemock/test/gmock_link_test.h index e85f7502..175d2bdd 100644 --- a/googlemock/test/gmock_link_test.h +++ b/googlemock/test/gmock_link_test.h @@ -414,7 +414,7 @@ TEST(LinkTest, TestThrow) { Mock mock; EXPECT_CALL(mock, VoidFromString(_)).WillOnce(Throw(42)); - EXPECT_THROW(mock.VoidFromString(NULL), int); + EXPECT_THROW(mock.VoidFromString(nullptr), int); } #endif // GTEST_HAS_EXCEPTIONS -- cgit v1.2.3