# HG changeset patch # User Carnë Draug # Date 1411328783 -3600 # Node ID b5a0f11db15820b3e010c5188e31c6400829ba83 # Parent afd6179d2616bfc429a5d24f14d50f01c5e56546 Cell.cc: add tests for Cell::nnz diff -r afd6179d2616 -r b5a0f11db158 libinterp/corefcn/Cell.cc --- 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 nnz ({0, 1, 2}) +%!error nnz (cell ()) +%!error nnz ({"foo", "bar"}) +*/ + Cell Cell::column (octave_idx_type i) const {