# HG changeset patch # User Thorsten Meyer # Date 1248337166 -7200 # Node ID cb4a4119a21a1989ab7be74e0dc3967480e20ae1 # Parent bb2ae2210e37f1cdbc48705534430c4678294f3f Fix string comparison bug in assert.m diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2009-07-23 Thorsten Meyer + + * testfun/assert.m: Fix string comparison bug. + 2009-07-20 Jaroslav Hajek * testfun/assert.m: Use less strict checking for exact matches. diff --git a/scripts/testfun/assert.m b/scripts/testfun/assert.m --- 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))