Skip to content
Snippets Groups Projects
Commit a5864889 authored by Luca Erbetta's avatar Luca Erbetta :rocket:
Browse files

[test-matrix] Fixed tests

parent 6ac6a464
Branches
Tags
No related merge requests found
......@@ -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 ));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment