Mercurial > hg > octave-terminal
changeset 12814:ce1fb93d884d
codesprint: Add tests for isnull()
* ov-null-mat.cc: Add tests for isnull()
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sat, 16 Jul 2011 12:06:07 -0700 |
parents | 8c4605b4d0c8 |
children | 918610ea2f34 |
files | src/ov-null-mat.cc |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ov-null-mat.cc +++ b/src/ov-null-mat.cc @@ -118,3 +118,17 @@ return retval; } +/* + +%!assert (isnull ([]), true) +%!assert (isnull ([1]), false) +%!assert (isnull (zeros (0,3)), false) +%!assert (isnull (""), true) +%!assert (isnull ("A"), false) +%!assert (isnull (''), true) +%!assert (isnull ('A'), false) +%!test +%! x = []; +%! assert (isnull (x), false); + +*/