# HG changeset patch # User David Bateman # Date 1207759206 14400 # Node ID e44e4cd2129d83e4dfff2072679c7687a5a65648 # Parent 80b78635eefe98666f52976c695b98b450a7541e Don't allow the use of lists in assert.m diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2008-04-09 David Bateman + + * testfun/assert.m: Don't allow cond and expected to be lists. + 2008-04-04 John W. Eaton * strings/Makefile.in (SOURCES): Add isstrprop.m to the list. diff --git a/scripts/testfun/assert.m b/scripts/testfun/assert.m --- 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));