Skip to content

Commit 561a8a2

Browse files
committed
fix linter
1 parent 1d0d08c commit 561a8a2

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

test/benchmark_setup_teardown_cb_types_test.cc

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,17 @@ static int functor_calls = 0;
1010
static int lambda_calls = 0;
1111
static int ctr_copy_calls = 0;
1212
static int ctr_move_calls = 0;
13-
};
13+
}; // namespace counters
1414

1515
struct Functor {
1616
Functor() {}
17-
Functor(const Functor& /*unused*/){
18-
counters::ctr_copy_calls++;
19-
}
20-
Functor(Functor&& /*unused*/){
21-
counters::ctr_move_calls++;
22-
}
23-
//void operator()(const benchmark::State& /*unused*/) { counters::functor_calls++; }
24-
void operator()(const benchmark::State& /*unused*/) { }
17+
Functor(const Functor& /*unused*/) { counters::ctr_copy_calls++; }
18+
Functor(Functor&& /*unused*/) { counters::ctr_move_calls++; }
19+
void operator()(const benchmark::State& /*unused*/) {}
2520
};
2621

27-
void BM_DoSomething(benchmark::State& state){
28-
for(auto _ : state) {
22+
void BM_DoSomething(benchmark::State& state) {
23+
for (auto _ : state) {
2924
}
3025
}
3126

@@ -67,33 +62,33 @@ int main(int argc, char** argv) {
6762
assert(counters::ctr_move_calls == 4);
6863
}
6964
{
70-
bm->Setup([](const benchmark::State& /*unused*/){});
71-
bm->Teardown([](const benchmark::State& /*unused*/){});
65+
bm->Setup([](const benchmark::State& /*unused*/) {});
66+
bm->Teardown([](const benchmark::State& /*unused*/) {});
7267
}
7368
{
74-
callback_function func1 = [](const benchmark::State& /*unused*/){};
69+
callback_function func1 = [](const benchmark::State& /*unused*/) {};
7570
callback_function func2 = func1;
7671
bm->Setup(std::move(func1));
7772
bm->Teardown(std::move(func2));
7873
assert(func1 == nullptr);
7974
assert(func2 == nullptr);
8075
}
8176
{
82-
callback_function func1 = [](const benchmark::State& /*unused*/){};
77+
callback_function func1 = [](const benchmark::State& /*unused*/) {};
8378
callback_function func2 = func1;
8479
bm->Setup(func1);
8580
bm->Teardown(func2);
8681
assert(func1 != nullptr);
8782
assert(func2 != nullptr);
8883
}
8984
{
90-
auto func = [](const benchmark::State& /*unused*/){};
85+
auto func = [](const benchmark::State& /*unused*/) {};
9186
bm->Setup(func);
9287
bm->Teardown(func);
9388
assert(func != nullptr);
9489
}
9590
{
96-
auto func1 = [](const benchmark::State& /*unused*/){};
91+
auto func1 = [](const benchmark::State& /*unused*/) {};
9792
auto func2 = func1;
9893
bm->Setup(std::move(func1));
9994
bm->Teardown(std::move(func2));

0 commit comments

Comments
 (0)