Browse Source

Math: test that it's possible to convert Vector<1, T> to T.

It's not (but should be).
pull/136/head
Vladimír Vondruš 10 years ago
parent
commit
d6d0fd1890
  1. 6
      src/Magnum/Math/Test/VectorTest.cpp

6
src/Magnum/Math/Test/VectorTest.cpp

@ -214,7 +214,11 @@ void VectorTest::constructOneComponent() {
/* Implicit constructor must work */
constexpr Vector1 vec = 1.0f;
CORRADE_COMPARE(vec, Vector1(1));
CORRADE_COMPARE(vec, Vector1{1.0f});
/* Conversion back must also work */
Float value = vec;
CORRADE_COMPARE(value, 1.0f);
}
void VectorTest::constructConversion() {

Loading…
Cancel
Save