From a5864889466f70148c801438d2adf23d02b3acb7 Mon Sep 17 00:00:00 2001 From: Luca Erbetta <luca.erbetta@skywarder.eu> Date: Mon, 2 Mar 2020 23:48:43 +0100 Subject: [PATCH] [test-matrix] Fixed tests --- src/tests/catch/test-matrix.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tests/catch/test-matrix.cpp b/src/tests/catch/test-matrix.cpp index 32ee05424..8a5ef3dbf 100644 --- a/src/tests/catch/test-matrix.cpp +++ b/src/tests/catch/test-matrix.cpp @@ -34,6 +34,8 @@ TEST_CASE("Multiply test") MatrixBase<float, 3, 1> B{1.0f, 2.0f, 3.7f}; MatrixBase<float, 3, 1> C{}; + C = A * B; + REQUIRE( C(0,0) == Approx( 8.1f) ); REQUIRE( C(1,0) == Approx(-7.7f) ); REQUIRE( C(2,0) == Approx(-10.3f) ); @@ -46,6 +48,8 @@ TEST_CASE("Sum test") MatrixBase<float, 3, 3> C{}; + C = A + B; + REQUIRE( C(0,0) == Approx(2.0f )); REQUIRE( C(0,1) == Approx(0.0f )); REQUIRE( C(0,2) == Approx(6.0f )); @@ -64,6 +68,8 @@ TEST_CASE("Subtract test") MatrixBase<float, 3, 3> C{}; + C = A - B; + REQUIRE( C(0,0) == Approx(0.0f )); REQUIRE( C(0,1) == Approx(-4.0f )); REQUIRE( C(0,2) == Approx(0.0f )); -- GitLab