diff scripts/testfun/assert.m @ 7540:3422f39573b1

strcat.m: Matlab compatibility, with cstrcat.m replacing conventional strcat.m.
author Ben Abbott <bpabbott@mac.com>
date Thu, 28 Feb 2008 02:41:19 -0500
parents aeeb646f6538
children e44e4cd2129d
line wrap: on
line diff
--- a/scripts/testfun/assert.m
+++ b/scripts/testfun/assert.m
@@ -66,9 +66,9 @@
 
   in = deblank (argn(1,:));
   for i = 2:rows (argn)
-    in = strcat (in, ",", deblank (argn(i,:)));
+    in = cstrcat (in, ",", deblank (argn(i,:)));
   endfor
-  in = strcat ("(", in, ")");
+  in = cstrcat ("(", in, ")");
 
   coda = "";
   iserror = 0;
@@ -140,7 +140,7 @@
 
   elseif (tol == 0 && ! strcmp (typeinfo (cond), typeinfo (expected)))
     iserror = 1;
-    coda = strcat ("Type ", typeinfo (cond), " != ", typeinfo (expected));
+    coda = cstrcat ("Type ", typeinfo (cond), " != ", typeinfo (expected));
 
   else # numeric
     A = cond(:);
@@ -198,9 +198,9 @@
   if (! isempty (idx))
     str2 = str2 (idx(1):idx(end));
   endif
-  msg = strcat ("assert ", in, " expected\n", str, "\nbut got\n", str2);
+  msg = cstrcat ("assert ", in, " expected\n", str, "\nbut got\n", str2);
   if (! isempty (coda))
-    msg = strcat (msg, "\n", coda);
+    msg = cstrcat (msg, "\n", coda);
   endif
   error ("%s", msg);
   ## disp (msg);