README.md: mention that fixture has SetUp() / TearDown()

This commit is contained in:
Roman Lebedev 2019-02-04 16:26:51 +03:00 committed by GitHub
parent 97393e5ef8
commit b8ca0c4217
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -615,7 +615,14 @@ creating/registering the tests using the following macros:
For Example:
```c++
class MyFixture : public benchmark::Fixture {};
class MyFixture : public benchmark::Fixture {
public:
void SetUp(const ::benchmark::State& state) {
}
void TearDown(const ::benchmark::State& state) {
}
};
BENCHMARK_F(MyFixture, FooTest)(benchmark::State& st) {
for (auto _ : st) {