Mercurial > octave-antonio
changeset 19140: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 | afd6179d2616 |
children | 25ab600d16fd |
files | libinterp/corefcn/Cell.cc |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
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 {