diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/advanced.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/advanced.md b/docs/advanced.md index aea4fee..f2f8854 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -926,9 +926,11 @@ class FooTest : public testing::Test { void TearDown() override { ... } // Some expensive resource shared by all tests. - static T* shared_resource_ = nullptr; + static T* shared_resource_; }; +T* FooTest::shared_resource_ = nullptr; + TEST_F(FooTest, Test1) { ... you can refer to shared_resource_ here ... } |