changeset 21581:6fab85c1538f

maint: Follow Octave conventions for use of semicolon in BIST tests. * testfun.txi: Document Octave conventions for use of semicolon in BIST tests. * cellfun.cc, ellipj.cc, file-io.cc, gcd.cc, hash.cc, nproc.cc, utils.cc, fftw.cc, ov-usr-fcn.cc, oct-parse.in.yy, md5sum.m, wavread.m, wavwrite.m, cplxpair.m, rat.m, im2double.m, rref.m, stem3.m, rotate.m, pchip.m, blackman.m, hamming.m, hanning.m, spectral_adf.m, spectral_xdf.m, assert.m, fail.m, etime.m, build-sparse-tests.sh, classes.tst, ctor-vs-method.tst, index.tst, io.tst, struct.tst: Follow Octave conventions for use of semicolon in BIST tests.
author Rik <rik@octave.org>
date Fri, 01 Apr 2016 18:16:01 -0700
parents ecce63c99c3f
children fa58fcb7c51d
files doc/interpreter/testfun.txi libinterp/corefcn/cellfun.cc libinterp/corefcn/ellipj.cc libinterp/corefcn/file-io.cc libinterp/corefcn/gcd.cc libinterp/corefcn/hash.cc libinterp/corefcn/nproc.cc libinterp/corefcn/utils.cc libinterp/dldfcn/fftw.cc libinterp/octave-value/ov-usr-fcn.cc libinterp/parse-tree/oct-parse.in.yy scripts/deprecated/md5sum.m scripts/deprecated/wavread.m scripts/deprecated/wavwrite.m scripts/general/cplxpair.m scripts/general/rat.m scripts/image/im2double.m scripts/linear-algebra/rref.m scripts/plot/draw/stem3.m scripts/plot/util/rotate.m scripts/polynomial/pchip.m scripts/signal/blackman.m scripts/signal/hamming.m scripts/signal/hanning.m scripts/signal/spectral_adf.m scripts/signal/spectral_xdf.m scripts/testfun/assert.m scripts/testfun/fail.m scripts/time/etime.m test/build-sparse-tests.sh test/classes/classes.tst test/ctor-vs-method/ctor-vs-method.tst test/index.tst test/io.tst test/struct.tst
diffstat 35 files changed, 142 insertions(+), 116 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/testfun.txi	Fri Apr 01 16:03:29 2016 -0700
+++ b/doc/interpreter/testfun.txi	Fri Apr 01 18:16:01 2016 -0700
@@ -50,8 +50,8 @@
 
 @example
 @group
-%!test error ("this test fails!");
-%!test "test doesn't fail. it doesn't generate an error";
+%!test error ("this test fails!")
+%!test "test doesn't fail.  it doesn't generate an error"
 @end group
 @end example
 
@@ -99,8 +99,8 @@
 
 @example
 @group
-%!test assert (1+eps, 1, 2*eps)          # absolute error
-%!test assert (100+100*eps, 100, -2*eps) # relative error
+%!test assert (1+eps, 1, 2*eps)           # absolute error
+%!test assert (100+100*eps, 100, -2*eps)  # relative error
 @end group
 @end example
 
@@ -225,13 +225,13 @@
 For example:
 
 @example
-%!error <passes!> error ("this test passes!");
+%!error <passes!> error ("this test passes!")
 @end example
 
 If the code doesn't generate an error, the test fails.  For example:
 
 @example
-%!error "this is an error because it succeeds.";
+%!error "this is an error because it succeeds."
 @end example
 
 @noindent
@@ -239,7 +239,7 @@
 
 @example
 @group
-  ***** error "this is an error because it succeeds.";
+  ***** error "this is an error because it succeeds."
 !!!!! test failed: no error
 @end group
 @end example
@@ -291,7 +291,7 @@
 
 @noindent
 The following trivial code snippet provides examples for the use of
-fail, assert, error and xtest:
+fail, assert, error, and xtest:
 
 @example
 @group
@@ -363,8 +363,35 @@
 
 @item %!assert (x, y, tol)
 shorthand for @code{%!test assert (x, y, tol)}
+
+@item %!fail (CODE, PATTERN)
+shorthand for @code{%!test fail (CODE, PATTERN)}
+
 @end table
 
