From 4744b631bbbdfcaddde41e472e518b067c317ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 16 Mar 2013 21:13:46 +0100 Subject: [PATCH] Math: test pow() constexpr. --- src/Math/Test/FunctionsTest.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Math/Test/FunctionsTest.cpp b/src/Math/Test/FunctionsTest.cpp index 55191dd1b..2d178c166 100644 --- a/src/Math/Test/FunctionsTest.cpp +++ b/src/Math/Test/FunctionsTest.cpp @@ -259,6 +259,10 @@ void FunctionsTest::pow() { CORRADE_COMPARE(Math::pow<10>(2ul), 1024ul); CORRADE_COMPARE(Math::pow<0>(3ul), 1ul); CORRADE_COMPARE(Math::pow<2>(2.0f), 4.0f); + + /* Constant expression */ + constexpr Int a = Math::pow<3>(5); + CORRADE_COMPARE(a, 125); } void FunctionsTest::log() {