Unverified Commit b8ca0c42 by Roman Lebedev Committed by GitHub

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

parent 97393e5e
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment