diff --git a/src/Math/Test/AngleTest.cpp b/src/Math/Test/AngleTest.cpp index 1feba3aa8..cdc3b3eba 100644 --- a/src/Math/Test/AngleTest.cpp +++ b/src/Math/Test/AngleTest.cpp @@ -128,10 +128,11 @@ void AngleTest::literals() { } void AngleTest::conversion() { - constexpr Deg a(Rad(1.57079633f)); + /* Implicit conversion should be allowed */ + constexpr Deg a = Rad(1.57079633f); CORRADE_COMPARE(Float(a), 90.0f); - constexpr Rad b(Deg(90.0f)); + constexpr Rad b = Deg(90.0f); CORRADE_COMPARE(Float(b), 1.57079633f); } diff --git a/src/Math/Test/UnitTest.cpp b/src/Math/Test/UnitTest.cpp index 1951fd127..805b0a4b1 100644 --- a/src/Math/Test/UnitTest.cpp +++ b/src/Math/Test/UnitTest.cpp @@ -64,6 +64,10 @@ inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, Sec val void UnitTest::construct() { constexpr Sec a(25.0f); CORRADE_COMPARE(Float(a), 25.0f); + + /* Implicit conversion is not allowed */ + CORRADE_VERIFY(!(std::is_convertible::value)); + CORRADE_VERIFY(!(std::is_convertible::value)); } void UnitTest::constructDefault() { @@ -75,6 +79,9 @@ void UnitTest::constructConversion() { constexpr Seci a(25.0); constexpr Sec b(a); CORRADE_COMPARE(b, Sec(25.0f)); + + /* Implicit conversion is not allowed */ + CORRADE_VERIFY(!(std::is_convertible::value)); } void UnitTest::compare() {