Mercurial > hg > octave-lyh
changeset 8871:fb1c929dbbb7
tests vs. 64-bit indexing
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 25 Feb 2009 12:56:36 -0500 |
parents | eea0e1b45ec0 |
children | 0d7ebf353400 |
files | scripts/sparse/spaugment.m src/ChangeLog src/DLD-FUNCTIONS/chol.cc src/DLD-FUNCTIONS/rand.cc test/ChangeLog test/build_sparse_tests.sh test/test_io.m |
diffstat | 7 files changed, 32 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/sparse/spaugment.m +++ b/scripts/sparse/spaugment.m @@ -87,7 +87,7 @@ s = [ c * speye(m, m), a; a', sparse(n, n)]; endfunction -%!test +%!testif HAVE_UMFPACK %! m = 11; n = 10; mn = max(m ,n); %! a = spdiags ([ones(mn,1), 10*ones(mn,1), -ones(mn,1)],[-1,0,1], m, n); %! x0 = a \ ones (m,1);
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-02-25 John W. Eaton <jwe@octave.org> + + * DLD-FUNCTIONS/rand.cc: Note that the tests for the old random + number generator will fail if using 64-bit indexing. + 2009-02-25 Jaroslav Hajek <highegg@gmail.com> * DLD-FUNCTIONS/lu.cc (maybe_set_triangular): New function. @@ -7,6 +12,8 @@ 2009-02-25 John W. Eaton <jwe@octave.org> + * DLD-FUNCTIONS/chol.cc: Fix tests for missing cholmod. + * input.cc (get_debug_input): Write debugging location info directly to std::cerr instead of calling message. * pt-eval.cc (tree_evaluator::do_breakpoint): Write debugging
--- a/src/DLD-FUNCTIONS/chol.cc +++ b/src/DLD-FUNCTIONS/chol.cc @@ -195,7 +195,7 @@ else retval(0) = fact.R(); } - else +p else error ("chol: matrix not positive definite"); } } @@ -470,16 +470,20 @@ /* -%!test +%!shared A, Ainv %! A = [2,0.2;0.2,1]; %! Ainv = inv(A); +%!test %! Ainv1 = cholinv(A); +%! assert (norm(Ainv-Ainv1),0,1e-10) +%!testif HAVE_CHOLMOD %! Ainv2 = inv(sparse(A)); +%! assert (norm(Ainv-Ainv2),0,1e-10) +%!testif HAVE_CHOLDMOD %! Ainv3 = cholinv(sparse(A)); +%! assert (norm(Ainv-Ainv3),0,1e-10) +%!testif HAVE_CHOLDMOD %! Ainv4 = spcholinv(sparse(A)); -%! assert (norm(Ainv-Ainv1),0,1e-10) -%! assert (norm(Ainv-Ainv2),0,1e-10) -%! assert (norm(Ainv-Ainv3),0,1e-10) %! assert (norm(Ainv-Ainv4),0,1e-10) */
--- a/src/DLD-FUNCTIONS/rand.cc +++ b/src/DLD-FUNCTIONS/rand.cc @@ -386,6 +386,9 @@ return retval; } +// FIXME -- The old generator (selected when "seed" is set) will not +// work properly if compiled to use 64-bit integers. + /* %!test # 'state' can be a scalar %! rand('state',12); x = rand(1,4);
--- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2009-02-25 John W. Eaton <jwe@octave.org> + + * build_sparse_tests.sh: Note that saving sparse matrices to MAT + files fails when using 64-bit indexing. + 2009-02-22 John W. Eaton <jwe@octave.org> * build_sparse_tests.sh: Fix diag matrix divide by zero test.
--- a/test/build_sparse_tests.sh +++ b/test/build_sparse_tests.sh @@ -886,6 +886,9 @@ %! load(savefile,"as_save"); %! unlink(savefile); %! assert(as_save,sparse(af)); +## FIXME -- we should skip (or mark as an expected failure) the test for +## saving sparse matrices to MAT files when using 64-bit indexing since +## that is not implemented yet. %!test # save matlab %! savefile= tmpnam(); %! as_save=as; save("-mat",savefile,"bf","as_save","af");
--- a/test/test_io.m +++ b/test/test_io.m @@ -18,6 +18,10 @@ %% Automatically generated from DejaGNU files +## FIXME -- we should skip (or mark as an expected failure) the test for +## saving sparse matrices to MAT files when using 64-bit indexing since +## that is not implemented yet. + %% test/octave.test/io/load-save.m %!function [ret, files] = testls (input) %! ## flag a1 global so as to test the storage of global flags