aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2019-02-04 16:26:51 +0300
committerGitHub <noreply@github.com>2019-02-04 16:26:51 +0300
commitb8ca0c42179b7b5d656494e61dda8b861057122f (patch)
tree962310841a40e99a07f9db42e363820134aa3557
parent97393e5ef820fda0330830d56c774949b4cfbb29 (diff)
downloadgoogle-benchmark-b8ca0c42179b7b5d656494e61dda8b861057122f.tar.gz
README.md: mention that fixture has SetUp() / TearDown()
-rw-r--r--README.md9
1 files changed, 8 insertions, 1 deletions
diff --git a/README.md b/README.md
index 858ea23..902915e 100644
--- a/README.md
+++ b/README.md
@@ -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) {