Commit 3c4c716b authored by Carsten Gräser's avatar Carsten Gräser

[test] Use Dune::TestSuite to improve test

This way one gets individual error messages for failed checks.
parent 44a6af7c
......@@ -5,6 +5,7 @@
#include <limits>
#include <dune/common/exceptions.hh>
#include <dune/common/test/testsuite.hh>
#include <dune/fufem/test/common.hh>
#include <dune/fufem/geometry/refinedsimplexgeometry.hh>
......@@ -40,24 +41,37 @@ class RefinedSimplexGeometryTestSuite
}
bool check()
Dune::TestSuite test()
{
return true and
check_affine() and
check_type() and
check_corners() and
check_corner() and
check_center() and
check_global() and
check_local() and
check_integrationElement() and
check_volume() and
check_jacobianTransposed() and
check_jacobianInverseTransposed();
Dune::TestSuite test;
test.check(check_affine())
<< "Geometry is not affine";
test.check(check_type())
<< "type() is not implemented";
test.check(check_corners())
<< "Incorrect number of corners";
test.check(check_corner())
<< "corner() is inconsistent";
test.check(check_center())
<< "center() is not implemented";
test.check(check_global())
<< "global() is inconsistent";
test.check(check_local())
<< "local() is inconsistent";
test.check(check_integrationElement())
<< "integrationElement() is inconsistent";
test.check(check_volume())
<< "volume() is not implemented";
test.check(check_jacobianTransposed())
<< "jacobianTransposed() is inconsistent";
test.check(check_jacobianInverseTransposed())
<< "jacobianInverseTransposed() is inconsistent";
return test;
}
private:
bool check_affine()
{
return not testGeometry.affine();
......@@ -198,5 +212,5 @@ class RefinedSimplexGeometryTestSuite
int main (int argc, char *argv[])
{
RefinedSimplexGeometryTestSuite testSuite;
return not testSuite.check();
return testSuite.test().exit();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment