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
This commit is contained in:
Abseil Team 2021-11-09 14:36:57 -05:00 committed by dinord
parent aa486f165e
commit 79efd968bf

View File

@ -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 ...
}