diff options
| author | Martin Hořeňovský | 2023-03-23 11:59:40 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2023-03-23 11:59:40 +0100 |
| commit | b3ebce715e9686f664e2756043a4c0e0e387a112 (patch) | |
| tree | 4966ae7103487e9ea3922386047f3eb6f836186c | |
| parent | d0f70fdfd661b50c1b8721ae70d49656dc68929b (diff) | |
| download | catch3-b3ebce715e9686f664e2756043a4c0e0e387a112.tar.gz | |
Cleanup benchmarking includes
| -rw-r--r-- | src/catch2/benchmark/catch_benchmark.hpp | 15 | ||||
| -rw-r--r-- | src/catch2/benchmark/catch_chronometer.hpp | 1 | ||||
| -rw-r--r-- | src/catch2/benchmark/detail/catch_analyse.hpp | 1 | ||||
| -rw-r--r-- | src/catch2/benchmark/detail/catch_benchmark_function.hpp | 1 | ||||
| -rw-r--r-- | src/catch2/benchmark/detail/catch_complete_invoke.hpp | 5 | ||||
| -rw-r--r-- | src/catch2/benchmark/detail/catch_measure.hpp | 1 | ||||
| -rw-r--r-- | src/catch2/benchmark/detail/catch_run_for_at_least.cpp | 3 |
7 files changed, 11 insertions, 16 deletions
diff --git a/src/catch2/benchmark/catch_benchmark.hpp b/src/catch2/benchmark/catch_benchmark.hpp index 1cf10be6..57adc67a 100644 --- a/src/catch2/benchmark/catch_benchmark.hpp +++ b/src/catch2/benchmark/catch_benchmark.hpp @@ -10,23 +10,26 @@ #ifndef CATCH_BENCHMARK_HPP_INCLUDED #define CATCH_BENCHMARK_HPP_INCLUDED -#include <catch2/interfaces/catch_interfaces_config.hpp> +#include <catch2/catch_user_config.hpp> #include <catch2/internal/catch_compiler_capabilities.hpp> #include <catch2/internal/catch_context.hpp> -#include <catch2/interfaces/catch_interfaces_reporter.hpp> -#include <catch2/internal/catch_unique_name.hpp> #include <catch2/internal/catch_move_and_forward.hpp> -#include <catch2/benchmark/catch_chronometer.hpp> +#include <catch2/internal/catch_test_failure_exception.hpp> +#include <catch2/internal/catch_unique_name.hpp> +#include <catch2/interfaces/catch_interfaces_capture.hpp> +#include <catch2/interfaces/catch_interfaces_config.hpp> +#include <catch2/interfaces/catch_interfaces_registry_hub.hpp> +#include <catch2/interfaces/catch_interfaces_reporter.hpp> #include <catch2/benchmark/catch_clock.hpp> #include <catch2/benchmark/catch_environment.hpp> #include <catch2/benchmark/catch_execution_plan.hpp> #include <catch2/benchmark/detail/catch_estimate_clock.hpp> -#include <catch2/benchmark/detail/catch_complete_invoke.hpp> #include <catch2/benchmark/detail/catch_analyse.hpp> #include <catch2/benchmark/detail/catch_benchmark_function.hpp> #include <catch2/benchmark/detail/catch_run_for_at_least.hpp> #include <algorithm> +#include <chrono> #include <functional> #include <string> #include <vector> @@ -82,7 +85,7 @@ namespace Catch { auto analysis = Detail::analyse(*cfg, env, samples.begin(), samples.end()); BenchmarkStats<FloatDuration<Clock>> stats{ CATCH_MOVE(info), CATCH_MOVE(analysis.samples), analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance }; getResultCapture().benchmarkEnded(stats); - } CATCH_CATCH_ANON (TestFailureException) { + } CATCH_CATCH_ANON (TestFailureException const&) { getResultCapture().benchmarkFailed("Benchmark failed due to failed assertion"_sr); } CATCH_CATCH_ALL{ getResultCapture().benchmarkFailed(translateActiveException()); diff --git a/src/catch2/benchmark/catch_chronometer.hpp b/src/catch2/benchmark/catch_chronometer.hpp index bce2406b..c3f81306 100644 --- a/src/catch2/benchmark/catch_chronometer.hpp +++ b/src/catch2/benchmark/catch_chronometer.hpp @@ -12,7 +12,6 @@ #include <catch2/benchmark/catch_clock.hpp> #include <catch2/benchmark/catch_optimizer.hpp> -#include <catch2/benchmark/detail/catch_complete_invoke.hpp> #include <catch2/internal/catch_meta.hpp> #include <catch2/internal/catch_move_and_forward.hpp> diff --git a/src/catch2/benchmark/detail/catch_analyse.hpp b/src/catch2/benchmark/detail/catch_analyse.hpp index 77b0a9d3..1751543c 100644 --- a/src/catch2/benchmark/detail/catch_analyse.hpp +++ b/src/catch2/benchmark/detail/catch_analyse.hpp @@ -10,7 +10,6 @@ #ifndef CATCH_ANALYSE_HPP_INCLUDED #define CATCH_ANALYSE_HPP_INCLUDED -#include <catch2/benchmark/catch_clock.hpp> #include <catch2/benchmark/catch_environment.hpp> #include <catch2/benchmark/catch_sample_analysis.hpp> #include <catch2/benchmark/detail/catch_stats.hpp> diff --git a/src/catch2/benchmark/detail/catch_benchmark_function.hpp b/src/catch2/benchmark/detail/catch_benchmark_function.hpp index 15298258..144e4b6e 100644 --- a/src/catch2/benchmark/detail/catch_benchmark_function.hpp +++ b/src/catch2/benchmark/detail/catch_benchmark_function.hpp @@ -11,7 +11,6 @@ #define CATCH_BENCHMARK_FUNCTION_HPP_INCLUDED #include <catch2/benchmark/catch_chronometer.hpp> -#include <catch2/benchmark/detail/catch_complete_invoke.hpp> #include <catch2/internal/catch_meta.hpp> #include <catch2/internal/catch_unique_ptr.hpp> #include <catch2/internal/catch_move_and_forward.hpp> diff --git a/src/catch2/benchmark/detail/catch_complete_invoke.hpp b/src/catch2/benchmark/detail/catch_complete_invoke.hpp index 49db413e..4dff4b7e 100644 --- a/src/catch2/benchmark/detail/catch_complete_invoke.hpp +++ b/src/catch2/benchmark/detail/catch_complete_invoke.hpp @@ -10,14 +10,9 @@ #ifndef CATCH_COMPLETE_INVOKE_HPP_INCLUDED #define CATCH_COMPLETE_INVOKE_HPP_INCLUDED -#include <catch2/internal/catch_test_failure_exception.hpp> #include <catch2/internal/catch_meta.hpp> -#include <catch2/interfaces/catch_interfaces_capture.hpp> -#include <catch2/interfaces/catch_interfaces_registry_hub.hpp> #include <catch2/internal/catch_move_and_forward.hpp> -#include <type_traits> - namespace Catch { namespace Benchmark { namespace Detail { diff --git a/src/catch2/benchmark/detail/catch_measure.hpp b/src/catch2/benchmark/detail/catch_measure.hpp index 388814c1..1a30efab 100644 --- a/src/catch2/benchmark/detail/catch_measure.hpp +++ b/src/catch2/benchmark/detail/catch_measure.hpp @@ -10,7 +10,6 @@ #ifndef CATCH_MEASURE_HPP_INCLUDED #define CATCH_MEASURE_HPP_INCLUDED -#include <catch2/benchmark/catch_clock.hpp> #include <catch2/benchmark/detail/catch_complete_invoke.hpp> #include <catch2/benchmark/detail/catch_timing.hpp> #include <catch2/internal/catch_move_and_forward.hpp> diff --git a/src/catch2/benchmark/detail/catch_run_for_at_least.cpp b/src/catch2/benchmark/detail/catch_run_for_at_least.cpp index 35778b27..3ebdcc05 100644 --- a/src/catch2/benchmark/detail/catch_run_for_at_least.cpp +++ b/src/catch2/benchmark/detail/catch_run_for_at_least.cpp @@ -7,9 +7,10 @@ // SPDX-License-Identifier: BSL-1.0 #include <catch2/benchmark/detail/catch_run_for_at_least.hpp> -#include <exception> #include <catch2/internal/catch_enforce.hpp> +#include <exception> + namespace Catch { namespace Benchmark { namespace Detail { |