+When coding tests the Octave convention is that lines that begin with a block
+type do not have a semicolon at the end.  Any code that is within a block,
+however, is normal Octave code and usually will have a trailing semicolon.
+For example,
+
+@example
+@group
+## bare block instantiation
+%!assert (sin (0), 0)
+@end group
+@end example
+
+@noindent
+but
+
+@example
+@group
+## test block with normal Octave code 
+%!test
+%! assert (sin (0), 0);
+@end group
+@end example
+
 You can also create test scripts for built-in functions and your own C++
 functions.  To do so, put a file with the bare function name (no .m
 extension) in a directory in the load path and it will be discovered by
--- a/libinterp/corefcn/cellfun.cc	Fri Apr 01 16:03:29 2016 -0700
+++ b/libinterp/corefcn/cellfun.cc	Fri Apr 01 18:16:01 2016 -0700
@@ -706,7 +706,7 @@
 %! cellfun (@__f01, {1});
 %! assert (__cellfun_test_num_outputs__, 0);
 
-%!error x = cellfun (@__f01, {1, 2});
+%!error x = cellfun (@__f01, {1, 2})
 
 %!test
 %! assert (cellfun (@__f11, {1, 2}), [1, 2]);
@@ -1405,7 +1405,7 @@
 %! arrayfun (@__f01, {1});
 %! assert (__arrayfun_test_num_outputs__, 0);
 
-%!error x = arrayfun (@__f01, [1, 2]);
+%!error x = arrayfun (@__f01, [1, 2])
 
 %!test
 %! assert (arrayfun (@__f11, [1, 2]), [1, 2]);
--- a/libinterp/corefcn/ellipj.cc	Fri Apr 01 16:03:29 2016 -0700
+++ b/libinterp/corefcn/ellipj.cc	Fri Apr 01 18:16:01 2016 -0700
@@ -831,7 +831,7 @@
 %!error ellipj (1)
 %!error ellipj (1,2,3,4)
 %!warning <required value 0 <= M <= 1> ellipj (1,2);
-## FIXME: errors commented out untill lasterr() truly returns the last error.
+## FIXME: errors commented out until lasterr() truly returns the last error.
 %!#error <M must be a scalar or matrix> ellipj (1, "1")
 %!#error <U must be a scalar or matrix> ellipj ("1", 1)
 %!#error <U must be a scalar or matrix> ellipj ({1}, 1)
--- a/libinterp/corefcn/file-io.cc	Fri Apr 01 16:03:29 2016 -0700
+++ b/libinterp/corefcn/file-io.cc	Fri Apr 01 18:16:01 2016 -0700
@@ -1718,7 +1718,7 @@
 %! assert (c, {[1;4], 2, 3});
 %! assert (u, {[1;4], 2, 3});
 
-%!error <Read error in field 2 of row 2> textscan ("1 2 3\n4 s 6", "%f %f %f", "ReturnOnError", 0);
+%!error <Read error in field 2 of row 2> textscan ("1 2 3\n4 s 6", "%f %f %f", "ReturnOnError", 0)
 
 %!test
 %! ## Check ReturnOnError
@@ -1757,8 +1757,8 @@
 %!error <must be a string> textscan ("Hello World", 2)
 #%!error <cannot provide position information> [C, pos] = textscan ("Hello World")
 %!error <at most one character or> textscan ("Hello World", '%s', 'EndOfLine', 3)
-%!error <'%z' is not a valid format specifier> textscan ("1.0", "%z");
-%!error <no valid format conversion specifiers> textscan ("1.0", "foo");
+%!error <'%z' is not a valid format specifier> textscan ("1.0", "%z")
+%!error <no valid format conversion specifiers> textscan ("1.0", "foo")
 
 ## Test incomplete first data line
 %! R = textscan (['Empty1' char(10)], 'Empty%d %f');
--- a/libinterp/corefcn/gcd.cc	Fri Apr 01 16:03:29 2016 -0700
+++ b/libinterp/corefcn/gcd.cc	Fri Apr 01 18:16:01 2016 -0700
@@ -520,8 +520,8 @@
 %! assert (abs (z), sqrt (2));
 %! assert (abs (sum (u.*w)), sqrt (2));
 
