Skip to content
Snippets Groups Projects
Commit 09c4d040 authored by Oliver Sander's avatar Oliver Sander
Browse files

Test for some required matrix constructors

parent 11eba9f2
Branches
Tags
1 merge request!282Improve matrix testing
......@@ -25,6 +25,9 @@ int testBCRSMatrix(int size)
// Test the matrix norms
testNorms(mat);
// Test whether matrix class has the required constructors
testMatrixConstructibility<Matrix>();
return 0;
}
......
......@@ -20,6 +20,14 @@
namespace Dune
{
/** \brief Test whether the given type is default- and copy-constructible */
template <typename Matrix>
void testMatrixConstructibility()
{
static_assert(std::is_default_constructible<Matrix>::value, "Matrix type is not default constructible");
static_assert(std::is_copy_constructible<Matrix>::value, "Matrix type is not copy constructible");
}
/** \brief Test whether a given type implements all the norms required from a dune-istl matrix
*/
template <typename Matrix>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment