summaryrefslogtreecommitdiffstats
path: root/docs/advanced.md
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2021-11-09 19:36:57 (GMT)
committerdinord <dino.radakovich@gmail.com>2021-11-09 21:31:33 (GMT)
commit79efd968bf7edb60667314750e101bbf99a0494e (patch)
tree945b9c83481ed961da6c6ae905b0a63548ea1854 /docs/advanced.md
parentaa486f165e982e82e2112d20a7561f64736d4b42 (diff)
downloadgoogletest-79efd968bf7edb60667314750e101bbf99a0494e.zip
googletest-79efd968bf7edb60667314750e101bbf99a0494e.tar.gz
googletest-79efd968bf7edb60667314750e101bbf99a0494e.tar.bz2
Googletest export
Update example for SetUpTestSuite/TearDownTestSuite to use modern C++ standards. Currently it is using an outdated C++ construct (defining static member variables separately from the declaration). PiperOrigin-RevId: 408663014
Diffstat (limited to 'docs/advanced.md')
-rw-r--r--docs/advanced.md4
1 files changed, 1 insertions, 3 deletions
diff --git a/docs/advanced.md b/docs/advanced.md
index f2f8854..aea4fee 100644
--- a/docs/advanced.md
+++ b/docs/advanced.md
@@ -926,11 +926,9 @@ class FooTest : public testing::Test {
void TearDown() override { ... }
// Some expensive resource shared by all tests.
- static T* shared_resource_;
+ static T* shared_resource_ = nullptr;
};
-T* FooTest::shared_resource_ = nullptr;
-
TEST_F(FooTest, Test1) {
... you can refer to shared_resource_ here ...
}