-%!error <all values must be integers> gcd (1/2, 2);
-%!error <all complex parts must be integers> gcd (e + i*pi, 1);
+%!error <all values must be integers> gcd (1/2, 2)
+%!error <all complex parts must be integers> gcd (e + i*pi, 1)
 
 %!error gcd ()
 
--- a/libinterp/corefcn/hash.cc	Fri Apr 01 16:03:29 2016 -0700
+++ b/libinterp/corefcn/hash.cc	Fri Apr 01 18:16:01 2016 -0700
@@ -287,14 +287,14 @@
 %! unlink (tfile);
 
 ## Test bad function calls
-%!error hash ();
-%!error hash ("");
-%!error hash ("", "");
-%!error hash ("", "", "");
-%!error hash (1, "");
-%!error hash ([1, 0; 0, 1], "");
-%!error hash ("unknown", "");
-%!error hash ("md5");
-%!error hash ("sha1");
-%!error hash ("sha512");
+%!error hash ()
+%!error hash ("")
+%!error hash ("", "")
+%!error hash ("", "", "")
+%!error hash (1, "")
+%!error hash ([1, 0; 0, 1], "")
+%!error hash ("unknown", "")
+%!error hash ("md5")
+%!error hash ("sha1")
+%!error hash ("sha512")
 */
--- a/libinterp/corefcn/nproc.cc	Fri Apr 01 16:03:29 2016 -0700
+++ b/libinterp/corefcn/nproc.cc	Fri Apr 01 18:16:01 2016 -0700
@@ -95,5 +95,5 @@
 %!   endif
 %! end_unwind_protect
 
-%!error nproc ("no_valid_option");
+%!error nproc ("no_valid_option")
 */
--- a/libinterp/corefcn/utils.cc	Fri Apr 01 16:03:29 2016 -0700
+++ b/libinterp/corefcn/utils.cc	Fri Apr 01 18:16:01 2016 -0700
@@ -124,7 +124,7 @@
 %!assert (isvarname ("foo+bar"), false)
 
 %!error isvarname ()
-%!error isvarname ("foo", "bar");
+%!error isvarname ("foo", "bar")
 */
 
 // Return TRUE if F and G are both names for the same file.
--- a/libinterp/dldfcn/fftw.cc	Fri Apr 01 16:03:29 2016 -0700
+++ b/libinterp/dldfcn/fftw.cc	Fri Apr 01 18:16:01 2016 -0700
@@ -368,14 +368,14 @@
 %!   fftw ("threads", n);
 %! end_unwind_protect
 
-%!error <Invalid call to fftw> fftw ();
-%!error <Invalid call to fftw> fftw ("planner", "estimate", "measure");
-%!error fftw (3);
-%!error fftw ("invalid");
-%!error fftw ("planner", "invalid");
-%!error fftw ("planner", 2);
-%!error fftw ("dwisdom", "invalid");
-%!error fftw ("swisdom", "invalid");
-%!error fftw ("threads", "invalid");
-%!error fftw ("threads", -3);
+%!error <Invalid call to fftw> fftw ()
+%!error <Invalid call to fftw> fftw ("planner", "estimate", "measure")
+%!error fftw (3)
+%!error fftw ("invalid")
+%!error fftw ("planner", "invalid")
+%!error fftw ("planner", 2)
+%!error fftw ("dwisdom", "invalid")
+%!error fftw ("swisdom", "invalid")
+%!error fftw ("threads", "invalid")
+%!error fftw ("threads", -3)
  */
--- a/libinterp/octave-value/ov-usr-fcn.cc	Fri Apr 01 16:03:29 2016 -0700
+++ b/libinterp/octave-value/ov-usr-fcn.cc	Fri Apr 01 18:16:01 2016 -0700
@@ -1107,7 +1107,7 @@
 %! [~, y] = try_isargout ();
 %! assert (y, -2);
 %!
-%!error [~, ~] = try_isargout ();
+%!error [~, ~] = try_isargout ()
 %!
 %% Check to see that isargout isn't sticky:
 %!test
