[RISCV] Add shrinkwrap test cases showing gaps in current impl
[llvm-project.git] / third-party / benchmark / test / templated_fixture_test.cc
blobaf239c3a725e108803ad4e03e6c6cb3ee9dec592
2 #include <cassert>
3 #include <memory>
5 #include "benchmark/benchmark.h"
7 template <typename T>
8 class MyFixture : public ::benchmark::Fixture {
9 public:
10 MyFixture() : data(0) {}
12 T data;
15 BENCHMARK_TEMPLATE_F(MyFixture, Foo, int)(benchmark::State& st) {
16 for (auto _ : st) {
17 data += 1;
21 BENCHMARK_TEMPLATE_DEFINE_F(MyFixture, Bar, double)(benchmark::State& st) {
22 for (auto _ : st) {
23 data += 1.0;
26 BENCHMARK_REGISTER_F(MyFixture, Bar);
28 BENCHMARK_MAIN();