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	Wed Jul 22 15:04:22 2009 +0200
+++ b/scripts/ChangeLog	Thu Jul 23 10:19:26 2009 +0200
@@ -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	Wed Jul 22 15:04:22 2009 +0200
+++ b/scripts/testfun/assert.m	Thu Jul 23 10:19:26 2009 +0200
@@ -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))