--- a/libinterp/parse-tree/oct-parse.in.yy	Fri Apr 01 16:03:29 2016 -0700
+++ b/libinterp/parse-tree/oct-parse.in.yy	Fri Apr 01 18:16:01 2016 -0700
@@ -5119,7 +5119,7 @@
 %! [a,] = gcd (1,2);
 %! [a,b,] = gcd (1, 2);
 
-%!error eval ("switch = 13;");
+%!error eval ("switch = 13;")
 
 */
 
@@ -5170,7 +5170,7 @@
 
 /*
 
-%!error assignin ("base", "switch", "13");
+%!error assignin ("base", "switch", "13")
 
 */
 
@@ -5390,7 +5390,7 @@
 %! warning ("off", "quiet", "local");
 %! assert (evalc ("error ('foo')", "warning ('bar')"), "warning: bar\n");
 
-%!error evalc ("switch = 13;");
+%!error evalc ("switch = 13;")
 
 */
 
--- a/scripts/deprecated/md5sum.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/deprecated/md5sum.m	Fri Apr 01 18:16:01 2016 -0700
@@ -71,4 +71,4 @@
 %! assert (md5sum (tfile), "147a664a2ca9410911e61986d3f0d52a");
 %! unlink (tfile);
 
-%!error md5sum ();
+%!error md5sum ()
--- a/scripts/deprecated/wavread.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/deprecated/wavread.m	Fri Apr 01 18:16:01 2016 -0700
@@ -125,5 +125,5 @@
 %!error wavread ("foo.wav", 2, 3, 4)
 %!error wavread ("foo.wav", "foo")
 %!error wavread ("foo.wav", -1)
-%!error wavread ("foo.wav", [1, Inf], "foo");
+%!error wavread ("foo.wav", [1, Inf], "foo")
 
--- a/scripts/deprecated/wavwrite.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/deprecated/wavwrite.m	Fri Apr 01 18:16:01 2016 -0700
@@ -190,5 +190,5 @@
 %!error wavwrite ()
 %!error wavwrite (1)
 %!error wavwrite (1,2,3,4,5)
-%!error wavwrite ([], "foo.wav");
+%!error wavwrite ([], "foo.wav")
 
--- a/scripts/general/cplxpair.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/general/cplxpair.m	Fri Apr 01 18:16:01 2016 -0700
@@ -156,9 +156,9 @@
 ## Test tolerance
 %!assert (cplxpair ([2000 * (1+eps) + 4j; 2000 * (1-eps) - 4j]), ...
 %!        [(2000 - 4j); (2000 + 4j)], 100*eps(200))
-%!error <could not pair> cplxpair ([2000 * (1+eps) + 4j; 2000 * (1-eps) - 4j], 0);
+%!error <could not pair> cplxpair ([2000 * (1+eps) + 4j; 2000 * (1-eps) - 4j], 0)
 
-%!error <could not pair> cplxpair ([2e6 + j; 2e6 - j; 1e-9 * (1 + j); 1e-9 * (1 - 2j)]);
+%!error <could not pair> cplxpair ([2e6 + j; 2e6 - j; 1e-9 * (1 + j); 1e-9 * (1 - 2j)])
 
 ## Test input validation
 %!error cplxpair ()
--- a/scripts/general/rat.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/general/rat.m	Fri Apr 01 18:16:01 2016 -0700
@@ -162,6 +162,6 @@
 ## bug #43374
 %!assert (eval (rat (0.75)), [0.75])
 
-%!error rat ();
-%!error rat (1, 2, 3);
+%!error rat ()
+%!error rat (1, 2, 3)
 
--- a/scripts/image/im2double.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/image/im2double.m	Fri Apr 01 18:16:01 2016 -0700
@@ -126,6 +126,6 @@
 %!assert (im2double ([0 -1.5 -2i], "indexed"), [0 -1.5 -2i])
 %!assert (im2double ([false true], "indexed"), [0 1])
 
-%!error <unsigned integer class> im2double (int16 ([17 8]), "indexed");
-%!error <unsigned integer class> im2double (int16 ([-7 8]), "indexed");
-%!error <must be the string "indexed"> im2double ([1 2 3], "non-indexed");
+%!error <unsigned integer class> im2double (int16 ([17 8]), "indexed")
+%!error <unsigned integer class> im2double (int16 ([-7 8]), "indexed")
+%!error <must be the string "indexed"> im2double ([1 2 3], "non-indexed")
--- a/scripts/linear-algebra/rref.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/linear-algebra/rref.m	Fri Apr 01 18:16:01 2016 -0700
@@ -126,5 +126,5 @@
 %! [r k] = rref (a, tol);
 %! assert (rank (a, tol), rank (r, tol), 2e-8);
 
