| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
// Copyright Catch2 Authors |
|
3
|
|
|
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. |
|
4
|
|
|
|
|
|
|
// (See accompanying file LICENSE_1_0.txt or copy at |
|
5
|
|
|
|
|
|
|
// https://www.boost.org/LICENSE_1_0.txt) |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
// SPDX-License-Identifier: BSL-1.0 |
|
8
|
|
|
|
|
|
|
// Adapted from donated nonius code. |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
#ifndef CATCH_REPEAT_HPP_INCLUDED |
|
11
|
|
|
|
|
|
|
#define CATCH_REPEAT_HPP_INCLUDED |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#include |
|
14
|
|
|
|
|
|
|
#include |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
namespace Catch { |
|
17
|
|
|
|
|
|
|
namespace Benchmark { |
|
18
|
|
|
|
|
|
|
namespace Detail { |
|
19
|
|
|
|
|
|
|
template |
|
20
|
|
|
|
|
|
|
struct repeater { |
|
21
|
0
|
|
|
|
|
|
void operator()(int k) const { |
|
22
|
0
|
0
|
|
|
|
|
for (int i = 0; i < k; ++i) { |
|
23
|
0
|
|
|
|
|
|
fun(); |
|
24
|
|
|
|
|
|
|
} |
|
25
|
0
|
|
|
|
|
|
} |
|
26
|
|
|
|
|
|
|
Fun fun; |
|
27
|
|
|
|
|
|
|
}; |
|
28
|
|
|
|
|
|
|
template |
|
29
|
0
|
|
|
|
|
|
repeater> repeat(Fun&& fun) { |
|
30
|
0
|
|
|
|
|
|
return { CATCH_FORWARD(fun) }; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
} // namespace Detail |
|
33
|
|
|
|
|
|
|
} // namespace Benchmark |
|
34
|
|
|
|
|
|
|
} // namespace Catch |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
#endif // CATCH_REPEAT_HPP_INCLUDED |