diff --git a/src/Magnum/Math/Test/ConstantsTest.cpp b/src/Magnum/Math/Test/ConstantsTest.cpp index 9606298c5..4ac226d81 100644 --- a/src/Magnum/Math/Test/ConstantsTest.cpp +++ b/src/Magnum/Math/Test/ConstantsTest.cpp @@ -34,30 +34,20 @@ namespace Magnum { namespace Math { namespace Test { struct ConstantsTest: Corrade::TestSuite::Tester { explicit ConstantsTest(); - void constants(); - void specials(); - - private: - template void _constants(); - template void _specials(); + template void constants(); + template void specials(); }; ConstantsTest::ConstantsTest() { - addTests({&ConstantsTest::constants, - &ConstantsTest::specials}); + addTests({&ConstantsTest::constants, + &ConstantsTest::constants, + &ConstantsTest::specials, + &ConstantsTest::specials}); } -void ConstantsTest::constants() { - _constants(); - _constants(); -} +template void ConstantsTest::constants() { + setTestCaseName(std::is_same::value ? "constants" : "constants"); -void ConstantsTest::specials() { - _specials(); - _specials(); -} - -template void ConstantsTest::_constants() { constexpr T a = Constants::sqrt2(); constexpr T b = Constants::sqrt3(); CORRADE_COMPARE(Math::pow<2>(a), T(2)); @@ -73,7 +63,9 @@ template void ConstantsTest::_constants() { CORRADE_COMPARE(std::log(f), T(1)); } -template void ConstantsTest::_specials() { +template void ConstantsTest::specials() { + setTestCaseName(std::is_same::value ? "specials" : "specials"); + #ifndef CORRADE_MSVC2015_COMPATIBILITY /* NaN is not constexpr */ constexpr #endif