diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2019-02-04 16:26:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-04 16:26:51 +0300 |
commit | b8ca0c42179b7b5d656494e61dda8b861057122f (patch) | |
tree | 962310841a40e99a07f9db42e363820134aa3557 | |
parent | 97393e5ef820fda0330830d56c774949b4cfbb29 (diff) | |
download | google-benchmark-b8ca0c42179b7b5d656494e61dda8b861057122f.tar.gz |
README.md: mention that fixture has SetUp() / TearDown()
-rw-r--r-- | README.md | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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) { |