Skip to content
Snippets Groups Projects
Commit 2aa3034d authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add test for runtime incompatible matrix/vector product

parent 32567b1a
No related branches found
No related tags found
1 merge request!26Feature/linear systems
......@@ -6,8 +6,6 @@
template class SparseMatrixDescriptor<int, uint8_t>;
TEST_CASE("CRSMatrix", "[algebra]")
{
SECTION("CRSMatrix")
{
SECTION("matrix size")
{
......@@ -128,5 +126,13 @@ TEST_CASE("CRSMatrix", "[algebra]")
REQUIRE(y[2] == 110);
REQUIRE(y[3] == 150);
}
#ifndef NDEBUG
SECTION("incompatible runtime matrix/vector product")
{
CRSMatrix<int, uint8_t> A{SparseMatrixDescriptor<int, uint8_t>{4}};
Vector<int> x{2};
REQUIRE_THROWS_AS(A * x, AssertError);
}
#endif // NDEBUG
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment