From 2af48067ba243800efa37ca4cd5b71e4ebc6f6c3 Mon Sep 17 00:00:00 2001 From: Florian Weik Date: Thu, 21 Sep 2023 19:26:29 +0200 Subject: [PATCH] Make MSVC happy --- tests/central_moment.test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/central_moment.test.cpp b/tests/central_moment.test.cpp index a9233dc..7c8719c 100644 --- a/tests/central_moment.test.cpp +++ b/tests/central_moment.test.cpp @@ -11,27 +11,27 @@ using nrng::variance; using nrng::standard_deviation; TEST_CASE("first central moment") { - auto const values = std::array{1., 2., 3., 4., 5.}; + auto const values = std::array{1, 2, 3, 4, 5}; CHECK(central_moment<1>(values) == 0); CHECK(central_moment<1>(values.begin(), values.end()) == central_moment<1>(values)); } TEST_CASE("second central moment") { - auto const values = std::array{1., 2., 3., 4., 5.}; + auto const values = std::array{1, 2, 3, 4, 5}; auto shift_by_mean = [mu = mean(values)](auto v) { return v - mu; }; CHECK(central_moment<2>(values) == moment<2>(values | std::views::transform(shift_by_mean))); } TEST_CASE("variance") { - auto const values = std::array{1., 2., 3., 4., 5.}; + auto const values = std::array{1, 2, 3, 4, 5}; CHECK(variance(values) == central_moment<2>(values)); } TEST_CASE("standard deviation") { - auto const values = std::array{1., 2., 3., 4., 5.}; + auto const values = std::array{1, 2, 3, 4, 5}; CHECK(standard_deviation(values) == std::sqrt(variance(values))); } \ No newline at end of file