-%!error rref ();
+%!error rref ()
 
--- a/scripts/plot/draw/stem3.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/plot/draw/stem3.m	Fri Apr 01 18:16:01 2016 -0700
@@ -87,7 +87,7 @@
 %!error <X, Y, and Z must be numeric> stem3 ({1}, 1, 1)
 %!error <X, Y, and Z must be numeric> stem3 (1, {1}, 1)
 %!error <X, Y, and Z must be numeric> stem3 (1, 1, {1})
-%!error <inconsistent sizes for X, Y, and Z> stem3 (ones (2,2), 1, 1);
-%!error <inconsistent sizes for X, Y, and Z> stem3 (1, ones (2,2), 1);
-%!error <inconsistent sizes for X, Y, and Z> stem3 (1, 1, ones (2,2));
+%!error <inconsistent sizes for X, Y, and Z> stem3 (ones (2,2), 1, 1)
+%!error <inconsistent sizes for X, Y, and Z> stem3 (1, ones (2,2), 1)
+%!error <inconsistent sizes for X, Y, and Z> stem3 (1, 1, ones (2,2))
 %!error <No value specified for property "FOO"> stem3 (1, "FOO")
--- a/scripts/plot/util/rotate.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/plot/util/rotate.m	Fri Apr 01 18:16:01 2016 -0700
@@ -175,14 +175,14 @@
 %! o3 = text (0, 0, "foobar");
 %!error rotate ()
 %!error rotate (o1)
-%!error rotate (o1, [0,0,0]);
-%!error <all handles must be children of the same axes object> rotate ([o1, o2], [0,0,0], 90);
-%!error <invalid direction> rotate (o1, "foo", 90);
-%!error <invalid rotation angle> rotate (o1, [0,0,0], "foo");
-%!error <invalid origin> rotate (o1, [0,0,0], 90, "foo");
-%!error rotate (o1, [0,0,0], 90, [0,0,0], 1);
-%!error <H must be an array of one or more graphics handles> rotate (NaN, [0,0,0], 90);
-%!error <expecting image, line, patch, or surface objects> rotate (o3, [0,0,0], 90);
+%!error rotate (o1, [0,0,0])
+%!error <all handles must be children of the same axes object> rotate ([o1, o2], [0,0,0], 90)
+%!error <invalid direction> rotate (o1, "foo", 90)
+%!error <invalid rotation angle> rotate (o1, [0,0,0], "foo")
+%!error <invalid origin> rotate (o1, [0,0,0], 90, "foo")
+%!error rotate (o1, [0,0,0], 90, [0,0,0], 1)
+%!error <H must be an array of one or more graphics handles> rotate (NaN, [0,0,0], 90)
+%!error <expecting image, line, patch, or surface objects> rotate (o3, [0,0,0], 90)
 %!test
 %! close (h1);
 %! close (h2);
--- a/scripts/polynomial/pchip.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/polynomial/pchip.m	Fri Apr 01 18:16:01 2016 -0700
@@ -172,6 +172,6 @@
 %!assert (size (yi2), [3,2,5,4])
 %!assert (squeeze (yi2(1,2,3,:)), [1/sqrt(2); 0; -1/sqrt(2);-1], 1e-14)
 
-%!error (pchip (1,2));
-%!error (pchip (1,2,3));
+%!error (pchip (1,2))
+%!error (pchip (1,2,3))
 
--- a/scripts/signal/blackman.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/signal/blackman.m	Fri Apr 01 18:16:01 2016 -0700
@@ -89,5 +89,5 @@
 %!error blackman (0.5)
 %!error blackman (-1)
 %!error blackman (ones (1,4))
-%!error blackman (1, "invalid");
+%!error blackman (1, "invalid")
 
--- a/scripts/signal/hamming.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/signal/hamming.m	Fri Apr 01 18:16:01 2016 -0700
@@ -87,5 +87,5 @@
 %!error hamming (0.5)
 %!error hamming (-1)
 %!error hamming (ones (1,4))
