From 0f464d9d876d9bf6bdfe64d7fe47cd8e35ad3c2c Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 16 Feb 2015 17:05:10 +0100 Subject: bug #897: fix regression in BiCGSTAB(mat) ctor (an all other iterative solvers). Add respective regression unit test. --- test/sparse_solver.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/sparse_solver.h') diff --git a/test/sparse_solver.h b/test/sparse_solver.h index 42b365eaa..45cfdad25 100644 --- a/test/sparse_solver.h +++ b/test/sparse_solver.h @@ -83,6 +83,15 @@ void check_sparse_solving(Solver& solver, const typename Solver::MatrixType& A, VERIFY(xm.isApprox(refX,test_precision())); } + // test initialization ctor + { + Rhs x(b.rows(), b.cols()); + Solver solver2(A); + VERIFY(solver2.info() == Success); + x = solver2.solve(b); + VERIFY(x.isApprox(refX,test_precision())); + } + // test dense Block as the result and rhs: { DenseRhs x(db.rows(), db.cols()); -- cgit v1.2.3