CppBenchmark  1.0.4.0
C++ Benchmark Library
fixture.h
Go to the documentation of this file.
1 
9 #ifndef CPPBENCHMARK_FIXTURE_H
10 #define CPPBENCHMARK_FIXTURE_H
11 
12 #include "benchmark/context.h"
13 
14 namespace CppBenchmark {
15 
17 
20 class Fixture
21 {
22 public:
23  Fixture() noexcept = default;
24  Fixture(const Fixture&) noexcept = default;
25  Fixture(Fixture&&) noexcept = default;
26  virtual ~Fixture() noexcept = default;
27 
28  Fixture& operator=(const Fixture&) noexcept = default;
29  Fixture& operator=(Fixture&&) noexcept = default;
30 
31 protected:
33 
38  virtual void Initialize(Context& context) {}
40 
45  virtual void Cleanup(Context& context) {}
46 };
47 
48 } // namespace CppBenchmark
49 
50 #endif // CPPBENCHMARK_FIXTURE_H
Benchmark running context.
Definition: context.h:27
Benchmark fixture.
Definition: fixture.h:21
virtual void Initialize(Context &context)
Initialize benchmark.
Definition: fixture.h:38
virtual void Cleanup(Context &context)
Cleanup benchmark.
Definition: fixture.h:45
Fixture() noexcept=default
Benchmark running context definition.
C++ Benchmark project definitions.
Definition: barrier.h:15