diff --git a/src/Magnum/Math/Test/RectangularMatrixTest.cpp b/src/Magnum/Math/Test/RectangularMatrixTest.cpp index 372fc2d61..1246cd18d 100644 --- a/src/Magnum/Math/Test/RectangularMatrixTest.cpp +++ b/src/Magnum/Math/Test/RectangularMatrixTest.cpp @@ -556,6 +556,9 @@ void RectangularMatrixTest::subclass() { CORRADE_COMPARE(d*2.0f, dExpected); CORRADE_COMPARE(2.0f*d, dExpected); + /* No need to test in-place operators as the other ones are implemented + using them */ + Mat2x2 e(Vector2(-2.0f, 5.0f), Vector2(5.0f, -2.0f)); CORRADE_COMPARE(e/0.5f, dExpected); diff --git a/src/Magnum/Math/Test/VectorTest.cpp b/src/Magnum/Math/Test/VectorTest.cpp index 1bb9a2d5e..78b43bf47 100644 --- a/src/Magnum/Math/Test/VectorTest.cpp +++ b/src/Magnum/Math/Test/VectorTest.cpp @@ -589,6 +589,7 @@ void VectorTest::subclass() { constexpr const Vec2 a{-2.0f, 5.0f}; CORRADE_COMPARE(a[0], -2.0f); + CORRADE_COMPARE(-Vec2(-2.0f, 5.0f), Vec2(2.0f, -5.0f)); CORRADE_COMPARE(Vec2(-2.0f, 5.0f) + Vec2(1.0f, -3.0f), Vec2(-1.0f, 2.0f)); CORRADE_COMPARE(Vec2(-2.0f, 5.0f) - Vec2(1.0f, -3.0f), Vec2(-3.0f, 8.0f)); @@ -600,6 +601,9 @@ void VectorTest::subclass() { CORRADE_COMPARE(Vec2(-2.0f, 5.0f)*Vec2(1.5f, -2.0f), Vec2(-3.0f, -10.0f)); CORRADE_COMPARE(Vec2(-2.0f, 5.0f)/Vec2(2.0f/3.0f, -0.5f), Vec2(-3.0f, -10.0f)); + /* No need to test in-place operators as the other ones are implemented + using them */ + /* Modulo operations */ CORRADE_COMPARE(Vec2i(4, 13) % 2, Vec2i(0, 1)); CORRADE_COMPARE(Vec2i(4, 13) % Vec2i(2, 5), Vec2i(0, 3));