summaryrefslogtreecommitdiffstats
path: root/googletest/test/gtest_assert_by_exception_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 /googletest/test/gtest_assert_by_exception_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 'googletest/test/gtest_assert_by_exception_test.cc')
-rw-r--r--googletest/test/gtest_assert_by_exception_test.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/googletest/test/gtest_assert_by_exception_test.cc b/googletest/test/gtest_assert_by_exception_test.cc
index 0eae857..7dfd48c 100644
--- a/googletest/test/gtest_assert_by_exception_test.cc
+++ b/googletest/test/gtest_assert_by_exception_test.cc
@@ -80,8 +80,7 @@ TEST(Test, Test) {
try {
AssertFalse();
} catch(const testing::AssertionException& e) {
- if (strstr(e.what(), "Expected failure") != NULL)
- throw;
+ if (strstr(e.what(), "Expected failure") != nullptr) throw;
printf("%s",
"A failed assertion did throw an exception of the right type, "