Mercurial > hg > octave-terminal
changeset 10520:72c90e7132a9
fix failing sparse assignment tests
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 14 Apr 2010 08:27:37 +0200 |
parents | f6959aff84ca |
children | 4d1fc073fbb7 |
files | liboctave/ChangeLog liboctave/Sparse.cc |
diffstat | 2 files changed, 7 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,7 @@ +2010-04-14 Jaroslav Hajek <highegg@gmail.com> + + * Sparse.cc: Update failing tests. + 2010-04-13 Jaroslav Hajek <highegg@gmail.com> * Sparse.cc (Sparse<T>::index): If S is a sparse column vector,
--- a/liboctave/Sparse.cc +++ b/liboctave/Sparse.cc @@ -866,8 +866,7 @@ if (nr == 0) resize (1, std::max (nc, n)); else if (nc == 0) - // FIXME: Due to Matlab 2007a, but some existing tests fail on this. - resize (nr, (n + nr - 1) / nr); + resize (nr, (n + nr - 1) / nr); // Ain't it wicked? else if (nr == 1) resize (1, n); else if (nc == 1) @@ -1105,9 +1104,6 @@ assert (ndims () == 2); - // FIXME: please don't fix the shadowed member warning yet because - // Sparse<T>::idx will eventually go away. - octave_idx_type nr = dim1 (); octave_idx_type nc = dim2 (); octave_idx_type nz = nnz (); @@ -1287,9 +1283,6 @@ assert (ndims () == 2); - // FIXME: please don't fix the shadowed member warning yet because - // Sparse<T>::idx will eventually go away. - octave_idx_type nr = dim1 (); octave_idx_type nc = dim2 (); octave_idx_type nz = nnz (); @@ -1704,9 +1697,6 @@ assert (ndims () == 2); - // FIXME: please don't fix the shadowed member warning yet because - // Sparse<T>::idx will eventually go away. - octave_idx_type nr = dim1 (); octave_idx_type nc = dim2 (); octave_idx_type nz = nnz (); @@ -1853,9 +1843,6 @@ assert (ndims () == 2); - // FIXME: please don't fix the shadowed member warning yet because - // Sparse<T>::idx will eventually go away. - octave_idx_type nr = dim1 (); octave_idx_type nc = dim2 (); octave_idx_type nz = nnz (); @@ -2459,8 +2446,8 @@ %!test test_sparse_slice([2 0], 11, []); %!assert(set_slice(sparse(ones([2 0])), 11, 1), sparse([2 0]')); # sparse different from full %!assert(set_slice(sparse(ones([2 0])), 11, 2), sparse([0 2]')); # sparse different from full -%!assert(set_slice(sparse(ones([2 0])), 11, 3), sparse([0 0 2]')); # sparse different from full -%!assert(set_slice(sparse(ones([2 0])), 11, 4), sparse([0 0 0 2]')); # sparse different from full +%!assert(set_slice(sparse(ones([2 0])), 11, 3), sparse([0 0; 2 0]')); # sparse different from full +%!assert(set_slice(sparse(ones([2 0])), 11, 4), sparse([0 0; 0 2]')); # sparse different from full ## size = [0 2] %!test test_sparse_slice([0 2], 11, []);