From 4bb49ed640e34e23187ad7ea689693ef9927033f Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 4 Oct 2018 18:28:05 -0400 Subject: 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 --- googlemock/test/gmock-internal-utils_test.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'googlemock/test/gmock-internal-utils_test.cc') diff --git a/googlemock/test/gmock-internal-utils_test.cc b/googlemock/test/gmock-internal-utils_test.cc index 5f53077c..7116e4fc 100644 --- a/googlemock/test/gmock-internal-utils_test.cc +++ b/googlemock/test/gmock-internal-utils_test.cc @@ -158,9 +158,9 @@ TEST(GetRawPointerTest, WorksForSmartPointers) { } TEST(GetRawPointerTest, WorksForRawPointers) { - int* p = NULL; + int* p = nullptr; // Don't use EXPECT_EQ as no NULL-testing magic on Symbian. - EXPECT_TRUE(NULL == GetRawPointer(p)); + EXPECT_TRUE(nullptr == GetRawPointer(p)); int n = 1; EXPECT_EQ(&n, GetRawPointer(&n)); } @@ -492,7 +492,7 @@ TEST(LogTest, NoSkippingStackFrameInOptMode) { AllOf(Ge(expected_skip_count), Le(expected_skip_count + 10))); // Restores the default OS stack trace getter. - GetUnitTestImpl()->set_os_stack_trace_getter(NULL); + GetUnitTestImpl()->set_os_stack_trace_getter(nullptr); } // Tests that all logs are printed when the value of the -- cgit v1.2.3