-%!error hamming (1, "invalid");
+%!error hamming (1, "invalid")
 
--- a/scripts/signal/hanning.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/signal/hanning.m	Fri Apr 01 18:16:01 2016 -0700
@@ -87,5 +87,5 @@
 %!error hanning (0.5)
 %!error hanning (-1)
 %!error hanning (ones (1,4))
-%!error hanning (1, "invalid");
+%!error hanning (1, "invalid")
 
--- a/scripts/signal/spectral_adf.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/signal/spectral_adf.m	Fri Apr 01 18:16:01 2016 -0700
@@ -70,8 +70,8 @@
 
 
 ## Test input validation
-%!error spectral_adf ();
-%!error spectral_adf (1, 2, 3, 4);
-%!error spectral_adf (1, 2);
-%!error spectral_adf (1, "invalid");
+%!error spectral_adf ()
+%!error spectral_adf (1, 2, 3, 4)
+%!error spectral_adf (1, 2)
+%!error spectral_adf (1, "invalid")
 
--- a/scripts/signal/spectral_xdf.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/signal/spectral_xdf.m	Fri Apr 01 18:16:01 2016 -0700
@@ -72,8 +72,8 @@
 
 
 ## Test input validation
-%!error spectral_xdf ();
-%!error spectral_xdf (1, 2, 3, 4);
-%!error spectral_xdf (1, 2);
-%!error spectral_xdf (1, "invalid");
+%!error spectral_xdf ()
+%!error spectral_xdf (1, 2, 3, 4)
+%!error spectral_xdf (1, 2)
+%!error spectral_xdf (1, "invalid")
 
--- a/scripts/testfun/assert.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/testfun/assert.m	Fri Apr 01 18:16:01 2016 -0700
@@ -449,15 +449,15 @@
 ## vectors
 %!assert ([1,2,3],[1,2,3])
 %!assert ([1;2;3],[1;2;3])
-%!error <Abs err 1 exceeds tol 0> assert ([2,2,3,3],[1,2,3,4]);
-%!error <Abs err 1 exceeds tol 0.5> assert ([2,2,3,3],[1,2,3,4],0.5);
-%!error <Rel err 1 exceeds tol 0.1> assert ([2,2,3,5],[1,2,3,4],-0.1);
-%!error <Abs err 1 exceeds tol 0> assert ([6;6;7;7],[5;6;7;8]);
-%!error <Abs err 1 exceeds tol 0.5> assert ([6;6;7;7],[5;6;7;8],0.5);
-%!error <Rel err .* exceeds tol 0.1> assert ([6;6;7;7],[5;6;7;8],-0.1);
-%!error <Dimensions don't match> assert ([1,2,3],[1;2;3]);
-%!error <Dimensions don't match> assert ([1,2],[1,2,3]);
-%!error <Dimensions don't match> assert ([1;2;3],[1;2]);
+%!error <Abs err 1 exceeds tol 0> assert ([2,2,3,3],[1,2,3,4])
+%!error <Abs err 1 exceeds tol 0.5> assert ([2,2,3,3],[1,2,3,4],0.5)
+%!error <Rel err 1 exceeds tol 0.1> assert ([2,2,3,5],[1,2,3,4],-0.1)
+%!error <Abs err 1 exceeds tol 0> assert ([6;6;7;7],[5;6;7;8])
+%!error <Abs err 1 exceeds tol 0.5> assert ([6;6;7;7],[5;6;7;8],0.5)
+%!error <Rel err .* exceeds tol 0.1> assert ([6;6;7;7],[5;6;7;8],-0.1)
+%!error <Dimensions don't match> assert ([1,2,3],[1;2;3])
+%!error <Dimensions don't match> assert ([1,2],[1,2,3])
+%!error <Dimensions don't match> assert ([1;2;3],[1;2])
 
 ## matrices
 %!assert ([1,2;3,4],[1,2;3,4])
@@ -481,9 +481,9 @@
 
 ## test relative vs. absolute tolerances
 %!test  assert (0.1+eps, 0.1, 2*eps);
