diff options
author | Abseil Team <absl-team@google.com> | 2021-11-09 14:36:57 -0500 |
---|---|---|
committer | dinord <dino.radakovich@gmail.com> | 2021-11-09 16:29:23 -0500 |
commit | 1b154adbcb6a10c93b2d64aa441fed9c3e8ef56d (patch) | |
tree | 945b9c83481ed961da6c6ae905b0a63548ea1854 | |
parent | aa486f165e982e82e2112d20a7561f64736d4b42 (diff) | |
download | googletest-git-4523B6410BFCD3289597FA2B5B6E18DE.tar.gz |
Export Test - Do Not Merge4523B6410BFCD3289597FA2B5B6E18DE
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
-rw-r--r-- | docs/advanced.md | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/docs/advanced.md b/docs/advanced.md index f2f8854b..aea4feec 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 ... } |