Mercurial > hg > octave-terminal
changeset 9448:cb4a4119a21a
Fix string comparison bug in assert.m
author | Thorsten Meyer <thorsten.meyier@gmx.de> |
---|---|
date | Thu, 23 Jul 2009 10:19:26 +0200 |
parents | bb2ae2210e37 |
children | a35d8ec8a0c4 |
files | scripts/ChangeLog scripts/testfun/assert.m |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2009-07-23 Thorsten Meyer <thorsten.meyier@gmx.de> + + * testfun/assert.m: Fix string comparison bug. + 2009-07-20 Jaroslav Hajek <highegg@gmail.com> * testfun/assert.m: Use less strict checking for exact matches.
--- a/scripts/testfun/assert.m +++ b/scripts/testfun/assert.m @@ -144,7 +144,7 @@ else if (nargin < 3) ## Without explicit tolerance, be more strict. - if (class (cond) != class (expected)) + if (! strcmp(class (cond), class (expected))) iserror = 1; coda = cstrcat ("Class ", class (cond), " != ", class (expected)); elseif (isnumeric (cond))