Mercurial > octave-nkf
diff libinterp/corefcn/Cell.cc @ 19174:b5a0f11db158
Cell.cc: add tests for Cell::nnz
author | Carnë Draug <carandraug+dev@gmail.com> |
---|---|
date | Sun, 21 Sep 2014 20:46:23 +0100 |
parents | d63878346099 |
children | 4197fc428c7d |
line wrap: on
line diff
--- a/libinterp/corefcn/Cell.cc Sun Sep 21 15:45:08 2014 -0400 +++ b/libinterp/corefcn/Cell.cc Sun Sep 21 20:46:23 2014 +0100 @@ -212,6 +212,12 @@ return retval; } +/* +%!test +%! a = {"foo", "bar"}; +%! assert (a(), a) +*/ + void Cell::assign (const octave_value_list& idx_arg, const Cell& rhs, const octave_value& fill_val) @@ -248,6 +254,12 @@ return -1; } +/* +%!error <wrong type argument 'cell array'> nnz ({0, 1, 2}) +%!error <wrong type argument 'cell array'> nnz (cell ()) +%!error <wrong type argument 'cell array'> nnz ({"foo", "bar"}) +*/ + Cell Cell::column (octave_idx_type i) const {