diff --git a/src/Magnum/Math/Test/RectangularMatrixTest.cpp b/src/Magnum/Math/Test/RectangularMatrixTest.cpp index 253453474..20c2963b5 100644 --- a/src/Magnum/Math/Test/RectangularMatrixTest.cpp +++ b/src/Magnum/Math/Test/RectangularMatrixTest.cpp @@ -707,6 +707,20 @@ void RectangularMatrixTest::configuration() { CORRADE_COMPARE(c.value("matrix"), value); CORRADE_COMPARE(c.value("matrix"), m); + + /* Underflow */ + c.setValue("underflow", "2.1 8.9 1.3 1 5 7 1.5"); + CORRADE_COMPARE(c.value("underflow"), (Matrix3x4{ + Vector4{2.1f, 1.0f, 1.5f, 0.0f}, + Vector4{8.9f, 5.0f, 0.0f, 0.0f}, + Vector4{1.3f, 7.0f, 0.0f, 0.0f}})); + + /* Overflow */ + c.setValue("overflow", "2 1 8 9 1 3 1 5 7 1 6 3 3 1.5 23 17"); + CORRADE_COMPARE(c.value("overflow"), (Matrix3x4{ + Vector4{2.0f, 9.0f, 1.0f, 1.0f}, + Vector4{1.0f, 1.0f, 5.0f, 6.0f}, + Vector4{8.0f, 3.0f, 7.0f, 3.0f}})); } }}} diff --git a/src/Magnum/Math/Test/VectorTest.cpp b/src/Magnum/Math/Test/VectorTest.cpp index 4f3bde0a9..773359952 100644 --- a/src/Magnum/Math/Test/VectorTest.cpp +++ b/src/Magnum/Math/Test/VectorTest.cpp @@ -702,6 +702,14 @@ void VectorTest::configuration() { c.setValue("vector", vec); CORRADE_COMPARE(c.value("vector"), value); CORRADE_COMPARE(c.value("vector"), vec); + + /* Underflow */ + c.setValue("underflow", "2.1 8.9"); + CORRADE_COMPARE(c.value("underflow"), (Vector4{2.1f, 8.9f, 0.0f, 0.0f})); + + /* Overflow */ + c.setValue("overflow", "2 1 8 9 16 33"); + CORRADE_COMPARE(c.value("overflow"), (Vector4{2.0f, 1.0f, 8.0f, 9.0f})); } }}}