diff --git a/src/Math/Test/ConstantsTest.cpp b/src/Math/Test/ConstantsTest.cpp index 98211496b..eef26316f 100644 --- a/src/Math/Test/ConstantsTest.cpp +++ b/src/Math/Test/ConstantsTest.cpp @@ -41,11 +41,15 @@ ConstantsTest::ConstantsTest() { } void ConstantsTest::constants() { - CORRADE_COMPARE(Math::pow<2>(Constants::sqrt2()), 2.0f); - CORRADE_COMPARE(Math::pow<2>(Constants::sqrt3()), 3.0f); - - CORRADE_COMPARE(Math::pow<2>(Constants::sqrt2()), 2.0); - CORRADE_COMPARE(Math::pow<2>(Constants::sqrt3()), 3.0); + constexpr Float a = Constants::sqrt2(); + constexpr Float b = Constants::sqrt3(); + CORRADE_COMPARE(Math::pow<2>(a), 2.0f); + CORRADE_COMPARE(Math::pow<2>(b), 3.0f); + + constexpr Double c = Constants::sqrt2(); + constexpr Double d = Constants::sqrt3(); + CORRADE_COMPARE(Math::pow<2>(c), 2.0); + CORRADE_COMPARE(Math::pow<2>(d), 3.0); } }}}