From 37c93468fd9c9851436cbc0f594d2da3899020fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 21 Mar 2013 23:20:47 +0100 Subject: [PATCH] Math: test that implicit conversion of Rectangle type can't compile. --- src/Math/Geometry/Test/RectangleTest.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Math/Geometry/Test/RectangleTest.cpp b/src/Math/Geometry/Test/RectangleTest.cpp index 63fac06ac..c53f35bc4 100644 --- a/src/Math/Geometry/Test/RectangleTest.cpp +++ b/src/Math/Geometry/Test/RectangleTest.cpp @@ -82,6 +82,9 @@ void RectangleTest::constructConversion() { constexpr Rectangle a({1.3f, 2.7f}, {-15.0f, 7.0f}); constexpr Rectanglei b(a); CORRADE_COMPARE(b, Rectanglei({1, 2}, {-15, 7})); + + /* Implicit conversion is not allowed */ + CORRADE_VERIFY(!(std::is_convertible::value)); } void RectangleTest::constructCopy() {