Skip to content
Snippets Groups Projects

Set AssertError to inherit from std::runtime_error

Merged Stéphane Del Pino requested to merge feature/unit-tests into develop
1 file
+ 13
1
Compare changes
  • Side-by-side
  • Inline
+ 13
1
@@ -24,6 +24,7 @@ TEST_CASE("TinyMatrix", "[algebra]")
(A(1, 2) == 6) and (A(2, 0) == 7) and (A(2, 1) == 8) and (A(2, 2) == 9)));
TinyMatrix<3, int> B(6, 5, 3, 8, 34, 6, 35, 6, 7);
SECTION("checking for opposed matrix")
{
const TinyMatrix<3, int> minus_A = -A;
@@ -31,6 +32,7 @@ TEST_CASE("TinyMatrix", "[algebra]")
(minus_A(1, 1) == -5) and (minus_A(1, 2) == -6) and (minus_A(2, 0) == -7) and (minus_A(2, 1) == -8) and
(minus_A(2, 2) == -9)));
}
SECTION("checking for equality and difference tests")
{
const TinyMatrix<3, int> copy_A = A;
@@ -209,14 +211,24 @@ TEST_CASE("TinyMatrix", "[algebra]")
REQUIRE(TinyMatrix<1>{}.numberOfRows() == 1);
REQUIRE(TinyMatrix<1>{}.numberOfColumns() == 1);
REQUIRE(TinyMatrix<1>{}.dimension() == 1);
REQUIRE(TinyMatrix<1>{}.numberOfValues() == 1);
REQUIRE(TinyMatrix<2>{}.numberOfRows() == 2);
REQUIRE(TinyMatrix<2>{}.numberOfColumns() == 2);
REQUIRE(TinyMatrix<2>{}.dimension() == 4);
REQUIRE(TinyMatrix<2>{}.numberOfValues() == 4);
REQUIRE(TinyMatrix<3>{}.numberOfRows() == 3);
REQUIRE(TinyMatrix<3>{}.numberOfColumns() == 3);
REQUIRE(TinyMatrix<3>{}.dimension() == 9);
REQUIRE(TinyMatrix<3>{}.numberOfValues() == 9);
}
SECTION("is square matrix")
{
REQUIRE(TinyMatrix<1>{}.isSquare());
REQUIRE(TinyMatrix<2>{}.isSquare());
REQUIRE(TinyMatrix<3>{}.isSquare());
REQUIRE(TinyMatrix<4>{}.isSquare());
}
SECTION("checking for matrices output")
Loading