Mercurial > hg > octave-avbm
changeset 7703:e44e4cd2129d
Don't allow the use of lists in assert.m
author | David Bateman <dbateman@free.fr> |
---|---|
date | Wed, 09 Apr 2008 12:40:06 -0400 |
parents | 80b78635eefe |
children | 1cdb42b372e8 |
files | scripts/ChangeLog scripts/testfun/assert.m |
diffstat | 2 files changed, 4 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2008-04-09 David Bateman <dbateman@free.fr> + + * testfun/assert.m: Don't allow cond and expected to be lists. + 2008-04-04 John W. Eaton <jwe@octave.org> * strings/Makefile.in (SOURCES): Add isstrprop.m to the list.
--- a/scripts/testfun/assert.m +++ b/scripts/testfun/assert.m @@ -77,19 +77,6 @@ error ("assert %s failed", in); # say which elements failed? endif - elseif (is_list (cond)) - if (! is_list (expected) || length (cond) != length (expected)) - iserror = 1; - else - try - for i = 1:length (cond) - assert (nth (cond, i), nth (expected, i)); - endfor - catch - iserror = 1; - end_try_catch - endif - elseif (ischar (expected)) iserror = (! ischar (cond) || ! strcmp (cond, expected));