-%!error <Rel err 2.2204e-0?15 exceeds tol> assert (0.1+eps, 0.1, -2*eps);
+%!error <Rel err 2.2204e-0?15 exceeds tol> assert (0.1+eps, 0.1, -2*eps)
 %!test  assert (100+100*eps, 100, -2*eps);
-%!error <Abs err 2.8422e-0?14 exceeds tol> assert (100+100*eps, 100, 2*eps);
+%!error <Abs err 2.8422e-0?14 exceeds tol> assert (100+100*eps, 100, 2*eps)
 
 ## Corner case of relative tolerance with 0 divider
 %!error <Abs err 2 exceeds tol 0.1> assert (2, 0, -0.1)
--- a/scripts/testfun/fail.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/testfun/fail.m	Fri Apr 01 18:16:01 2016 -0700
@@ -142,9 +142,8 @@
 %!fail ("[1,2]*[2,3]", "nonconformant")
 %!fail ("fail ('[1,2]*[2;3]', 'nonconformant')", "expected error <nonconformant> but got none")
 %!fail ("fail ('[1,2]*[2,3]', 'usage:')", "expected error <usage:>\nbut got.*nonconformant")
-%!fail ("warning ('test warning')", "warning", "test warning");
-
-#%!fail ("warning ('next test')",'warning','next test');  # only allowed one warning test?!?
+%!fail ("warning ('test warning')", "warning", "test warning")
+%!fail ("warning ('next test')", 'warning', 'next test')
 
 ## Test that fail() itself will generate an error
 %!error <expected error> fail ("1")
--- a/scripts/time/etime.m	Fri Apr 01 16:03:29 2016 -0700
+++ b/scripts/time/etime.m	Fri Apr 01 18:16:01 2016 -0700
@@ -75,7 +75,7 @@
 %! assert (etime (t5, t1), 13);
 
 ## Test input validation
-%!error etime ();
-%!error etime (1);
-%!error etime (1, 2, 3);
+%!error etime ()
+%!error etime (1)
+%!error etime (1, 2, 3)
 
--- a/test/build-sparse-tests.sh	Fri Apr 01 16:03:29 2016 -0700
+++ b/test/build-sparse-tests.sh	Fri Apr 01 18:16:01 2016 -0700
@@ -583,8 +583,8 @@
 %! assert (Is, If);
 %! assert (Js, Jf);
 %! assert (Vs, Vf);
-%!error as(0,1);
-%!error as(1,0);
+%!error as(0,1)
+%!error as(1,0)
 %!assert (find (as), find (af))
 %!test
 %! [i,j,v] = find (as);
--- a/test/classes/classes.tst	Fri Apr 01 16:03:29 2016 -0700
+++ b/test/classes/classes.tst	Fri Apr 01 18:16:01 2016 -0700
@@ -240,13 +240,13 @@
 
 %% Test overloaded mpower (^) for the Snork class
 %!test  s = s1 ^ 3;   assert (isa (s, 'Snork') && isequal (s.gick, x1 ^ 3));
-%!error <mpower Snork!!!>  s = s1 ^ s1;
-%!error <mpower Snork!!!>  s = 20 ^ s1;
+%!error <mpower Snork!!!>  s = s1 ^ s1
+%!error <mpower Snork!!!>  s = 20 ^ s1
 
 %% Test overloaded power (.^) for the Snork class
 %!test  s = s1 .^ 2;   assert (isa (s, 'Snork') && isequal (s.gick, x1 .^ 2));
-%!error <power Snork!!!>  s = s1 .^ s1;
-%!error <power Snork!!!>  s = 20 .^ s1;
+%!error <power Snork!!!>  s = s1 .^ s1
+%!error <power Snork!!!>  s = 20 .^ s1
 
 %% Test overloaded rdivide (./) for the Snork class
 %!test  s = s1 ./ s2;  assert (isa (s, 'Snork') && isequal (s.gick, x1 ./ x2));
@@ -331,8 +331,8 @@
 %!assert (isa (x3, 'Blork') && isequal (size (x3), [2 2]))
 %!test x3 = [x2; [51 x1]];
 %!assert (isa (x3, 'Blork') && isequal (size (x3), [2 2]))
