diff doc/interpreter/testfun.txi @ 21317:a4faec57f4c8

maint: remove semicolon after %!assert tests to follow Octave conventions. * testfun.txi: Remove semicolons from examples in manual and update remaider of text to reflect changes. * bsxfun.cc, cellfun.cc, data.cc, hash.cc, lu.cc, nproc.cc, rcond.cc, regexp.cc, sparse-xpow.cc, strfns.cc, symtab.cc, time.cc, variables.cc, ov-class.cc, ov-cx-diag.cc, ov-struct.cc, ov.cc, oct-parse.in.yy, pt-mat.cc, CMatrix.cc, oct-inttypes.cc, md5sum.m, blkdiag.m, cell2mat.m, interp1.m, interp2.m, interpft.m, num2str.m, repmat.m, ntsc2rgb.m, expm.m, inputname.m, polyvalm.m, blackman.m, hamming.m, hanning.m, eigs.m, median.m, binopdf.m, strsplit.m, strtok.m, assert.m, example.m, datevec.m, bug-38565.tst, build-sparse-tests.sh, classdef.tst, classes.tst, diag-perm.tst, index.tst, io.tst, logical-index.tst, nest.tst, parser.tst, prefer.tst, struct.tst: maint: remove semicolon after %!assert tests to follow Octave conventions.
author Rik <rik@octave.org>
date Sun, 21 Feb 2016 08:10:36 -0800
parents a55b8ece1ecd
children 1da428cbf401
line wrap: on
line diff
--- a/doc/interpreter/testfun.txi	Sun Feb 21 07:43:16 2016 -0800
+++ b/doc/interpreter/testfun.txi	Sun Feb 21 08:10:36 2016 -0800
@@ -175,9 +175,9 @@
 @group
 %!shared @var{a}
 %! @var{a} = [1, 2, 3; 4, 5, 6];
-%!assert (kron ([1; 2], @var{a}), [ @var{a}; 2*@var{a} ]);
-%!assert (kron ([1, 2], @var{a}), [ @var{a}, 2*@var{a} ]);
-%!assert (kron ([1,2; 3,4], @var{a}), [ @var{a},2*@var{a}; 3*@var{a},4*@var{a} ]);
+%!assert (kron ([1; 2], @var{a}), [ @var{a}; 2*@var{a} ])
+%!assert (kron ([1, 2], @var{a}), [ @var{a}, 2*@var{a} ])
+%!assert (kron ([1,2; 3,4], @var{a}), [ @var{a},2*@var{a}; 3*@var{a},4*@var{a} ])
 @end group
 @end example
 
@@ -194,7 +194,7 @@
 %!function @var{a} = fn (@var{b})
 %!  @var{a} = 2*@var{b};
 %!endfunction
-%!assert (fn(2), 4);
+%!assert (fn(2), 4)
 @end group
 @end example
 
@@ -211,7 +211,7 @@
 %!function @var{a} = fn (@var{b})
 %!  @var{a} = 2*@var{b};
 %!endfunction
-%! assert (fn(2), 4);
+%!assert (fn(2), 4)
 @end group
 @end example
 
@@ -302,15 +302,15 @@
   output = input;
 endfunction
 
-%!fail ("must_be_zero (1)");
-%!assert (must_be_zero (0), 0);
-%!error <Nonzero> must_be_zero (1);
-%!xtest error ("This code generates an error");
+%!fail ("must_be_zero (1)")
+%!assert (must_be_zero (0), 0)
+%!error <Nonzero> must_be_zero (1)
+%!xtest error ("This code generates an error")
 @end group
 @end example
 
 @noindent
-When putting this a file @file{must_be_zero.m}, and running the test, we see
+When putting this in a file @file{must_be_zero.m}, and running the test, we see
 
 @example
 @group
@@ -318,13 +318,13 @@
 
 @result{}
 >>>>> /path/to/must_be_zero.m
-  ***** fail ("must_be_zero (1)");
-  ***** assert (must_be_zero (0), 0);
-  ***** error <Nonzero> must_be_zero (1);
-  ***** xtest error ("This code generates an error");
+***** fail ("must_be_zero (1)")
+***** assert (must_be_zero (0), 0)
+***** error <Nonzero> must_be_zero (1)
+***** xtest error ("This code generates an error")
 !!!!! known failure
 This code generates an error
-PASSES 4 out of 4 tests (1 expected failures)
+PASSES 3 out of 4 tests (1 expected failure)
 @end group
 @end example