summaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock_stress_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_stress_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_stress_test.cc')
-rw-r--r--googlemock/test/gmock_stress_test.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/googlemock/test/gmock_stress_test.cc b/googlemock/test/gmock_stress_test.cc
index 0d99bed..9ae0b1e 100644
--- a/googlemock/test/gmock_stress_test.cc
+++ b/googlemock/test/gmock_stress_test.cc
@@ -210,7 +210,7 @@ void TestConcurrentCallsOnSameObject(Dummy /* dummy */) {
int count1 = 0;
const Helper1Param param = { &foo, &count1 };
ThreadWithParam<Helper1Param>* const t =
- new ThreadWithParam<Helper1Param>(Helper1, param, NULL);
+ new ThreadWithParam<Helper1Param>(Helper1, param, nullptr);
int count2 = 0;
const Helper1Param param2 = { &foo, &count2 };
@@ -264,7 +264,7 @@ void TestPartiallyOrderedExpectationsWithThreads(Dummy /* dummy */) {
foo.Bar(1);
ThreadWithParam<MockFoo*>* const t =
- new ThreadWithParam<MockFoo*>(Helper2, &foo, NULL);
+ new ThreadWithParam<MockFoo*>(Helper2, &foo, nullptr);
Helper2(&foo);
JoinAndDelete(t);
@@ -288,8 +288,8 @@ TEST(StressTest, CanUseGMockWithThreads) {
ThreadWithParam<Dummy>* threads[kTestThreads] = {};
for (int i = 0; i < kTestThreads; i++) {
// Creates a thread to run the test function.
- threads[i] =
- new ThreadWithParam<Dummy>(test_routines[i % kRoutines], Dummy(), NULL);
+ threads[i] = new ThreadWithParam<Dummy>(test_routines[i % kRoutines],
+ Dummy(), nullptr);
GTEST_LOG_(INFO) << "Thread #" << i << " running . . .";
}