Skip to content

Commit

Permalink
Run BIST tests for qr sparse matrices only when correct libraries pre…
Browse files Browse the repository at this point in the history
…sent.

Update BIST tests from changeset 5cf01b10fe10.

* qr.cc: Change %!test to %!testif to check for SPQR and CHOLMOD libraries or
CXSPARSE.
  • Loading branch information
Rik committed Dec 2, 2024
1 parent 3cd19cf commit 7fdb568
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions libinterp/corefcn/qr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -801,21 +801,24 @@ orthogonal basis of @code{span (A)}.
%! assert (qr (sparse (0, 1)), sparse (0, 1))
%!test <*66488>
%! ## Orientation of 'p' output
%! ## Orientation of 'p' output for dense matrices
%! [q, r, p] = qr (eye (3));
%! assert (size (p), [3, 3]);
%! [q, r, p] = qr (speye (3));
%! assert (size (p), [3, 3]);
%! [q, r, p] = qr (eye (3), 'vector');
%! assert (size (p), [1, 3]);
%! [q, r, p] = qr (speye (3), 'vector');
%! assert (size (p), [1, 3]);
%! [q, r, p] = qr (eye (3), 'econ');
%! assert (size (p), [3, 3]);
%! [q, r, p] = qr (speye (3), 'econ');
%! assert (size (p), [3, 3]);
%! [q, r, p] = qr (eye (3), 0);
%! assert (size (p), [1, 3]);
%!testif ; (__have_feature__ ("SPQR") && __have_feature__ ("CHOLMOD")) || __have_feature__ ("CXSPARSE") <*66488>
%! ## Orientation of 'p' output for sparse matrices
%! [q, r, p] = qr (speye (3));
%! assert (size (p), [3, 3]);
%! [q, r, p] = qr (speye (3), 'vector');
%! assert (size (p), [1, 3]);
%! [q, r, p] = qr (speye (3), 'econ');
%! assert (size (p), [3, 3]);
%! [q, r, p] = qr (speye (3), 0);
%! assert (size (p), [1, 3]);
Expand Down

0 comments on commit 7fdb568

Please sign in to comment.