From 9f97ced58f3755edfbb19f15a4d5c47cb3d7ae36 Mon Sep 17 00:00:00 2001 From: Lars Froehlich Date: Tue, 1 Sep 2026 17:50:59 +0200 Subject: [PATCH] Fix type mismatch in standard_deviation() tests [why] The return value of StandardDeviation::mean() in this case is the default, double. Therefore we should compare it to a double literal, not to TestType. --- tests/test_statistics.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_statistics.cc b/tests/test_statistics.cc index caf89f4..8730228 100644 --- a/tests/test_statistics.cc +++ b/tests/test_statistics.cc @@ -141,7 +141,7 @@ TEMPLATE_TEST_CASE("standard_deviation()", "[statistics]", auto std_mean = standard_deviation(arr1); REQUIRE(std::isnan(std_mean.sigma())); - REQUIRE(std_mean.mean() == TestType{ 42 }); + REQUIRE(std_mean.mean() == 42.0); } SECTION("Container with 4 elements")