Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Cleanup benchmarking includes

Commit
b3ebce715e9686f664e2756043a4c0e0e387a112
Author
Martin Hořeňovský ·
Parents
d0f70fdfd661

Files · Download .tar.gz

Changes

 src/catch2/benchmark/catch_benchmark.hpp                 | 15 +++++++++------
 src/catch2/benchmark/catch_chronometer.hpp               |  1 -
 src/catch2/benchmark/detail/catch_analyse.hpp            |  1 -
 src/catch2/benchmark/detail/catch_benchmark_function.hpp |  1 -
 src/catch2/benchmark/detail/catch_complete_invoke.hpp    |  5 -----
 src/catch2/benchmark/detail/catch_measure.hpp            |  1 -
 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 {