-%!error <dimension mismatch> x4 = [x1, x3];
-%!error <dimension mismatch> x4 = [x1; x3];
+%!error <dimension mismatch> x4 = [x1, x3]
+%!error <dimension mismatch> x4 = [x1; x3]
 
 %%%%%%%%%%%%%%%%%%%%%%%%
 %% Testing precedence %%
@@ -351,7 +351,7 @@
 %!assert (isequal (tattack (A, B), 'CPrecedenceTester2'))
 %!assert (isequal (tattack (B, A), 'CPrecedenceTester2'))
 %% Trying to change to CPrecendenceTester < Snork
-%!error D = CPrecedenceTester2 (2);
+%!error D = CPrecedenceTester2 (2)
 
 %!shared A, B
 %!test A = Snork (rand (2));
@@ -359,7 +359,7 @@
 %!assert (isequal (tattack (A, B), 'Snork'))
 %!assert (isequal (tattack (B, A), 'Snork'))
 %% Trying to change to CPrecendenceTester3 > Snork
-%!error D = CPrecedenceTester3 (1);
+%!error D = CPrecedenceTester3 (1)
 
 ##############################################
 ## Testing overridden size+numel method     ##
--- a/test/ctor-vs-method/ctor-vs-method.tst	Fri Apr 01 16:03:29 2016 -0700
+++ b/test/ctor-vs-method/ctor-vs-method.tst	Fri Apr 01 18:16:01 2016 -0700
@@ -26,7 +26,7 @@
 %! d = derived ();
 %! o = other ();
 %!
-%!error method (o);
+%!error method (o)
 
 %!test
 %! ctrace = {'begin parent/method';
--- a/test/index.tst	Fri Apr 01 16:03:29 2016 -0700
+++ b/test/index.tst	Fri Apr 01 18:16:01 2016 -0700
@@ -216,10 +216,10 @@
 %!assert (d(2), 0)
 %!assert (dd(2), 0)
 %!assert (dd(6,1), 0)
-%!error d(6,6);
-%!error dd(6,6);
-%!error d(3,6);
-%!error dd(3,6);
+%!error d(6,6)
+%!error dd(6,6)
+%!error d(3,6)
+%!error dd(3,6)
 
 ## bug 31287
 %!test
@@ -410,7 +410,7 @@
 %!shared x, y
 %! y = ones (2, 2);
 %! x = ones (2, 2);
-%!error x(1, 1, []) = [];
+%!error x(1, 1, []) = []
 
 %!shared x, y
 %! y = ones (2, 2);
--- a/test/io.tst	Fri Apr 01 16:03:29 2016 -0700
+++ b/test/io.tst	Fri Apr 01 18:16:01 2016 -0700
@@ -428,8 +428,8 @@
 
 %!assert (ischar (tempname ()))
 
-%!error <DIR must be a string> tempname (1);
-%!error <PREFIX must be a string> tempname ("foo", 1);
+%!error <DIR must be a string> tempname (1)
+%!error <PREFIX must be a string> tempname ("foo", 1)
 
 %!error <Invalid call to tempname> tempname (1, 2, 3)
 
--- a/test/struct.tst	Fri Apr 01 16:03:29 2016 -0700
+++ b/test/struct.tst	Fri Apr 01 18:16:01 2016 -0700
@@ -26,13 +26,13 @@
 %! c = fieldnames (s.a);
 %! assert (iscell (c) && strcmp (c{1}, "b"));
 
-%!error <Invalid call to fieldnames> fieldnames ();
+%!error <Invalid call to fieldnames> fieldnames ()
 
 %!test
 %! s.a = 1;
 %! fail ("fieldnames (s, 1)", "Invalid call to fieldnames");
 
-%!error fieldnames (1);
+%!error fieldnames (1)
 
 %!test
 %! s.aaa = 1;
@@ -44,7 +44,7 @@
 %! s.a = 2;
 %! assert (!(isfield (s, "b")));
 
-%!error <Invalid call to isfield> isfield ();
+%!error <Invalid call to isfield> isfield ()
 
 %!test
 %! s.aaa = 1;
@@ -74,7 +74,7 @@
 %! s.a.b = 1;
 %! assert (isstruct (s.a));
 
-%!error <Invalid call to isstruct> isstruct ();
+%!error <Invalid call to isstruct> isstruct ()
 
 %!test
 %! s.a = 1;