Googletest export
Modify NULL to nullptr in code examples
PiperOrigin-RevId: 314150792
diff --git a/googletest/docs/advanced.md b/googletest/docs/advanced.md
index 7ca40fe..60c1a2b 100644
--- a/googletest/docs/advanced.md
+++ b/googletest/docs/advanced.md
@@ -1006,7 +1006,7 @@
// in Subroutine() to abort the entire test.
// The actual behavior: the function goes on after Subroutine() returns.
- int* p = NULL;
+ int* p = nullptr;
*p = 3; // Segfault!
}
```
@@ -1193,7 +1193,7 @@
// Can be omitted if not needed.
static void TearDownTestSuite() {
delete shared_resource_;
- shared_resource_ = NULL;
+ shared_resource_ = nullptr;
}
// You can define per-test set-up logic as usual.
@@ -1206,7 +1206,7 @@
static T* shared_resource_;
};
-T* FooTest::shared_resource_ = NULL;
+T* FooTest::shared_resource_ = nullptr;
TEST_F(FooTest, Test1) {
... you can refer to shared_resource_ here ...