aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sparse_solver.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2018-10-16 00:43:44 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2018-10-16 00:43:44 +0200
commite3b85771d76d3f62bec99c4ab1a8223b71b53286 (patch)
treed129ba1aaec5bf8d663431184d831ce18dd68091 /test/sparse_solver.h
parentd2d570c116c514689911d941db4937238436b85c (diff)
Show call stack in case of failing sparse solving.
Diffstat (limited to 'test/sparse_solver.h')
-rw-r--r--test/sparse_solver.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/sparse_solver.h b/test/sparse_solver.h
index 19416ed5d..f45d7ef80 100644
--- a/test/sparse_solver.h
+++ b/test/sparse_solver.h
@@ -59,7 +59,11 @@ void check_sparse_solving(Solver& solver, const typename Solver::MatrixType& A,
x = solver.solve(b);
if (solver.info() != Success)
{
- std::cerr << "WARNING | sparse solver testing: solving failed (" << typeid(Solver).name() << ")\n";
+ std::cerr << "WARNING: sparse solver testing: solving failed (" << typeid(Solver).name() << ")\n";
+ // dump call stack:
+ g_test_level++;
+ VERIFY(solver.info() == Success);
+ g_test_level--;
return;
}
VERIFY(oldb.isApprox(b) && "sparse solver testing: the rhs should not be modified!");
@@ -67,7 +71,7 @@ void check_sparse_solving(Solver& solver, const typename Solver::MatrixType& A,
x.setZero();
solve_with_guess(solver, b, x, x);
- VERIFY(solver.info() == Success && "solving failed when using analyzePattern/factorize API");
+ VERIFY(solver.info() == Success && "solving failed when using solve_with_guess API");
VERIFY(oldb.isApprox(b) && "sparse solver testing: the rhs should not be modified!");
VERIFY(x.isApprox(refX,test_precision<Scalar>()));
@@ -429,8 +433,7 @@ template<typename Solver> void check_sparse_square_solving(Solver& solver, int m
// check only once
if(i==0)
{
- b = DenseVector::Zero(size);
- check_sparse_solving(solver, A, b, dA, b);
+ CALL_SUBTEST(b = DenseVector::Zero(size); check_sparse_solving(solver, A, b, dA, b));
}
// regression test for Bug 792 (structurally rank deficient matrices):
if(checkDeficient && size>1) {