From a8d6c890a55f61d65f568d2e4ffeb2f34115985e Mon Sep 17 00:00:00 2001 From: Chip Hogg Date: Tue, 11 Jan 2022 19:12:27 -0500 Subject: [PATCH] Move `pi_to_the` to the test file --- src/core/include/units/magnitude.h | 6 ------ test/unit_test/runtime/magnitude_test.cpp | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/core/include/units/magnitude.h b/src/core/include/units/magnitude.h index 8a000fca..7427e9dd 100644 --- a/src/core/include/units/magnitude.h +++ b/src/core/include/units/magnitude.h @@ -259,12 +259,6 @@ struct pi_base { static constexpr long double value = std::numbers::pi_v; }; -/** - * @brief A simple way to create a Magnitude representing a rational power of pi. - */ -template -constexpr auto pi_to_the() { return magnitude{Power}>{}; } - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Magnitude equality implementation. diff --git a/test/unit_test/runtime/magnitude_test.cpp b/test/unit_test/runtime/magnitude_test.cpp index df1afee7..f37a5cee 100644 --- a/test/unit_test/runtime/magnitude_test.cpp +++ b/test/unit_test/runtime/magnitude_test.cpp @@ -34,6 +34,9 @@ struct other_noncanonical_two_base { static constexpr long double value = 2.0L; struct invalid_zero_base { static constexpr long double value = 0.0L; }; struct invalid_negative_base { static constexpr long double value = -1.234L; }; +template +constexpr auto pi_to_the() { return magnitude{Power}>{}; } + TEST_CASE("base_power") { SECTION("base rep deducible for integral base")