Mercurial > octave
changeset 21580:ecce63c99c3f
maint: Add semicolons to terminate code in %! blocks.
* splineimages.m, Cell.cc, bsxfun.cc, cellfun.cc, conv2.cc, data.cc,
debug.cc, file-io.cc, gcd.cc, getrusage.cc, graphics.cc, kron.cc, mappers.cc,
oct-map.cc, ordschur.cc, psi.cc, rand.cc, variables.cc, __osmesa_print__.cc,
amd.cc, audiodevinfo.cc, dmperm.cc, qr.cc, ov-bool-mat.cc, ov-class.cc,
ov-fcn-handle.cc, ov-java.cc, oct-parse.in.yy, bicubic.m, delaunay3.m,
accumarray.m, flip.m, fliplr.m, flipud.m, gradient.m, inputParser.m, interp1.m,
narginchk.m, rot90.m, validateattributes.m, delaunay.m, delaunayn.m,
griddata3.m, inpolygon.m, waitbar.m, gray2ind.m, hsv2rgb.m, im2double.m,
image.m, imformats.m, imread.m, imshow.m, imwrite.m, ntsc2rgb.m, rgb2hsv.m,
rgb2ntsc.m, isbanded.m, onenormest.m, edit.m, fullfile.m, license.m, ode23.m,
ode45.m, glpk.m, annotation.m, legend.m, orient.m, text.m, area.m, barh.m,
contour.m, line.m, plot.m, plot3.m, plotyy.m, quiver.m, stem.m, clf.m,
copyobj.m, findobj.m, subplot.m, ppval.m, splinefit.m, ismember.m, freqz.m,
unwrap.m, eigs.m, ichol.m, pcg.m, spdiags.m, svds.m, magic.m, lscov.m,
median.m, ols.m, dec2base.m, strsplit.m, strtok.m, test.m, bug-31371.tst,
bug-36025.tst, bug-44940.tst, build-sparse-tests.sh, class-concat.tst,
classdef.tst, classes.tst, colormaps.tst, command.tst, ctor-vs-method.tst,
error.tst, fcn-handle-derived-resolution.tst, for.tst, index.tst, io.tst,
jit.tst, null-assign.tst, parser.tst, struct.tst, system.tst:
Add semicolons to terminate code in %! blocks.
line wrap: on
line diff
--- a/doc/interpreter/splineimages.m Fri Apr 01 14:56:52 2016 -0700 +++ b/doc/interpreter/splineimages.m Fri Apr 01 16:03:29 2016 -0700 @@ -205,6 +205,6 @@ %!demo %! for s = 1:6 -%! splineimages (sprintf ("splinefit##d", s), "pdf") +%! splineimages (sprintf ("splinefit##d", s), "pdf"); %! endfor
--- a/libinterp/corefcn/Cell.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/Cell.cc Fri Apr 01 16:03:29 2016 -0700 @@ -220,7 +220,7 @@ /* %!test %! a = {"foo", "bar"}; -%! assert (a(), a) +%! assert (a(), a); */ void
--- a/libinterp/corefcn/bsxfun.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/bsxfun.cc Fri Apr 01 16:03:29 2016 -0700 @@ -819,6 +819,6 @@ %!test %! a = zeros (0, 3); %! a .+= [1 2 3]; -%! assert (a, zeros (0, 3)) +%! assert (a, zeros (0, 3)); */
--- a/libinterp/corefcn/cellfun.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/cellfun.cc Fri Apr 01 16:03:29 2016 -0700 @@ -1422,9 +1422,9 @@ %% First input argument can be a string, an inline function, a %% function_handle or an anonymous function %!test -%! arrayfun (@isequal, [false, true], [true, true]); %% No output argument +%! arrayfun (@isequal, [false, true], [true, true]); # No output argument %!error -%! arrayfun (@isequal); %% One or less input arguments +%! arrayfun (@isequal); # One or less input arguments %!test %! A = arrayfun ("isequal", [false, true], [true, true]); %! assert (A, [false, true]);
--- a/libinterp/corefcn/conv2.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/conv2.cc Fri Apr 01 16:03:29 2016 -0700 @@ -411,7 +411,7 @@ %! c = convn (a, b, "full"); %!assert (convn (a, b, "same"), c(2:11,2:11,:)) %!xtest -%! assert (convn (a, b, "valid"), c(3:10,3:10,:)) +%! assert (convn (a, b, "valid"), c(3:10,3:10,:)); %! %!test %! ## test 2D by 3D @@ -428,7 +428,7 @@ %! c = convn (a, b, "full"); %!assert (convn (a, b, "same"), c(3:12,2:16,2:8,2:9,:)) %!xtest -%! assert (convn (a, b, "valid"), c(4:10,3:15,2:7,3:8,:)) +%! assert (convn (a, b, "valid"), c(4:10,3:15,2:7,3:8,:)); %!test %! a = reshape (floor (magic (16) /10), [4 8 4 2]);
--- a/libinterp/corefcn/data.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/data.cc Fri Apr 01 16:03:29 2016 -0700 @@ -4272,11 +4272,11 @@ %! funcs = {@zeros, @ones, @inf, @nan, @NA, @i, @pi, @e}; %! for idx = 1:numel (funcs) %! func = funcs{idx}; -%! assert (func (zeros (1, 0)), zeros (0, 0)) -%! assert (func (zeros (0, 1)), zeros (0, 0)) -%! assert (func (zeros (0, 1, 1)), zeros (0, 0)) -%! fail ([func2str(func) " ([])"]) -%! fail ([func2str(func) " (zeros (0, 0, 1))"]) +%! assert (func (zeros (1, 0)), zeros (0, 0)); +%! assert (func (zeros (0, 1)), zeros (0, 0)); +%! assert (func (zeros (0, 1, 1)), zeros (0, 0)); +%! fail ([func2str(func) " ([])"]); +%! fail ([func2str(func) " (zeros (0, 0, 1))"]); %! endfor */
--- a/libinterp/corefcn/debug.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/debug.cc Fri Apr 01 16:03:29 2016 -0700 @@ -1488,10 +1488,10 @@ %! dbstop ls; %! s = dbstatus; %! dbclear all -%! assert (s(1).name, "@audioplayer/set>setproperty") -%! assert (s(2).name, "@ftp/dir") -%! assert (s(3).name, "ls") -%! assert (s(4).name, "quantile>__quantile__") +%! assert (s(1).name, "@audioplayer/set>setproperty"); +%! assert (s(2).name, "@ftp/dir"); +%! assert (s(3).name, "ls"); +%! assert (s(4).name, "quantile>__quantile__"); %! assert (s(2).file(end-10:end), "/@ftp/dir.m"); */
--- a/libinterp/corefcn/file-io.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/file-io.cc Fri Apr 01 16:03:29 2016 -0700 @@ -1670,7 +1670,7 @@ %! c = textscan (fid, "%f %f", 4); %! fclose (fid); %! unlink (f); -%! assert (c, {[1;3], [2;4]}) +%! assert (c, {[1;3], [2;4]}); %!test %! ## Check number of lines read, with multiple delimiters @@ -1681,7 +1681,7 @@ %! c = textscan (fid, "%f %f", 4, "delimiter", "-", "multipleDelimsAsOne", 1); %! fclose (fid); %! unlink (f); -%! assert (c, {[1;3], [2;4]}) +%! assert (c, {[1;3], [2;4]}); %!test %! ## Check ReturnOnError @@ -1698,10 +1698,10 @@ %! unlink (f); %! u = textscan (str, "%f %f %f"); %! v = textscan (str, "%f %f %f", "ReturnOnError", 1); -%! assert (c, {[1;4], [2;NaN], [3;6]}) -%! assert (d, {[1;4], [2], [3]}) -%! assert (u, {[1;4], [2;NaN], [3;6]}) -%! assert (v, {[1;4], [2], [3]}) +%! assert (c, {[1;4], [2;NaN], [3;6]}); +%! assert (d, {[1;4], [2], [3]}); +%! assert (u, {[1;4], [2;NaN], [3;6]}); +%! assert (v, {[1;4], [2], [3]}); %!test %! ## Check ReturnOnError @@ -1715,8 +1715,8 @@ %! fclose (fid); %! unlink (f); %! u = textscan (str, "%f %f %f", "ReturnOnError", 1); -%! assert (c, {[1;4], 2, 3}) -%! assert (u, {[1;4], 2, 3}) +%! 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); @@ -1732,23 +1732,23 @@ %! fseek (fid, 0, "bof"); %! fclose (fid); %! unlink (f); -%! assert (c, {[1;4], [NaN;5], [3;6]}) -%! assert (d, {1}) +%! assert (c, {[1;4], [NaN;5], [3;6]}); +%! assert (d, {1}); %!test %! ## Check ReturnOnError with empty fields %! c = textscan ("1,,3\n4,5,6", "", "Delimiter", ",", "ReturnOnError", 1); -%! assert (c, {[1;4], [NaN;5], [3;6]}) +%! assert (c, {[1;4], [NaN;5], [3;6]}); %!test %! ## Check ReturnOnError with empty fields %! c = textscan ("1,,3\n4,5,6", "%f %f %f", "Delimiter", ",", "ReturnOnError", 1); -%! assert (c, {[1;4], [NaN;5], [3;6]}) +%! assert (c, {[1;4], [NaN;5], [3;6]}); %!test %! ## Check ReturnOnError in first column %! c = textscan ("1 2 3\ns 5 6", "", "ReturnOnError", 1); -%! assert (c, {1, 2, 3}) +%! assert (c, {1, 2, 3}); ## Test input validation %!error textscan () @@ -2118,7 +2118,7 @@ %% Check a non-empty line with no valid conversion registers empytValue %!test %! C = textscan ("Empty\n", "Empty%f %f"); -%! assert (C, { NaN, NaN }) +%! assert (C, { NaN, NaN }); %% Check overflow and underflow of integer types %!test
--- a/libinterp/corefcn/gcd.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/gcd.cc Fri Apr 01 16:03:29 2016 -0700 @@ -515,10 +515,10 @@ %! u = [953 + i*971, 967 + i*977]; %! [d, k(1), k(2)] = gcd (p(1), p(2)); %! [z, w(1), w(2)] = gcd (u(1), u(2)); -%! assert (d, 1) -%! assert (sum (p.*k), d) -%! assert (abs (z), sqrt (2)) -%! assert (abs (sum (u.*w)), sqrt (2)) +%! assert (d, 1); +%! assert (sum (p.*k), d); +%! 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);
--- a/libinterp/corefcn/getrusage.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/getrusage.cc Fri Apr 01 16:03:29 2016 -0700 @@ -209,25 +209,25 @@ %!test %! r = getrusage (); %! assert (isstruct (r)); -%! assert (isfield (r, "idrss")) -%! assert (isfield (r, "inblock")) -%! assert (isfield (r, "isrss")) -%! assert (isfield (r, "ixrss")) -%! assert (isfield (r, "majflt")) -%! assert (isfield (r, "maxrss")) -%! assert (isfield (r, "minflt")) -%! assert (isfield (r, "msgrcv")) -%! assert (isfield (r, "msgsnd")) -%! assert (isfield (r, "nivcsw")) -%! assert (isfield (r, "nsignals")) -%! assert (isfield (r, "nswap")) -%! assert (isfield (r, "nvcsw")) -%! assert (isfield (r, "oublock")) -%! assert (isfield (r, "stime")) -%! assert (isfield (r, "utime")) -%! assert (isfield (r.stime, "sec")) -%! assert (isfield (r.stime, "usec")) -%! assert (isfield (r.utime, "sec")) -%! assert (isfield (r.utime, "usec")) +%! assert (isfield (r, "idrss")); +%! assert (isfield (r, "inblock")); +%! assert (isfield (r, "isrss")); +%! assert (isfield (r, "ixrss")); +%! assert (isfield (r, "majflt")); +%! assert (isfield (r, "maxrss")); +%! assert (isfield (r, "minflt")); +%! assert (isfield (r, "msgrcv")); +%! assert (isfield (r, "msgsnd")); +%! assert (isfield (r, "nivcsw")); +%! assert (isfield (r, "nsignals")); +%! assert (isfield (r, "nswap")); +%! assert (isfield (r, "nvcsw")); +%! assert (isfield (r, "oublock")); +%! assert (isfield (r, "stime")); +%! assert (isfield (r, "utime")); +%! assert (isfield (r.stime, "sec")); +%! assert (isfield (r.stime, "usec")); +%! assert (isfield (r.utime, "sec")); +%! assert (isfield (r.utime, "usec")); */
--- a/libinterp/corefcn/graphics.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/graphics.cc Fri Apr 01 16:03:29 2016 -0700 @@ -3026,8 +3026,8 @@ %! hf = figure ("visible", "off"); %! unwind_protect %! hax = gca (); -%! set (hax, "parent", gcf ()) -%! assert (gca (), hax) +%! set (hax, "parent", gcf ()); +%! assert (gca (), hax); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect @@ -3993,7 +3993,7 @@ %! fsz = in_pos(3:4) * 2.54; %! pos = [(psz/2 .- fsz/2) fsz]; %! set (hf, "paperpositionmode", "auto"); -%! assert (get (hf, "paperposition"), pos, tol) +%! assert (get (hf, "paperposition"), pos, tol); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect @@ -4010,7 +4010,7 @@ %! set (hf, "paperunits", "normalized"); %! fsz = in_pos(3:4) ./ psz; %! pos = [([0.5 0.5] .- fsz/2) fsz]; -%! assert (get (hf, "paperposition"), pos, tol) +%! assert (get (hf, "paperposition"), pos, tol); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect @@ -4027,7 +4027,7 @@ %! psz = get (hf, "papersize"); %! fsz = in_pos(3:4); %! pos = [(psz/2 .- fsz/2) fsz]; -%! assert (get (hf, "paperposition"), pos, tol) +%! assert (get (hf, "paperposition"), pos, tol); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect @@ -4044,7 +4044,7 @@ %! psz = get (hf, "papersize"); %! fsz = in_pos(3:4); %! pos = [(psz/2 .- fsz/2) fsz]; -%! assert (get (hf, "paperposition"), pos, tol) +%! assert (get (hf, "paperposition"), pos, tol); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect @@ -4054,9 +4054,9 @@ %! in_pos = [0 0 4 5]; %! unwind_protect %! ## back to manual mode -%! set (hf, "paperposition", in_pos * 1.1) -%! assert (get (hf, "paperpositionmode"), "manual") -%! assert (get (hf, "paperposition"), in_pos * 1.1) +%! set (hf, "paperposition", in_pos * 1.1); +%! assert (get (hf, "paperpositionmode"), "manual"); +%! assert (get (hf, "paperposition"), in_pos * 1.1); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect @@ -4617,17 +4617,17 @@ %! graphics_toolkit (hf, "fltk"); %! fpos = get (hf, "position"); %! unwind_protect -%! plot (rand (3)) +%! plot (rand (3)); %! position = get (gca, "position"); %! outerposition = get (gca, "outerposition"); %! looseinset = get (gca, "looseinset"); %! tightinset = get (gca, "tightinset"); -%! set (hf, "position", [fpos(1:2), 2*fpos(3:4)]) +%! set (hf, "position", [fpos(1:2), 2*fpos(3:4)]); %! set (hf, "position", fpos); -%! assert (get (gca, "outerposition"), outerposition, 0.001) -%! assert (get (gca, "position"), position, 0.001) -%! assert (get (gca, "looseinset"), looseinset, 0.001) -%! assert (get (gca, "tightinset"), tightinset, 0.001) +%! assert (get (gca, "outerposition"), outerposition, 0.001); +%! assert (get (gca, "position"), position, 0.001); +%! assert (get (gca, "looseinset"), looseinset, 0.001); +%! assert (get (gca, "tightinset"), tightinset, 0.001); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect @@ -4635,19 +4635,19 @@ %! hf = figure ("visible", "off"); %! graphics_toolkit (hf, "fltk"); %! fpos = get (hf, "position"); -%! set (gca, "activepositionproperty", "position") +%! set (gca, "activepositionproperty", "position"); %! unwind_protect -%! plot (rand (3)) +%! plot (rand (3)); %! position = get (gca, "position"); %! outerposition = get (gca, "outerposition"); %! looseinset = get (gca, "looseinset"); %! tightinset = get (gca, "tightinset"); -%! set (hf, "position", [fpos(1:2), 2*fpos(3:4)]) +%! set (hf, "position", [fpos(1:2), 2*fpos(3:4)]); %! set (hf, "position", fpos); -%! assert (get (gca, "position"), position, 0.001) -%! assert (get (gca, "outerposition"), outerposition, 0.001) -%! assert (get (gca, "looseinset"), looseinset, 0.001) -%! assert (get (gca, "tightinset"), tightinset, 0.001) +%! assert (get (gca, "position"), position, 0.001); +%! assert (get (gca, "outerposition"), outerposition, 0.001); +%! assert (get (gca, "looseinset"), looseinset, 0.001); +%! assert (get (gca, "tightinset"), tightinset, 0.001); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect @@ -9636,8 +9636,7 @@ %! assert (get (hli, "marker"), get (0, "defaultlinemarker")); %! assert (get (hli, "markerfacecolor"), %! get (0, "defaultlinemarkerfacecolor")); -%! assert (get (hli, "linestyle"), -%! get (0, "defaultlinelinestyle")); +%! assert (get (hli, "linestyle"), get (0, "defaultlinelinestyle")); %! assert (get (hli, "linewidth"), 3, tol); # parent axes defaults %! %! unwind_protect_cleanup @@ -9677,8 +9676,7 @@ %! assert (get (hsu, "xdata"), get (0, "defaultsurfacexdata"), tol); %! assert (get (hsu, "ydata"), get (0, "defaultsurfaceydata"), tol); %! assert (get (hsu, "zdata"), get (0, "defaultsurfacezdata"), tol); -%! assert (get (hsu, "edgecolor"), -%! get (0, "defaultsurfaceedgecolor"), tol); +%! assert (get (hsu, "edgecolor"), get (0, "defaultsurfaceedgecolor"), tol); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect @@ -9721,8 +9719,8 @@ %! %! reset (hax); %! assert (get (hax, "linewidth"), get (0, "defaultaxeslinewidth"), tol); -%! assert (get (hax, "position"), pos, tol); # axes position is unchanged -%! assert (get (hax, "default"), struct ()); # no more axes' defaults +%! assert (get (hax, "position"), pos, tol); # axes position is unchanged +%! assert (get (hax, "default"), struct ()); # no more axes' defaults %! assert (get (get (hax, "title"), "string"), ""); %! unwind_protect_cleanup %! close (hf); @@ -9735,7 +9733,7 @@ %! unwind_protect %! reset (hf); %! assert (get (hf, "papertype"), get (0, "defaultfigurepapertype")); -%! assert (get (hf, "paperunits"), "centimeters"); # paperunits is unchanged +%! assert (get (hf, "paperunits"), "centimeters"); # paperunits is unchanged %! assert (get (hf, "visible"), get (0, "defaultfigurevisible")); %! unwind_protect_cleanup %! close (hf);
--- a/libinterp/corefcn/kron.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/kron.cc Fri Apr 01 16:03:29 2016 -0700 @@ -321,5 +321,5 @@ %! expected (2, 12) = 4; %! expected (5, 15) = 6; %! expected (6, 16) = 8; -%! assert (kron (diag ([1, 2], 2), diag ([3, 4], 2)), expected) +%! assert (kron (diag ([1, 2], 2), diag ([3, 4], 2)), expected); */
--- a/libinterp/corefcn/mappers.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/mappers.cc Fri Apr 01 16:03:29 2016 -0700 @@ -1553,7 +1553,7 @@ %!test %! x = [.5, 1, 1.5, 2, 3, 4, 5]; %! v = [sqrt(pi), 1, .5*sqrt(pi), 1, 2, 6, 24]; -%! assert (gammaln (x), log (v), sqrt (eps)) +%! assert (gammaln (x), log (v), sqrt (eps)); %!test %! a = single (-1i*sqrt (-1/(6.4187*6.4187))); @@ -1562,7 +1562,7 @@ %!test %! x = single ([.5, 1, 1.5, 2, 3, 4, 5]); %! v = single ([sqrt(pi), 1, .5*sqrt(pi), 1, 2, 6, 24]); -%! assert (gammaln (x), log (v), sqrt (eps ("single"))) +%! assert (gammaln (x), log (v), sqrt (eps ("single"))); %!test %! x = [-1, 0, 1, Inf];
--- a/libinterp/corefcn/oct-map.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/oct-map.cc Fri Apr 01 16:03:29 2016 -0700 @@ -1194,7 +1194,7 @@ %!test %! rhs.b = 1; %! a(3) = rhs; -%! assert ({a.b}, {[], [], 1}) +%! assert ({a.b}, {[], [], 1}); */ void
--- a/libinterp/corefcn/ordschur.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/ordschur.cc Fri Apr 01 16:03:29 2016 -0700 @@ -215,28 +215,28 @@ %! A = [1, 2, 3, -2; 4, 5, 6, -5 ; 7, 8, 9, -5; 10, 11, 12, 4 ]; %! [U, T] = schur (A); %! [US, TS] = ordschur (U, T, [ 0, 0, 1, 1 ]); -%! assert (US*TS*US', A, sqrt (eps)) -%! assert (diag (T)(3:4), diag (TS)(1:2), sqrt (eps)) +%! assert (US*TS*US', A, sqrt (eps)); +%! assert (diag (T)(3:4), diag (TS)(1:2), sqrt (eps)); %!test %! A = [1, 2, 3, -2; 4, 5, 6, -5 ; 7, 8, 9, -5; 10, 11, 12, 4 ]; %! [U, T] = schur (A); %! [US, TS] = ordschur (single (U), single (T), [ 0, 0, 1, 1 ]); -%! assert (US*TS*US', A, sqrt (eps ("single"))) -%! assert (diag (T)(3:4), diag (TS)(1:2), sqrt (eps ("single"))) +%! assert (US*TS*US', A, sqrt (eps ("single"))); +%! assert (diag (T)(3:4), diag (TS)(1:2), sqrt (eps ("single"))); %!test %! A = [1, 2, 3, -2; 4, 5, 6, -5 ; 7, 8, 9, -5; 10, 11, 12, 4+3i ]; %! [U, T] = schur (A); %! [US, TS] = ordschur (U, T, [ 0, 0, 1, 1 ]); -%! assert (US*TS*US', A, sqrt (eps)) -%! assert (diag (T)(3:4), diag (TS)(1:2), sqrt (eps)) +%! assert (US*TS*US', A, sqrt (eps)); +%! assert (diag (T)(3:4), diag (TS)(1:2), sqrt (eps)); %!test %! A = [1, 2, 3, -2; 4, 5, 6, -5 ; 7, 8, 9, -5; 10, 11, 12, 4+3i ]; %! [U, T] = schur (A); %! [US, TS] = ordschur (single (U), single (T), [ 0, 0, 1, 1 ]); -%! assert (US*TS*US', A, sqrt (eps ("single"))) -%! assert (diag (T)(3:4), diag (TS)(1:2), sqrt (eps ("single"))) +%! assert (US*TS*US', A, sqrt (eps ("single"))); +%! assert (diag (T)(3:4), diag (TS)(1:2), sqrt (eps ("single"))); */
--- a/libinterp/corefcn/psi.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/psi.cc Fri Apr 01 16:03:29 2016 -0700 @@ -160,7 +160,7 @@ ## Abramowitz and Stegun, page 258, eq 6.3.5 %!test %! z = [-100:-1 1:200] ./ 10; # drop the 0 -%! assert (psi (z + 1), psi (z) + 1 ./ z, eps*1000) +%! assert (psi (z + 1), psi (z) + 1 ./ z, eps*1000); ## Abramowitz and Stegun, page 258, eq 6.3.2 %!assert (psi (1), -em) @@ -204,15 +204,18 @@ ## Abramowitz and Stegun, page 260 eq 6.4.5 %!test %! for z = 0:20 -%! assert (psi (1, z + 0.5), 0.5 * (pi^2) - 4 * sum ((2*(1:z) -1) .^(-2)), eps*10) +%! assert (psi (1, z + 0.5), +%! 0.5 * (pi^2) - 4 * sum ((2*(1:z) -1) .^(-2)), +%! eps*10); %! endfor ## Abramowitz and Stegun, page 260 eq 6.4.6 %!test %! z = 0.1:0.1:20; %! for n = 0:8 -%! ## our precision goes down really quick when computing n is too high, -%! assert (psi (n, z+1), psi (n, z) + ((-1)^n) * factorial (n) * (z.^(-n-1)), 0.1) +%! ## our precision goes down really quick when computing n is too high. +%! assert (psi (n, z+1), +%! psi (n, z) + ((-1)^n) * factorial (n) * (z.^(-n-1)), 0.1); %! endfor ## Test input validation
--- a/libinterp/corefcn/rand.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/rand.cc Fri Apr 01 16:03:29 2016 -0700 @@ -753,7 +753,7 @@ /* %!test -%! randg ("state", 12) +%! randg ("state", 12); %! assert (randg ([-inf, -1, 0, inf, nan]), [nan, nan, nan, nan, nan]); # *** Please report %!test @@ -983,28 +983,28 @@ %!test %! ## Test fixed state %! randp ("state", 1); -%! assert (randp (5, 1, 6), [5 5 3 7 7 3]) +%! assert (randp (5, 1, 6), [5 5 3 7 7 3]); %!test %! ## Test fixed state %! randp ("state", 1); -%! assert (randp (15, 1, 6), [13 15 8 18 18 15]) +%! assert (randp (15, 1, 6), [13 15 8 18 18 15]); %!test %! ## Test fixed state %! randp ("state", 1); -%! assert (randp (1e9, 1, 6), [999915677 999976657 1000047684 1000019035 999985749 999977692], -1e-6) +%! assert (randp (1e9, 1, 6), [999915677 999976657 1000047684 1000019035 999985749 999977692], -1e-6); %!test %! ## Test fixed state %! randp ("seed", 1); %! %%assert (randp (5, 1, 6), [8 2 3 6 6 8]) -%! assert (randp (5, 1, 5), [8 2 3 6 6]) +%! assert (randp (5, 1, 5), [8 2 3 6 6]); %!test %! ## Test fixed state %! randp ("seed", 1); -%! assert (randp (15, 1, 6), [15 16 12 10 10 12]) +%! assert (randp (15, 1, 6), [15 16 12 10 10 12]); %!test %! ## Test fixed state %! randp ("seed", 1); -%! assert (randp (1e9, 1, 6), [1000006208 1000012224 999981120 999963520 999963072 999981440], -1e-6) +%! assert (randp (1e9, 1, 6), [1000006208 1000012224 999981120 999963520 999963072 999981440], -1e-6); %!test %! if (__random_statistical_tests__) %! ## statistical tests may fail occasionally.
--- a/libinterp/corefcn/variables.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/corefcn/variables.cc Fri Apr 01 16:03:29 2016 -0700 @@ -358,7 +358,7 @@ /* %!test %! global x; -%! assert (isglobal ("x"), true) +%! assert (isglobal ("x"), true); %!error isglobal () %!error isglobal ("a", "b")
--- a/libinterp/dldfcn/__osmesa_print__.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/dldfcn/__osmesa_print__.cc Fri Apr 01 16:03:29 2016 -0700 @@ -216,7 +216,7 @@ %! assert (stat (fn).size, 2692270, -0.1); %! unlink (fn); %! img = __osmesa_print__ (h); -%! assert (size (img), [get(h, "position")([4, 3]), 3]) +%! assert (size (img), [get(h, "position")([4, 3]), 3]); %! ## Use pixel sum per RGB channel as fingerprint %! img_fp = squeeze (sum (sum (img), 2)); %! assert (img_fp, [52942515; 54167797; 56158178], -0.05); @@ -231,7 +231,7 @@ %! assert (stat (fn).size, 7438, -0.1); %! unlink (fn); %! img = __osmesa_print__ (h); -%! assert (size (img), [get(h, "position")([4, 3]), 3]) +%! assert (size (img), [get(h, "position")([4, 3]), 3]); %! ## Use pixel sum per RGB channel as fingerprint %! img_fp = squeeze (sum (sum (img), 2)); %! assert (img_fp, [59281711; 59281711; 59482179], -0.05);
--- a/libinterp/dldfcn/amd.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/dldfcn/amd.cc Fri Apr 01 16:03:29 2016 -0700 @@ -188,11 +188,11 @@ %! A2 = ones (30, 30); %! %!testif HAVE_AMD -%! assert(amd (A2), [1:30]) +%! assert(amd (A2), [1:30]); %! opts.dense = 25; -%! assert(amd (A2, opts), [1:30]) +%! assert(amd (A2, opts), [1:30]); %! opts.aggressive = 1; -%! assert(amd (A2, opts), [1:30]) +%! assert(amd (A2, opts), [1:30]); %!error <S must be a square matrix|was unavailable or disabled> amd (A) %!error amd (A2, 2)
--- a/libinterp/dldfcn/audiodevinfo.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/dldfcn/audiodevinfo.cc Fri Apr 01 16:03:29 2016 -0700 @@ -429,10 +429,10 @@ %! nout = audiodevinfo (0); %! nin = audiodevinfo (1); %! for i = 1:nout, -%! assert (devinfo.output(i).Name, audiodevinfo (0, devinfo.output(i).ID)) +%! assert (devinfo.output(i).Name, audiodevinfo (0, devinfo.output(i).ID)); %! endfor %! for i=1:nin, -%! assert (devinfo.input(i).Name, audiodevinfo (1, devinfo.input(i).ID)) +%! assert (devinfo.input(i).Name, audiodevinfo (1, devinfo.input(i).ID)); %! endfor %!testif HAVE_PORTAUDIO @@ -440,10 +440,10 @@ %! nout = audiodevinfo (0); %! nin = audiodevinfo (1); %! for i = 1:nout, -%! assert (devinfo.output(i).ID, audiodevinfo (0, devinfo.output(i).Name)) +%! assert (devinfo.output(i).ID, audiodevinfo (0, devinfo.output(i).Name)); %! endfor %! for i = 1:nin, -%! assert (devinfo.input(i).ID, audiodevinfo (1, devinfo.input(i).Name)) +%! assert (devinfo.input(i).ID, audiodevinfo (1, devinfo.input(i).Name)); %! endfor */
--- a/libinterp/dldfcn/dmperm.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/dldfcn/dmperm.cc Fri Apr 01 16:03:29 2016 -0700 @@ -193,9 +193,9 @@ /* %!testif HAVE_CXSPARSE -%! assert (sprank (speye (20)), 20) +%! assert (sprank (speye (20)), 20); %!testif HAVE_CXSPARSE -%! assert (sprank ([1,0,2,0;2,0,4,0]), 2) +%! assert (sprank ([1,0,2,0;2,0,4,0]), 2); %!error sprank (1,2) */
--- a/libinterp/dldfcn/qr.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/dldfcn/qr.cc Fri Apr 01 16:03:29 2016 -0700 @@ -640,7 +640,7 @@ %! n = 20; d = 0.2; %! a = sprandn (n,n,d) + speye (n,n); %! r = qr (a); -%! assert (r'*r, a'*a, 1e-10) +%! assert (r'*r, a'*a, 1e-10); %!testif HAVE_COLAMD %! n = 20; d = 0.2; @@ -648,20 +648,20 @@ %! q = symamd (a); %! a = a(q,q); %! r = qr (a); -%! assert (r'*r, a'*a, 1e-10) +%! assert (r'*r, a'*a, 1e-10); %!testif HAVE_CXSPARSE %! n = 20; d = 0.2; %! a = sprandn (n,n,d) + speye (n,n); %! [c,r] = qr (a, ones (n,1)); -%! assert (r\c, full (a)\ones (n,1), 10e-10) +%! assert (r\c, full (a)\ones (n,1), 10e-10); %!testif HAVE_CXSPARSE %! n = 20; d = 0.2; %! a = sprandn (n,n,d) + speye (n,n); %! b = randn (n,2); %! [c,r] = qr (a, b); -%! assert (r\c, full (a)\b, 10e-10) +%! assert (r\c, full (a)\b, 10e-10); %% Test under-determined systems!! %!#testif HAVE_CXSPARSE @@ -669,13 +669,13 @@ %! a = sprandn (n,n+1,d) + speye (n,n+1); %! b = randn (n,2); %! [c,r] = qr (a, b); -%! assert (r\c, full (a)\b, 10e-10) +%! assert (r\c, full (a)\b, 10e-10); %!testif HAVE_CXSPARSE %! n = 20; d = 0.2; %! a = 1i*sprandn (n,n,d) + speye (n,n); %! r = qr (a); -%! assert (r'*r,a'*a,1e-10) +%! assert (r'*r,a'*a,1e-10); %!testif HAVE_COLAMD %! n = 20; d = 0.2; @@ -683,20 +683,20 @@ %! q = symamd (a); %! a = a(q,q); %! r = qr (a); -%! assert (r'*r, a'*a, 1e-10) +%! assert (r'*r, a'*a, 1e-10); %!testif HAVE_CXSPARSE %! n = 20; d = 0.2; %! a = 1i*sprandn (n,n,d) + speye (n,n); %! [c,r] = qr (a, ones (n,1)); -%! assert (r\c, full (a)\ones (n,1), 10e-10) +%! assert (r\c, full (a)\ones (n,1), 10e-10); %!testif HAVE_CXSPARSE %! n = 20; d = 0.2; %! a = 1i*sprandn (n,n,d) + speye (n,n); %! b = randn (n,2); %! [c,r] = qr (a, b); -%! assert (r\c, full (a)\b, 10e-10) +%! assert (r\c, full (a)\b, 10e-10); %% Test under-determined systems!! %!#testif HAVE_CXSPARSE @@ -704,7 +704,7 @@ %! a = 1i*sprandn (n,n+1,d) + speye (n,n+1); %! b = randn (n,2); %! [c,r] = qr (a, b); -%! assert (r\c, full (a)\b, 10e-10) +%! assert (r\c, full (a)\b, 10e-10); */
--- a/libinterp/octave-value/ov-bool-mat.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/octave-value/ov-bool-mat.cc Fri Apr 01 16:03:29 2016 -0700 @@ -560,7 +560,7 @@ %! s = ! 0; %! c = {"double", "single", "int8", "int16", "int32", "int64", "uint8", "uint16", "uint32", "uint64", "logical"}; %! for i = 1:numel (c) -%! assert (logical (eye (2, c{i})), m) -%! assert (logical (eye (1, c{i})), s) +%! assert (logical (eye (2, c{i})), m); +%! assert (logical (eye (1, c{i})), s); %! endfor */
--- a/libinterp/octave-value/ov-class.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/octave-value/ov-class.cc Fri Apr 01 16:03:29 2016 -0700 @@ -1857,9 +1857,9 @@ %! ## the middle with an invalid class name will cause the java code to %! ## throw exceptions which we then must clear properly (or all other calls %! ## will fail). So we test this too. -%! assert (isa (javaObject ("java.lang.Double", 10), "java.lang.Number")) -%! assert (isa (javaObject ("java.lang.Double", 10), "not_a_class"), false) -%! assert (isa (javaObject ("java.lang.Double", 10), "java.lang.Number")) +%! assert (isa (javaObject ("java.lang.Double", 10), "java.lang.Number")); +%! assert (isa (javaObject ("java.lang.Double", 10), "not_a_class"), false); +%! assert (isa (javaObject ("java.lang.Double", 10), "java.lang.Number")); %!test %! a.b = 1;
--- a/libinterp/octave-value/ov-fcn-handle.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/octave-value/ov-fcn-handle.cc Fri Apr 01 16:03:29 2016 -0700 @@ -1325,7 +1325,7 @@ %!endfunction %!function [f2, g2, hm2, hdld2, hbi2] = fcn_handle_load_recurse (n, nm) %! if (n == 0) -%! load (nm) +%! load (nm); %! else %! [f2, g2, hm2, hdld2, hbi2] = fcn_handle_load_recurse (n - 1, nm); %! endif
--- a/libinterp/octave-value/ov-java.cc Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/octave-value/ov-java.cc Fri Apr 01 16:03:29 2016 -0700 @@ -2980,7 +2980,7 @@ ## Automatic conversion from string cell array into String[] (bug #45290) %!testif HAVE_JAVA -%! assert (javaMethod ("binarySearch", "java.util.Arrays", {"aaa", "bbb", "ccc", "zzz"}, "aaa"), 0) -%! assert (javaMethod ("binarySearch", "java.util.Arrays", {"aaa", "bbb", "ccc", "zzz"}, "zzz"), 3) -%! assert (javaMethod ("binarySearch", "java.util.Arrays", {"aaa", "bbb", "ccc", "zzz"}, "hhh") < 0) +%! assert (javaMethod ("binarySearch", "java.util.Arrays", {"aaa", "bbb", "ccc", "zzz"}, "aaa"), 0); +%! assert (javaMethod ("binarySearch", "java.util.Arrays", {"aaa", "bbb", "ccc", "zzz"}, "zzz"), 3); +%! assert (javaMethod ("binarySearch", "java.util.Arrays", {"aaa", "bbb", "ccc", "zzz"}, "hhh") < 0); */
--- a/libinterp/parse-tree/oct-parse.in.yy Fri Apr 01 14:56:52 2016 -0700 +++ b/libinterp/parse-tree/oct-parse.in.yy Fri Apr 01 16:03:29 2016 -0700 @@ -5101,7 +5101,7 @@ %! assert (y, 1); %!test -%! eval ("x = 1;") +%! eval ("x = 1;"); %! assert (x,1); %!test @@ -5369,7 +5369,7 @@ %!function [a, b] = __f_evalc () %! printf ("foo"); %! fprintf (stdout, "bar"); -%! disp (pi) +%! disp (pi); %! a = 1; %! b = 2; %!endfunction
--- a/scripts/deprecated/bicubic.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/deprecated/bicubic.m Fri Apr 01 16:03:29 2016 -0700 @@ -256,5 +256,5 @@ %! z2 = interp2 (fliplr (xx), flipud (yy), fliplr (flipud(z)), %! fliplr (xx2), flipud (yy2), "spline"); %! z2 = fliplr (flipud (z2)); -%! assert (z1, z2, 100 * eps ()) +%! assert (z1, z2, 100 * eps ());
--- a/scripts/deprecated/delaunay3.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/deprecated/delaunay3.m Fri Apr 01 16:03:29 2016 -0700 @@ -84,7 +84,7 @@ %!testif HAVE_QHULL %! x = [-1, -1, 1, 0, -1]; y = [-1, 1, 1, 0, -1]; z = [0, 0, 0, 1, 1]; -%! assert (sortrows (sort (delaunay3 (x, y, z), 2)), [1,2,3,4;1,2,4,5]) +%! assert (sortrows (sort (delaunay3 (x, y, z), 2)), [1,2,3,4;1,2,4,5]); ## FIXME: Need input validation tests
--- a/scripts/general/accumarray.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/general/accumarray.m Fri Apr 01 16:03:29 2016 -0700 @@ -401,26 +401,26 @@ %!test %! A = accumarray ([1 1; 2 1; 2 3; 2 1; 2 3], 101:105, [2,4], @(x) {x}); -%! assert (A{2},[102; 104]) +%! assert (A{2},[102; 104]); %!test %! subs = ceil (rand (2000, 3)*10); %! vals = rand (2000, 1); %! assert (accumarray (subs, vals, [], @max), -%! accumarray (subs, vals, [], @(x) max (x))) +%! accumarray (subs, vals, [], @(x) max (x))); %!test %! subs = ceil (rand (2000, 1)*100); %! vals = rand (2000, 1); %! assert (accumarray (subs, vals, [100, 1], @min, NaN), -%! accumarray (subs, vals, [100, 1], @(x) min (x), NaN)) +%! accumarray (subs, vals, [100, 1], @(x) min (x), NaN)); %!test %! subs = ceil (rand (2000, 2)*30); %! subsc = num2cell (subs, 1); %! vals = rand (2000, 1); %! assert (accumarray (subsc, vals, [], [], 0, true), -%! accumarray (subs, vals, [], [], 0, true)) +%! accumarray (subs, vals, [], [], 0, true)); %!test %! subs = ceil (rand (2000, 3)*10); @@ -437,9 +437,9 @@ %! ## min, max, and sum are special cases within accumarray so test them. %! funcs = {@(x) length (x) > 1, @min, @max, @sum}; %! for idx = 1:numel (funcs) -%! assert (accumarray (zeros (0, 1), [], [0 1] , funcs{idx}), zeros (0, 1)) -%! assert (accumarray (zeros (0, 1), [], [1 0] , funcs{idx}), zeros (1, 0)) -%! assert (accumarray (zeros (0, 1), [], [] , funcs{idx}), zeros (0, 1)) +%! assert (accumarray (zeros (0, 1), [], [0 1] , funcs{idx}), zeros (0, 1)); +%! assert (accumarray (zeros (0, 1), [], [1 0] , funcs{idx}), zeros (1, 0)); +%! assert (accumarray (zeros (0, 1), [], [] , funcs{idx}), zeros (0, 1)); %! endfor ## Matlab returns an array of doubles even though FUNC returns cells. In
--- a/scripts/general/flip.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/general/flip.m Fri Apr 01 16:03:29 2016 -0700 @@ -88,7 +88,7 @@ %! a(1:2,1:2,2) = [5 6; 7 8]; %! b(1:2,1:2,1) = [5 6; 7 8]; %! b(1:2,1:2,2) = [1 2; 3 4]; -%! assert (flip (a, 3), b) +%! assert (flip (a, 3), b); %!test %! a = b = zeros (2, 2, 1, 2); @@ -96,9 +96,9 @@ %! a(1:2,1:2,:,2) = [5 6; 7 8]; %! b(1:2,1:2,:,1) = [5 6; 7 8]; %! b(1:2,1:2,:,2) = [1 2; 3 4]; -%! assert (flip (a, 3), a) -%! assert (flip (a, 4), b) -%! assert (flip (a, 5), a) +%! assert (flip (a, 3), a); +%! assert (flip (a, 4), b); +%! assert (flip (a, 5), a); %!error flip () %!error flip (1, 2, 3)
--- a/scripts/general/fliplr.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/general/fliplr.m Fri Apr 01 16:03:29 2016 -0700 @@ -57,7 +57,7 @@ %! a(:,:,2) = [ 7 8; 9 10; 11 12]; %! b(:,:,1) = [ 2 1; 4 3; 6 5]; %! b(:,:,2) = [ 8 7; 10 9; 12 11]; -%! assert (fliplr (a), b) +%! assert (fliplr (a), b); ## Test NDArray with singleton dimensions %!test @@ -65,13 +65,13 @@ %! a(:,:,:,2) = [ 7 8; 9 10; 11 12]; %! b(:,:,:,1) = [ 2 1; 4 3; 6 5]; %! b(:,:,:,2) = [ 8 7; 10 9; 12 11]; -%! assert (fliplr (a), b) +%! assert (fliplr (a), b); ## Test for 1 row, i.e., returns the same %!test %! a(:,1,:,1) = [ 1 2 3 4]; %! a(:,1,:,2) = [ 5 6 7 8]; -%! assert (fliplr (a), a) +%! assert (fliplr (a), a); %!error fliplr() %!error fliplr (1, 2)
--- a/scripts/general/flipud.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/general/flipud.m Fri Apr 01 16:03:29 2016 -0700 @@ -57,7 +57,7 @@ %! a(:,:,2) = [ 7 8 9; 10 11 12]; %! b(:,:,1) = [ 4 5 6; 1 2 3]; %! b(:,:,2) = [10 11 12; 7 8 9]; -%! assert (flipud (a), b) +%! assert (flipud (a), b); ## Test NDArray with singleton dimensions %!test @@ -65,13 +65,13 @@ %! a(:,:,:,2) = [ 7 8 9; 10 11 12]; %! b(:,:,:,1) = [ 4 5 6; 1 2 3]; %! b(:,:,:,2) = [10 11 12; 7 8 9]; -%! assert (flipud (a), b) +%! assert (flipud (a), b); ## Test for 1 row, i.e., returns the same %!test %! a(1,:,:,1) = [ 1 2 3 4]; %! a(1,:,:,2) = [ 5 6 7 8]; -%! assert (flipud (a), a) +%! assert (flipud (a), a); %!error flipud () %!error flipud (1, 2)
--- a/scripts/general/gradient.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/general/gradient.m Fri Apr 01 16:03:29 2016 -0700 @@ -300,6 +300,6 @@ %! df_dx = @(x, y) cos (x) .* cos (y); %! df_dy = @(x, y) -sin (x) .* sin (y); %! [dx, dy] = gradient (f, xy); -%! assert (dx, df_dx (xy (:, 1), xy (:, 2)), 0.1) -%! assert (dy, df_dy (xy (:, 1), xy (:, 2)), 0.1) +%! assert (dx, df_dx (xy (:, 1), xy (:, 2)), 0.1); +%! assert (dy, df_dy (xy (:, 1), xy (:, 2)), 0.1);
--- a/scripts/general/inputParser.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/general/inputParser.m Fri Apr 01 16:03:29 2016 -0700 @@ -495,7 +495,7 @@ %! assert (r.req1, "file"); %! assert (sort (p.UsingDefaults), sort ({"op1", "op2", "verbose", "line"})); %! assert ({r.req1, r.op1, r.op2, r.verbose, r.line}, -%! {"file", "val", 78, false, "tree"}); +%! {"file", "val", 78, false, "tree"}); ## check normal use, but give values different than defaults %!test @@ -527,7 +527,7 @@ %! p = create_p (); %! p.KeepUnmatched = true; %! p.parse ("file", "foo", 80, "line", "circle", "verbose", "extra", 50); -%! assert (p.Unmatched.extra, 50) +%! assert (p.Unmatched.extra, 50); ## check error when missing required %!error <not enough input arguments> @@ -581,19 +581,19 @@ %! p = inputParser; %! p.addParamValue ("Dir", [], @ischar); %! p.parse (); -%! assert (p.Results.Dir, []) +%! assert (p.Results.Dir, []); %!test %! p = inputParser; %! p.addParamValue ("positive", -1, @(x) x > 5); %! p.parse (); -%! assert (p.Results.positive, -1) +%! assert (p.Results.positive, -1); %!function r = foobar (varargin) %! p = inputParser (); %! p.addParamValue ("foo", "bar", @ischar); %! p.parse (varargin{2:end}); -%! r = p.Results +%! r = p.Results; %!endfunction %!xtest assert (foobar (), struct ("foo", "bar"))
--- a/scripts/general/interp1.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/general/interp1.m Fri Apr 01 16:03:29 2016 -0700 @@ -467,7 +467,7 @@ %! h = plot (x, interp1 (x1, y1, x), 'b', x1, y1, 'sb'); %! hold on %! g = plot (x, interp1 (x2, y2, x), 'r', x2, y2, '*r'); -%! axis ([0.5 3.5 -0.5 1.5]) +%! axis ([0.5 3.5 -0.5 1.5]); %! legend ([h(1), g(1)], {'left-continuous', 'right-continuous'}, ... %! 'location', 'northwest') %! legend boxoff
--- a/scripts/general/narginchk.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/general/narginchk.m Fri Apr 01 16:03:29 2016 -0700 @@ -66,7 +66,7 @@ %!error <not enough input arguments> f([3, 3], 1) %!test -%! f([1,1]) +%! f([1,1]); %!test -%! f([1,5], 2, 3, 4, 5) +%! f([1,5], 2, 3, 4, 5);
--- a/scripts/general/rot90.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/general/rot90.m Fri Apr 01 16:03:29 2016 -0700 @@ -108,9 +108,9 @@ %! a(1:2,1:2,2) = [5 6; 7 8]; %! b(1:2,1:2,1) = [2 4; 1 3]; %! b(1:2,1:2,2) = [6 8; 5 7]; -%! assert (rot90 (a, 1), b) -%! assert (rot90 (a, 2), rot90 (b, 1)) -%! assert (rot90 (a, 3), rot90 (b, 2)) +%! assert (rot90 (a, 1), b); +%! assert (rot90 (a, 2), rot90 (b, 1)); +%! assert (rot90 (a, 3), rot90 (b, 2)); %!test %! a = b = zeros (2, 2, 1, 2); @@ -118,9 +118,9 @@ %! a(1:2,1:2,:,2) = [5 6; 7 8]; %! b(1:2,1:2,:,1) = [2 4; 1 3]; %! b(1:2,1:2,:,2) = [6 8; 5 7]; -%! assert (rot90 (a, 1), b) -%! assert (rot90 (a, 2), rot90 (b, 1)) -%! assert (rot90 (a, 3), rot90 (b, 2)) +%! assert (rot90 (a, 1), b); +%! assert (rot90 (a, 2), rot90 (b, 1)); +%! assert (rot90 (a, 3), rot90 (b, 2)); ## With non-square matrices %!test @@ -130,9 +130,9 @@ %! a(1:2,1:3,:,2) = [ 7 8 9; 10 11 12]; %! b(1:3,1:2,:,1) = [ 3 6; 2 5; 1 4]; %! b(1:3,1:2,:,2) = [ 9 12; 8 11; 7 10]; -%! assert (rot90 (a, 1), b) -%! assert (rot90 (a, 2), rot90 (b, 1)) -%! assert (rot90 (a, 3), rot90 (b, 2)) +%! assert (rot90 (a, 1), b); +%! assert (rot90 (a, 2), rot90 (b, 1)); +%! assert (rot90 (a, 3), rot90 (b, 2)); ## Test input validation %!error rot90 ()
--- a/scripts/general/validateattributes.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/general/validateattributes.m Fri Apr 01 16:03:29 2016 -0700 @@ -393,51 +393,51 @@ %!error <diag> validateattributes (repmat (eye (3), [1 1 3]), {}, {"diag"}) %!test -%! validateattributes (rand (5), {"numeric"}, {}) -%! validateattributes (rand (5), {"float"}, {}) -%! validateattributes (rand (5), {"double"}, {}) -%! validateattributes ("text", {"char"}, {}) -%! validateattributes (rand (5), {}, {"2d"}) -%! validateattributes (rand (5), {}, {"3d"}) -%! validateattributes (rand (5, 5, 5), {}, {"3d"}) -%! validateattributes (rand (5, 1), {}, {"column"}) -%! validateattributes (rand (1, 5), {}, {"row"}) -%! validateattributes ("a", {}, {"scalar"}) -%! validateattributes (5, {}, {"scalar"}) -%! validateattributes (rand (1, 5), {}, {"vector"}) -%! validateattributes (rand (5, 1), {}, {"vector"}) -%! validateattributes (rand (5), {}, {"square"}) -%! validateattributes (rand (5), {}, {"nonempty"}) -%! validateattributes (rand (5), {}, {"nonsparse"}) -%! validateattributes ([0 1 0 1 0], {}, {"binary"}) -%! validateattributes (rand (5) > 0.5, {}, {"binary"}) -%! validateattributes ([8 4 0 6], {}, {"even"}) -%! validateattributes ([-1 3 5], {}, {"odd"}) -%! validateattributes ([8 4 0 6], {}, {"real"}) -%! validateattributes ([8 4i 0 6], {}, {"finite"}) -%! validateattributes (uint8 ([8 4]), {}, {"finite"}) -%! validateattributes ([8 Inf], {}, {"nonnan"}) -%! validateattributes ([0 7 4], {}, {"nonnegative"}) -%! validateattributes ([-8 7 4], {}, {"nonzero"}) -%! validateattributes ([8 7 4], {}, {"positive"}) -%! validateattributes ([8 7 4 -5], {}, {"decreasing"}) -%! validateattributes ([-8 -7 4 5], {}, {"increasing"}) -%! validateattributes ([8 4 4 -5], {}, {"nonincreasing"}) -%! validateattributes ([-8 -8 4 5], {}, {"nondecreasing"}) -%! validateattributes (rand (4, 6, 7, 2), {}, {"size", [4 6 7 2]}) -%! validateattributes (rand (4, 6, 7, 2), {}, {"size", [4 NaN 7 2]}) -%! validateattributes (rand (4, 6, 7, 2), {}, {"size", [4 6 NaN 2 NaN]}) -%! validateattributes (rand (6, 2), {}, {"numel", 12}) -%! validateattributes (rand (6, 2), {}, {"ncols", 2}) -%! validateattributes (rand (6, 2), {}, {"nrows", 6}) -%! validateattributes (rand (6, 2, 4, 5), {}, {"ndims", 4}) -%! validateattributes ([4 5 6 7], {}, {">", 3}) -%! validateattributes ([4 5 6 7], {}, {">=", 4}) -%! validateattributes ([4 5 6 7], {}, {"<", 8}) -%! validateattributes ([4 5 6 7], {}, {"<=", 7}) -%! validateattributes (eye (3), {}, {"diag"}) -%! validateattributes ([1 0 0; 0 1 0; 0 0 1], {}, {"diag"}) -%! validateattributes (zeros (3), {}, {"diag"}) +%! validateattributes (rand (5), {"numeric"}, {}); +%! validateattributes (rand (5), {"float"}, {}); +%! validateattributes (rand (5), {"double"}, {}); +%! validateattributes ("text", {"char"}, {}); +%! validateattributes (rand (5), {}, {"2d"}); +%! validateattributes (rand (5), {}, {"3d"}); +%! validateattributes (rand (5, 5, 5), {}, {"3d"}); +%! validateattributes (rand (5, 1), {}, {"column"}); +%! validateattributes (rand (1, 5), {}, {"row"}); +%! validateattributes ("a", {}, {"scalar"}); +%! validateattributes (5, {}, {"scalar"}); +%! validateattributes (rand (1, 5), {}, {"vector"}); +%! validateattributes (rand (5, 1), {}, {"vector"}); +%! validateattributes (rand (5), {}, {"square"}); +%! validateattributes (rand (5), {}, {"nonempty"}); +%! validateattributes (rand (5), {}, {"nonsparse"}); +%! validateattributes ([0 1 0 1 0], {}, {"binary"}); +%! validateattributes (rand (5) > 0.5, {}, {"binary"}); +%! validateattributes ([8 4 0 6], {}, {"even"}); +%! validateattributes ([-1 3 5], {}, {"odd"}); +%! validateattributes ([8 4 0 6], {}, {"real"}); +%! validateattributes ([8 4i 0 6], {}, {"finite"}); +%! validateattributes (uint8 ([8 4]), {}, {"finite"}); +%! validateattributes ([8 Inf], {}, {"nonnan"}); +%! validateattributes ([0 7 4], {}, {"nonnegative"}); +%! validateattributes ([-8 7 4], {}, {"nonzero"}); +%! validateattributes ([8 7 4], {}, {"positive"}); +%! validateattributes ([8 7 4 -5], {}, {"decreasing"}); +%! validateattributes ([-8 -7 4 5], {}, {"increasing"}); +%! validateattributes ([8 4 4 -5], {}, {"nonincreasing"}); +%! validateattributes ([-8 -8 4 5], {}, {"nondecreasing"}); +%! validateattributes (rand (4, 6, 7, 2), {}, {"size", [4 6 7 2]}); +%! validateattributes (rand (4, 6, 7, 2), {}, {"size", [4 NaN 7 2]}); +%! validateattributes (rand (4, 6, 7, 2), {}, {"size", [4 6 NaN 2 NaN]}); +%! validateattributes (rand (6, 2), {}, {"numel", 12}); +%! validateattributes (rand (6, 2), {}, {"ncols", 2}); +%! validateattributes (rand (6, 2), {}, {"nrows", 6}); +%! validateattributes (rand (6, 2, 4, 5), {}, {"ndims", 4}); +%! validateattributes ([4 5 6 7], {}, {">", 3}); +%! validateattributes ([4 5 6 7], {}, {">=", 4}); +%! validateattributes ([4 5 6 7], {}, {"<", 8}); +%! validateattributes ([4 5 6 7], {}, {"<=", 7}); +%! validateattributes (eye (3), {}, {"diag"}); +%! validateattributes ([1 0 0; 0 1 0; 0 0 1], {}, {"diag"}); +%! validateattributes (zeros (3), {}, {"diag"}); %!test -%! validateattributes ([0 1 0 1], {"double", "uint8"}, {"binary", "size", [NaN 4], "nonnan"}) +%! validateattributes ([0 1 0 1], {"double", "uint8"}, {"binary", "size", [NaN 4], "nonnan"});
--- a/scripts/geometry/delaunay.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/geometry/delaunay.m Fri Apr 01 16:03:29 2016 -0700 @@ -195,7 +195,7 @@ ## Test 3-D input %!testif HAVE_QHULL %! x = [-1, -1, 1, 0, -1]; y = [-1, 1, 1, 0, -1]; z = [0, 0, 0, 1, 1]; -%! assert (sortrows (sort (delaunay (x, y, z), 2)), [1,2,3,4;1,2,4,5]) +%! assert (sortrows (sort (delaunay (x, y, z), 2)), [1,2,3,4;1,2,4,5]); ## Input validation tests %!error delaunay ()
--- a/scripts/geometry/delaunayn.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/geometry/delaunayn.m Fri Apr 01 16:03:29 2016 -0700 @@ -95,7 +95,7 @@ ## Test 3-D input %!testif HAVE_QHULL %! x = [-1, -1, 1, 0, -1]; y = [-1, 1, 1, 0, -1]; z = [0, 0, 0, 1, 1]; -%! assert (sortrows (sort (delaunayn ([x(:) y(:) z(:)]), 2)), [1,2,3,4;1,2,4,5]) +%! assert (sortrows (sort (delaunayn ([x(:) y(:) z(:)]), 2)), [1,2,3,4;1,2,4,5]); ## FIXME: Need tests for delaunayn
--- a/scripts/geometry/griddata3.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/geometry/griddata3.m Fri Apr 01 16:03:29 2016 -0700 @@ -99,5 +99,5 @@ %! [xi, yi, zi] = meshgrid (-0.8:0.2:0.8); %! vi = griddata3 (x, y, z, v, xi, yi, zi, "nearest"); %! vv = vi - xi.^2 - yi.^2 - zi.^2; -%! assert (max (abs (vv(:))), 0, 0.1) +%! assert (max (abs (vv(:))), 0, 0.1);
--- a/scripts/geometry/inpolygon.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/geometry/inpolygon.m Fri Apr 01 16:03:29 2016 -0700 @@ -103,7 +103,7 @@ %! clf; %! plot (xv, yv); %! hold on; -%! plot (x(inside), y(inside), "@g") +%! plot (x(inside), y(inside), "@g"); %! plot (x(! in), y(! in), "@m"); %! plot (x(on), y(on), "@b"); %! hold off;
--- a/scripts/gui/waitbar.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/gui/waitbar.m Fri Apr 01 16:03:29 2016 -0700 @@ -255,16 +255,16 @@ %! yy = [0 0]; %! hli = plot (xx, yy); %! -%! disp ("Push the cancel to stop the process.") +%! disp ("Push the cancel to stop the process."); %! hf = waitbar(0,"0","Name","Building Koch curve ...",... %! "createcancelbtn", "setappdata (gcbf,'interrupt', true)"); %! for ii = 1:niter %! ## Check cancel request %! if (! ishandle (hf)) -%! break +%! break; %! elseif (getappdata (hf, "interrupt")) -%! delete (hf) -%! break +%! delete (hf); +%! break; %! else %! waitbar (ii/niter, hf, sprintf ("Step %d/%d", ii, niter)); %! endif @@ -283,13 +283,13 @@ %! tmp = cell2mat (tmp); %! xx = [tmp(1,:) xx(end)]; %! yy = [tmp(2,:) yy(end)]; -%! set (hli, "xdata", xx, "ydata", yy) +%! set (hli, "xdata", xx, "ydata", yy); %! drawnow (); -%! pause (0.5) +%! pause (0.5); %! endfor %! %! if (ishandle (hf)) -%! delete (hf) +%! delete (hf); %! endif ## Test input validation
--- a/scripts/image/gray2ind.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/image/gray2ind.m Fri Apr 01 16:03:29 2016 -0700 @@ -98,9 +98,9 @@ %! uint8 ([0 0 1 254 255 255])) %!test -%! assert (class (gray2ind ([0.0 0.5 1.0], 255)), "uint8") -%! assert (class (gray2ind ([0.0 0.5 1.0], 256)), "uint8") -%! assert (class (gray2ind ([0.0 0.5 1.0], 257)), "uint16") +%! assert (class (gray2ind ([0.0 0.5 1.0], 255)), "uint8"); +%! assert (class (gray2ind ([0.0 0.5 1.0], 256)), "uint8"); +%! assert (class (gray2ind ([0.0 0.5 1.0], 257)), "uint16"); ## Test input validation %!error gray2ind ()
--- a/scripts/image/hsv2rgb.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/image/hsv2rgb.m Fri Apr 01 16:03:29 2016 -0700 @@ -144,47 +144,47 @@ %! for i = 1:5 %! rgb(:,:,:,i) = hsv2rgb (hsv(:,:,:,i)); %! endfor -%! assert (hsv2rgb (hsv), rgb) +%! assert (hsv2rgb (hsv), rgb); ## Test output class and size for input images. ## Most of the tests only test for colormap input. %!test %! rgb = hsv2rgb (rand (10, 10, 3)); -%! assert (class (rgb), "double") -%! assert (size (rgb), [10 10 3]) +%! assert (class (rgb), "double"); +%! assert (size (rgb), [10 10 3]); %!test %! rgb = hsv2rgb (rand (10, 10, 3, "single")); -%! assert (class (rgb), "single") -%! assert (size (rgb), [10 10 3]) +%! assert (class (rgb), "single"); +%! assert (size (rgb), [10 10 3]); %!test %! rgb = (rand (10, 10, 3) * 3 ) - 0.5; # values outside range [0 1] %! rgb = hsv2rgb (rgb); -%! assert (class (rgb), "double") -%! assert (size (rgb), [10 10 3]) +%! assert (class (rgb), "double"); +%! assert (size (rgb), [10 10 3]); %!test %! rgb = (rand (10, 10, 3, "single") * 3 ) - 0.5; # values outside range [0 1] %! rgb = hsv2rgb (rgb); -%! assert (class (rgb), "single") -%! assert (size (rgb), [10 10 3]) +%! assert (class (rgb), "single"); +%! assert (size (rgb), [10 10 3]); %!test %! rgb = hsv2rgb (randi ([0 255], 10, 10, 3, "uint8")); -%! assert (class (rgb), "double") -%! assert (size (rgb), [10 10 3]) +%! assert (class (rgb), "double"); +%! assert (size (rgb), [10 10 3]); %!test %! rgb = hsv2rgb (randi ([0 65535], 10, 10, 3, "uint16")); -%! assert (class (rgb), "double") -%! assert (size (rgb), [10 10 3]) +%! assert (class (rgb), "double"); +%! assert (size (rgb), [10 10 3]); %!test %! rgb = hsv2rgb (randi ([-128 127], 10, 10, 3, "int8")); -%! assert (class (rgb), "double") -%! assert (size (rgb), [10 10 3]) +%! assert (class (rgb), "double"); +%! assert (size (rgb), [10 10 3]); %!test %! hsv_double = reshape ([2/3 1/3 1 0 1 1 1 0, 1 1 1 1], [2 2 3]); @@ -193,7 +193,7 @@ %! hsv_int16 = int16 (double (hsv_double * uint16 (65535)) -32768); %! expected = reshape ([0 0 1 1 0 1 0 1 1 0 0 1], [2 2 3]); %! -%! assert (hsv2rgb (hsv_double), expected) -%! assert (hsv2rgb (hsv_uint8), expected) -%! assert (hsv2rgb (hsv_int16), expected) -%! assert (hsv2rgb (single (hsv_double)), single (expected), eps (single (2))) +%! assert (hsv2rgb (hsv_double), expected); +%! assert (hsv2rgb (hsv_uint8), expected); +%! assert (hsv2rgb (hsv_int16), expected); +%! assert (hsv2rgb (single (hsv_double)), single (expected), eps (single (2)));
--- a/scripts/image/im2double.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/image/im2double.m Fri Apr 01 16:03:29 2016 -0700 @@ -109,7 +109,7 @@ %! for n = 1:12 %! out(:,:,n) = im2double (in(:,:,n)); %! endfor -%! assert (im2double (in), out) +%! assert (im2double (in), out); %!endfunction %!test
--- a/scripts/image/image.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/image/image.m Fri Apr 01 16:03:29 2016 -0700 @@ -237,24 +237,24 @@ %! nx = 64; ny = 64; %! cdata = rand (ny, nx)*127; %! hi = image (cdata); # x/ydatamode is auto -%! assert (get (hi, "xdata"), [1 nx]) -%! assert (get (hi, "ydata"), [1 ny]) -%! set (hi, "cdata", cdata(1:2:end, 1:2:end)) -%! assert (get (hi, "xdata"), [1 nx/2]) -%! assert (get (hi, "ydata"), [1 ny/2]) +%! assert (get (hi, "xdata"), [1 nx]); +%! assert (get (hi, "ydata"), [1 ny]); +%! set (hi, "cdata", cdata(1:2:end, 1:2:end)); +%! assert (get (hi, "xdata"), [1 nx/2]); +%! assert (get (hi, "ydata"), [1 ny/2]); %! -%! set (hi, "xdata", [10 100]) # xdatamode is now manual -%! set (hi, "ydata", [10 1000]) # ydatamode is now manual -%! set (hi, "cdata", cdata) -%! assert (get (hi, "xdata"), [10 100]) -%! assert (get (hi, "ydata"), [10 1000]) +%! set (hi, "xdata", [10 100]); # xdatamode is now manual +%! set (hi, "ydata", [10 1000]); # ydatamode is now manual +%! set (hi, "cdata", cdata); +%! assert (get (hi, "xdata"), [10 100]); +%! assert (get (hi, "ydata"), [10 1000]); %! -%! set (hi, "ydata", []) # ydatamode is now auto -%! set (hi, "cdata", cdata(1:2:end, 1:2:end)) -%! assert (get (hi, "xdata"), [10 100]) -%! assert (get (hi, "ydata"), [1 ny/2]) +%! set (hi, "ydata", []); # ydatamode is now auto +%! set (hi, "cdata", cdata(1:2:end, 1:2:end)); +%! assert (get (hi, "xdata"), [10 100]); +%! assert (get (hi, "ydata"), [1 ny/2]); %! unwind_protect_cleanup -%! close (hf) +%! close (hf); %! end_unwind_protect ## FIXME: Need %!tests for linear
--- a/scripts/image/imformats.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/image/imformats.m Fri Apr 01 16:03:29 2016 -0700 @@ -318,15 +318,15 @@ ## This must work, even without support for image IO %!test %! formats = imformats (); -%! assert (isstruct (formats)) +%! assert (isstruct (formats)); %! %! min_fields = {"ext", "read", "isa", "write", "info", "alpha", "description"}; -%! assert (all (ismember (min_fields, fieldnames (formats)))) +%! assert (all (ismember (min_fields, fieldnames (formats)))); %! %! if (__have_feature__ ("MAGICK")) -%! assert (numel (formats) > 0) +%! assert (numel (formats) > 0); %! else -%! assert (numel (formats), 0) +%! assert (numel (formats), 0); %! endif ## When imread or imfinfo are called, the file must exist or the
--- a/scripts/image/imread.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/image/imread.m Fri Apr 01 16:03:29 2016 -0700 @@ -154,9 +154,9 @@ %!testif HAVE_MAGICK %! w = randi (255, 100, 100, "uint8"); %! [r, cmap, a] = write_and_read (w, "tif", "PixelRegion", {[50 70] [20 40]}); -%! assert (r, w(50:70, 20:40)) +%! assert (r, w(50:70, 20:40)); %! [r, cmap, a] = write_and_read (w, "tif", "PixelRegion", {[50 2 70] [20 3 40]}); -%! assert (r, w(50:2:70, 20:3:40)) +%! assert (r, w(50:2:70, 20:3:40)); ## If a file does not exist, it's the job of imread to check the file ## exists before sending it over to __imread__ or whatever function @@ -210,5 +210,5 @@ %! im(:,:,3) = repmat (0:16:255, [16 1]); %! [r, cmap, a] = write_and_read (im, "png"); %! assert (class (r), "uint8"); -%! assert (isempty (cmap)) -%! assert (isempty (a)) +%! assert (isempty (cmap)); +%! assert (isempty (a));
--- a/scripts/image/imshow.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/image/imshow.m Fri Apr 01 16:03:29 2016 -0700 @@ -270,7 +270,7 @@ %! fail ('imshow ([1,1], "parent", -1)', "must be an axes handle"); %! fail ('imshow ([1,1], "xdata", ones (2,2))', "xdata must be a vector"); %! fail ('imshow ([1,1], "ydata", ones (2,2))', "ydata must be a vector"); -%! fail ('imshow ([1,1], "foobar")', "warning", "unrecognized property foobar") +%! fail ('imshow ([1,1], "foobar")', "warning", "unrecognized property foobar"); %! fail ("imshow ([1,1], {1})", "argument number 2 is invalid"); %! fail ("imshow ([1+i,1-i])", "warning", "only showing real part of complex image"); %! unwind_protect_cleanup
--- a/scripts/image/imwrite.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/image/imwrite.m Fri Apr 01 16:03:29 2016 -0700 @@ -144,67 +144,67 @@ %!testif HAVE_MAGICK %! gray = randi (255, 10, 10, 1, "uint8"); %! r = write_and_read (".tif", gray); -%! assert (r, gray) +%! assert (r, gray); ## grayscale uint8 images with alpha channel %!testif HAVE_MAGICK %! gray = randi (255, 10, 10, 1, "uint8"); %! alpha = randi (255, 10, 10, 1, "uint8"); %! [r, ~, a] = write_and_read (".tif", gray, "Alpha", alpha); -%! assert (r, gray) -%! assert (a, alpha) +%! assert (r, gray); +%! assert (a, alpha); ## multipage grayscale uint8 images %!testif HAVE_MAGICK %! gray = randi (255, 10, 10, 1, 5, "uint8"); %! r = write_and_read (".tif", gray); -%! assert (r, gray) +%! assert (r, gray); ## multipage RGB uint8 images with alpha channel %!testif HAVE_MAGICK %! gray = randi (255, 10, 10, 3, 5, "uint8"); %! alpha = randi (255, 10, 10, 1, 5, "uint8"); %! [r, ~, a] = write_and_read (".tif", gray, "Alpha", alpha); -%! assert (r, gray) -%! assert (a, alpha) +%! assert (r, gray); +%! assert (a, alpha); ## typical usage with RGB uint8 images %!testif HAVE_MAGICK %! rgb = randi (255, 10, 10, 3, "uint8"); %! r = write_and_read (".tif", rgb); -%! assert (r, rgb) +%! assert (r, rgb); ## RGB uint8 images with alpha channel %!testif HAVE_MAGICK %! rgb = randi (255, 10, 10, 3, "uint8"); %! alpha = randi (255, 10, 10, 1, "uint8"); %! [r, ~, a] = write_and_read (".tif", rgb, "Alpha", alpha); -%! assert (r, rgb) -%! assert (a, alpha) +%! assert (r, rgb); +%! assert (a, alpha); ## multipage RGB uint8 images %!testif HAVE_MAGICK %! rgb = randi (255, 10, 10, 3, 5, "uint8"); %! r = write_and_read (".tif", rgb); -%! assert (r, rgb) +%! assert (r, rgb); ## multipage RGB uint8 images with alpha channel %!testif HAVE_MAGICK %! rgb = randi (255, 10, 10, 3, 5, "uint8"); %! alpha = randi (255, 10, 10, 1, 5, "uint8"); %! [r, ~, a] = write_and_read (".tif", rgb, "Alpha", alpha); -%! assert (r, rgb) -%! assert (a, alpha) +%! assert (r, rgb); +%! assert (a, alpha); %!testif HAVE_MAGICK %! gray = repmat (uint8 (0:255), 100, 1); %! [g] = write_and_read (".jpeg", gray); -%! assert (g, gray, 2) +%! assert (g, gray, 2); %!testif HAVE_MAGICK %! gray = repmat (uint8 (0:255), 100, 1); %! [g] = write_and_read (".jpeg", gray, "quality", 100); -%! assert (g, gray) +%! assert (g, gray); %!function [compression] = get_bmp_compression (ext, cmap = [], varargin) %! gray = repmat (uint8 (0:255), 100, 1); @@ -228,10 +228,10 @@ ## BMP images must be saved uncompressed by default (bug #45565) %!testif HAVE_MAGICK -%! assert (get_bmp_compression ("", [], "BMP"), 0) -%! assert (get_bmp_compression ("", [], "bmp"), 0) -%! assert (get_bmp_compression (".BMP"), 0) -%! assert (get_bmp_compression (".bmp"), 0) -%! assert (get_bmp_compression (".bmp", [], "bmp"), 0) -%! assert (get_bmp_compression ("", gray (256), "bmp"), 0) -%! assert (get_bmp_compression (".bmp", gray (256), "Compression", "rle"), 1) +%! assert (get_bmp_compression ("", [], "BMP"), 0); +%! assert (get_bmp_compression ("", [], "bmp"), 0); +%! assert (get_bmp_compression (".BMP"), 0); +%! assert (get_bmp_compression (".bmp"), 0); +%! assert (get_bmp_compression (".bmp", [], "bmp"), 0); +%! assert (get_bmp_compression ("", gray (256), "bmp"), 0); +%! assert (get_bmp_compression (".bmp", gray (256), "Compression", "rle"), 1);
--- a/scripts/image/ntsc2rgb.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/image/ntsc2rgb.m Fri Apr 01 16:03:29 2016 -0700 @@ -114,7 +114,7 @@ %! rgb(1) /= rgb(3); # scaled based on the maximum %! rgb(2) = 0; # cut to 0 %! rgb(3) = 1; # cut to 1 -%! assert (ntsc2rgb (ntsc), rgb) +%! assert (ntsc2rgb (ntsc), rgb); ## test scaling when conversion has more than one value above 1 ## (check that it does pick the maximum) @@ -122,18 +122,18 @@ %! ntsc = [0.8229 0.3336 0.7184]; %! rgb = ntsc * trans; # [1.58831 0.26726 1.67642] %! rgb /= rgb(3); -%! assert (ntsc2rgb (ntsc), rgb) +%! assert (ntsc2rgb (ntsc), rgb); ## check scaling for more than 1 row %!test %! ntsc = [0.4229 0.0336 0.7184 %! 0.8229 0.3336 0.7184]; -%! rgb = ntsc * trans; # [0.9014 -0.0509 1.6075; 1.58831 0.26726 1.67642] +%! rgb = ntsc * trans; # [0.9014 -0.0509 1.6075; 1.58831 0.26726 1.67642] %! rgb(1,1) /= rgb(1,3); %! rgb(1,2) = 0; %! rgb(1,3) = 1; %! rgb(2,:) /= rgb(2,3); -%! assert (ntsc2rgb (ntsc), rgb) +%! assert (ntsc2rgb (ntsc), rgb); ## Test input validation %!error ntsc2rgb () @@ -151,37 +151,37 @@ %! for i = 1:5 %! rgb(:,:,:,i) = ntsc2rgb (yiq(:,:,:,i)); %! endfor -%! assert (ntsc2rgb (yiq), rgb) +%! assert (ntsc2rgb (yiq), rgb); ## Test output class and size for input images. ## Most of the tests only test for colormap input. %!test %! rgb = ntsc2rgb (rand (10, 10, 3)); -%! assert (class (rgb), "double") -%! assert (size (rgb), [10 10 3]) +%! assert (class (rgb), "double"); +%! assert (size (rgb), [10 10 3]); %!test %! rgb = ntsc2rgb (rand (10, 10, 3, "single")); -%! assert (class (rgb), "single") -%! assert (size (rgb), [10 10 3]) +%! assert (class (rgb), "single"); +%! assert (size (rgb), [10 10 3]); %!test %! ntsc = (rand (10, 10, 3) * 3 ) - 0.5; # values outside range [0 1] %! rgb = ntsc2rgb (ntsc); -%! assert (class (rgb), "double") -%! assert (size (rgb), [10 10 3]) +%! assert (class (rgb), "double"); +%! assert (size (rgb), [10 10 3]); %!test %! ntsc = (rand (10, 10, 3, "single") * 3 ) - 0.5; # values outside range [0 1] %! rgb = ntsc2rgb (ntsc); -%! assert (class (rgb), "single") -%! assert (size (rgb), [10 10 3]) +%! assert (class (rgb), "single"); +%! assert (size (rgb), [10 10 3]); %!test %! ntsc_double = reshape ([.299 .587 .114 0 .596 -.274 -.322 0 .211 -.523 .312 0], %! [2 2 3]); %! expected = reshape ([1 0 0 0 0 1 0 0 0 0 1 0], [2 2 3]); %! -%! assert (ntsc2rgb (ntsc_double), expected, 1e-5) -%! assert (ntsc2rgb (single (ntsc_double)), single (expected), 1e-5) +%! assert (ntsc2rgb (ntsc_double), expected, 1e-5); +%! assert (ntsc2rgb (single (ntsc_double)), single (expected), 1e-5);
--- a/scripts/image/rgb2hsv.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/image/rgb2hsv.m Fri Apr 01 16:03:29 2016 -0700 @@ -120,47 +120,47 @@ %! for i = 1:5 %! hsv(:,:,:,i) = rgb2hsv (rgb(:,:,:,i)); %! endfor -%! assert (rgb2hsv (rgb), hsv) +%! assert (rgb2hsv (rgb), hsv); ## Test output class and size for input images. ## Most of the tests only test for colormap input. %!test %! hsv = rgb2hsv (rand (10, 10, 3)); -%! assert (class (hsv), "double") -%! assert (size (hsv), [10 10 3]) +%! assert (class (hsv), "double"); +%! assert (size (hsv), [10 10 3]); %!test %! hsv = rgb2hsv (rand (10, 10, 3, "single")); -%! assert (class (hsv), "single") -%! assert (size (hsv), [10 10 3]) +%! assert (class (hsv), "single"); +%! assert (size (hsv), [10 10 3]); %!test %! rgb = (rand (10, 10, 3) * 3 ) - 0.5; # values outside range [0 1] %! hsv = rgb2hsv (rgb); -%! assert (class (hsv), "double") -%! assert (size (hsv), [10 10 3]) +%! assert (class (hsv), "double"); +%! assert (size (hsv), [10 10 3]); %!test %! rgb = (rand (10, 10, 3, "single") * 3 ) - 0.5; # values outside range [0 1] %! hsv = rgb2hsv (rgb); -%! assert (class (hsv), "single") -%! assert (size (hsv), [10 10 3]) +%! assert (class (hsv), "single"); +%! assert (size (hsv), [10 10 3]); %!test %! hsv = rgb2hsv (randi ([0 255], 10, 10, 3, "uint8")); -%! assert (class (hsv), "double") -%! assert (size (hsv), [10 10 3]) +%! assert (class (hsv), "double"); +%! assert (size (hsv), [10 10 3]); %!test %! hsv = rgb2hsv (randi ([0 65535], 10, 10, 3, "uint16")); -%! assert (class (hsv), "double") -%! assert (size (hsv), [10 10 3]) +%! assert (class (hsv), "double"); +%! assert (size (hsv), [10 10 3]); %!test %! hsv = rgb2hsv (randi ([-128 127], 10, 10, 3, "int8")); -%! assert (class (hsv), "double") -%! assert (size (hsv), [10 10 3]) +%! assert (class (hsv), "double"); +%! assert (size (hsv), [10 10 3]); %!test %! rgb_double = reshape ([1 0 1 .5 1 1 0 .5 0 1 1 .5], [2 2 3]); @@ -169,7 +169,7 @@ %! rgb_int16 = int16 (double (rgb_double * uint16 (65535)) -32768); %! expected = reshape ([1/6 1/2 5/6 0 1 1 1 0 1 1 1 .5], [2 2 3]); %! -%! assert (rgb2hsv (rgb_double), expected) -%! assert (rgb2hsv (rgb_uint8), expected, 0.005) -%! assert (rgb2hsv (single (rgb_double)), single (expected)) +%! assert (rgb2hsv (rgb_double), expected); +%! assert (rgb2hsv (rgb_uint8), expected, 0.005); +%! assert (rgb2hsv (single (rgb_double)), single (expected));
--- a/scripts/image/rgb2ntsc.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/image/rgb2ntsc.m Fri Apr 01 16:03:29 2016 -0700 @@ -98,47 +98,47 @@ %! for i = 1:5 %! yiq(:,:,:,i) = rgb2ntsc (rgb(:,:,:,i)); %! endfor -%! assert (rgb2ntsc (rgb), yiq) +%! assert (rgb2ntsc (rgb), yiq); ## Test output class and size for input images. ## Most of the tests only test for colormap input. %!test %! ntsc = rgb2ntsc (rand (10, 10, 3)); -%! assert (class (ntsc), "double") -%! assert (size (ntsc), [10 10 3]) +%! assert (class (ntsc), "double"); +%! assert (size (ntsc), [10 10 3]); %!test %! ntsc = rgb2ntsc (rand (10, 10, 3, "single")); -%! assert (class (ntsc), "single") -%! assert (size (ntsc), [10 10 3]) +%! assert (class (ntsc), "single"); +%! assert (size (ntsc), [10 10 3]); %!test %! rgb = (rand (10, 10, 3) * 3 ) - 0.5; # values outside range [0 1] %! ntsc = rgb2ntsc (rgb); -%! assert (class (ntsc), "double") -%! assert (size (ntsc), [10 10 3]) +%! assert (class (ntsc), "double"); +%! assert (size (ntsc), [10 10 3]); %!test %! rgb = (rand (10, 10, 3, "single") * 3 ) - 0.5; # values outside range [0 1] %! ntsc = rgb2ntsc (rgb); -%! assert (class (ntsc), "single") -%! assert (size (ntsc), [10 10 3]) +%! assert (class (ntsc), "single"); +%! assert (size (ntsc), [10 10 3]); %!test %! ntsc = rgb2ntsc (randi ([0 255], 10, 10, 3, "uint8")); -%! assert (class (ntsc), "double") -%! assert (size (ntsc), [10 10 3]) +%! assert (class (ntsc), "double"); +%! assert (size (ntsc), [10 10 3]); %!test %! ntsc = rgb2ntsc (randi ([0 65535], 10, 10, 3, "uint16")); -%! assert (class (ntsc), "double") -%! assert (size (ntsc), [10 10 3]) +%! assert (class (ntsc), "double"); +%! assert (size (ntsc), [10 10 3]); %!test %! ntsc = rgb2ntsc (randi ([-128 127], 10, 10, 3, "int8")); -%! assert (class (ntsc), "double") -%! assert (size (ntsc), [10 10 3]) +%! assert (class (ntsc), "double"); +%! assert (size (ntsc), [10 10 3]); %!test %! rgb_double = reshape ([1 0 0 0 0 1 0 0 0 0 1 0], [2 2 3]); @@ -148,6 +148,6 @@ %! expected = reshape ([.299 .587 .114 0 .596 -.274 -.322 0 .211 -.523 .312 0], %! [2 2 3]); %! -%! assert (rgb2ntsc (rgb_double), expected) -%! assert (rgb2ntsc (rgb_uint8), expected) -%! assert (rgb2ntsc (single (rgb_double)), single (expected)) +%! assert (rgb2ntsc (rgb_double), expected); +%! assert (rgb2ntsc (rgb_uint8), expected); +%! assert (rgb2ntsc (single (rgb_double)), single (expected));
--- a/scripts/linear-algebra/isbanded.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/linear-algebra/isbanded.m Fri Apr 01 16:03:29 2016 -0700 @@ -70,9 +70,9 @@ %!assert (isbanded (logical (eye (10)),1,1)) %! A = [2 3 0 0 0; 1 2 3 0 0; 0 1 2 3 0; 0 0 1 2 3; 0 0 0 1 2]; -%! assert (isbanded (A,1,1)) -%! assert (! isbanded (A,0,1)) -%! assert (! isbanded (A,1,0)) +%! assert (isbanded (A,1,1)); +%! assert (! isbanded (A,0,1)); +%! assert (! isbanded (A,1,0)); ## Test input validation %!error isbanded ()
--- a/scripts/linear-algebra/onenormest.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/linear-algebra/onenormest.m Fri Apr 01 16:03:29 2016 -0700 @@ -281,7 +281,7 @@ %!test %! old_state = rand ("state"); %! restore_state = onCleanup (@() rand ("state", old_state)); -%! rand ('state', 42); % Initialize to guarantee reproducible results +%! rand ("state", 42); # Initialize to guarantee reproducible results %! N = 100; %! A = rand (N); %! [nm1, v1, w1] = onenormest (A);
--- a/scripts/miscellaneous/edit.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/miscellaneous/edit.m Fri Apr 01 16:03:29 2016 -0700 @@ -570,7 +570,7 @@ %! edit author none %! edit email none %! edit license none -%! edit ("editinplace", ! s.editinplace) +%! edit ("editinplace", ! s.editinplace); %! if (s.mode(1) == "a") %! edit mode sync %! else
--- a/scripts/miscellaneous/fullfile.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/miscellaneous/fullfile.m Fri Apr 01 16:03:29 2016 -0700 @@ -115,7 +115,7 @@ ## *nix specific - double backslash %!test %! if (isunix || ismac) -%! assert (fullfile (fs, fs), fs) +%! assert (fullfile (fs, fs), fs); %! endif ## Windows specific - drive letters and file sep type, cell array
--- a/scripts/miscellaneous/license.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/miscellaneous/license.m Fri Apr 01 16:03:29 2016 -0700 @@ -172,7 +172,7 @@ %!test %! for idx = 1: numel (list) -%! assert (license ("test", list{idx}.name), true) +%! assert (license ("test", list{idx}.name), true); %! endfor %!assert (license ("checkout", "octave"), true)
--- a/scripts/ode/ode23.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/ode/ode23.m Fri Apr 01 16:03:29 2016 -0700 @@ -418,7 +418,7 @@ %! jac = [0, 1; -1 - 2 * y(1) * y(2), 1 - y(1)^2]; %!endfunction %!function jac = fjcc (t, y, varargin) # sparse type -%! jac = sparse ([0, 1; -1 - 2 * y(1) * y(2), 1 - y(1)^2]) +%! jac = sparse ([0, 1; -1 - 2 * y(1) * y(2), 1 - y(1)^2]); %!endfunction %!function [val, trm, dir] = feve (t, y, varargin) %! val = fpol (t, y, varargin); # We use the derivatives @@ -536,8 +536,8 @@ %! warning ("off", "integrate_adaptive:unexpected_termination", "local"); %! opt = odeset ("Events", @fevn, "NormControl", "on"); %! sol = ode23 (@fpol, [0 10], [2 0], opt); -%! assert ([sol.ie, sol.xe, sol.ye], ... -%! [2.0, 2.496110, -0.830550, -2.677589], .5e-1); +%! assert ([sol.ie, sol.xe, sol.ye], +%! [2.0, 2.496110, -0.830550, -2.677589], .5e-1); %!test # Events option, five output arguments %! warning ("off", "integrate_adaptive:unexpected_termination", "local"); %! opt = odeset ("Events", @fevn, "NormControl", "on");
--- a/scripts/ode/ode45.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/ode/ode45.m Fri Apr 01 16:03:29 2016 -0700 @@ -403,7 +403,7 @@ %! jac = [0, 1; -1 - 2 * y(1) * y(2), 1 - y(1)^2]; %!endfunction %!function jac = fjcc (t, y, varargin) # sparse type -%! jac = sparse ([0, 1; -1 - 2 * y(1) * y(2), 1 - y(1)^2]) +%! jac = sparse ([0, 1; -1 - 2 * y(1) * y(2), 1 - y(1)^2]); %!endfunction %!function [val, trm, dir] = feve (t, y, varargin) %! val = fpol (t, y, varargin); # We use the derivatives
--- a/scripts/optimization/glpk.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/optimization/glpk.m Fri Apr 01 16:03:29 2016 -0700 @@ -612,9 +612,9 @@ %! param.lpsolver = 1; %! [xmin, fmin, errnum, extra] = glpk (c, A, b, lb, ub, ctype, vartype, ... %! sense, param); -%! assert (fmin, c' * xmin) +%! assert (fmin, c' * xmin); %! for i = 1:3 -%! assert (A(i,:) * xmin <= b(i)) +%! assert (A(i,:) * xmin <= b(i)); %! endfor %!testif HAVE_GLPK @@ -629,9 +629,9 @@ %! param.msglev = 0; %! [xmin, fmin, errnum, extra] = glpk (c, A, b, lb, ub, ctype, vartype, ... %! sense, param); -%! assert (fmin, c' * xmin) +%! assert (fmin, c' * xmin); %! for i = 1:2 -%! assert (A(i,:) * xmin <= b(i)) +%! assert (A(i,:) * xmin <= b(i)); %! endfor @@ -647,5 +647,5 @@ %! param.msglev = 0; %! [xmin, fmin, errnum, extra] = glpk (c, A, b, lb, ub, ctype, vartype, ... %! sense, param); -%! assert (fmin, c' * xmin) -%! assert (A * xmin, b) +%! assert (fmin, c' * xmin); +%! assert (A * xmin, b);
--- a/scripts/plot/appearance/annotation.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/appearance/annotation.m Fri Apr 01 16:03:29 2016 -0700 @@ -1247,7 +1247,7 @@ %! {'Right Click on annotation objects', ... %! 'to customize their appearance'}, ... %! 'horizontalalignment', 'center', 'fitboxtotext', 'off'); -%! annotation ('ellipse', [.2 .2 .6 .6], 'linewidth', 4) +%! annotation ('ellipse', [.2 .2 .6 .6], 'linewidth', 4); %! ang = pi/2:-pi/2:-pi; %! lab = {'N', 'W', 'S', 'E'}; %! x0 = 0.5; @@ -1267,9 +1267,9 @@ %!demo %! clf; axes ('visible', 'off'); %! plot (1:10); -%! xlabel ('X-LABEL') -%! ylabel ('LARGE Y-LABEL', 'fontsize', 20) -%! title ('FIGURE LAYOUT', 'fontsize', 24) +%! xlabel ('X-LABEL'); +%! ylabel ('LARGE Y-LABEL', 'fontsize', 20); +%! title ('FIGURE LAYOUT', 'fontsize', 24); %! %! ti = get (gca, 'tightinset'); %! pos = get (gca, 'position'); @@ -1300,7 +1300,7 @@ %! %! %% Get allowed headstyles %! styles = set (h, 'headstyle'); -%! delete (h) +%! delete (h); %! %! %% Textbox for the title %! annotation ('textbox', [0.1 0 0.8 1], 'string', ... @@ -1329,7 +1329,7 @@ %! end %! y = y - dy; %! end -%! annotation ('line', [0.5 0.5], [dy/2 1-dy/2], 'linestyle', '-.') +%! annotation ('line', [0.5 0.5], [dy/2 1-dy/2], 'linestyle', '-.'); %!demo %! clf; axes ('visible', 'off'); @@ -1375,7 +1375,7 @@ %! %! x = 0:0.01:2*pi; %! y = sin (x); -%! plot (x, y) +%! plot (x, y); %! %! %% Extrema %! x0 = [pi/2 3*pi/2]; @@ -1402,7 +1402,7 @@ %! h = annotation ('textarrow', [0.5 x0(ii)], [.85 y0(ii)], ... %! 'linestyle', '--', 'headstyle', 'none'); %! end -%! set (h, 'string', 'Extrema', 'fontsize', 15) +%! set (h, 'string', 'Extrema', 'fontsize', 15); ## test line properties %!test @@ -1417,7 +1417,7 @@ %! assert (get (hli, "color"), [1 0 0]); %! assert (gca (), hax); %! unwind_protect_cleanup -%! close (hf) +%! close (hf); %! end_unwind_protect ## test textarrow properties @@ -1433,7 +1433,7 @@ %! assert (get (hte, "rotation"), 90); %! assert (get (hte, "color"), [1 0 0]); %! unwind_protect_cleanup -%! close (hf) +%! close (hf); %! end_unwind_protect ## test textbox properties @@ -1451,7 +1451,7 @@ %! assert (get (hte, "horizontalalignment"), "left"); %! assert (get (hpa, "facecolor"), [1 0 0]); %! unwind_protect_cleanup -%! close (hf) +%! close (hf); %! end_unwind_protect ## test units conversion @@ -1468,7 +1468,7 @@ %! assert (get (h, "x"), x * 2.54, 20*eps); %! assert (get (h, "y"), y * 2.54, 20*eps); %! unwind_protect_cleanup -%! close (hf) +%! close (hf); %! end_unwind_protect ## test annotated figure @@ -1480,8 +1480,8 @@ %! assert (ancestor (h, "figure"), hf1); %! assert (gcf (), hf2); %! unwind_protect_cleanup -%! close (hf1) -%! close (hf2) +%! close (hf1); +%! close (hf2); %! end_unwind_protect ## Test input validation
--- a/scripts/plot/appearance/legend.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/appearance/legend.m Fri Apr 01 16:03:29 2016 -0700 @@ -1313,7 +1313,7 @@ %!demo %! clf; %! plot (1:10, 1:10, 1:10, fliplr (1:10)); -%! title ('Legend is hidden') +%! title ('Legend is hidden'); %! legend ({'I am blue', 'I am green'}, 'location', 'east'); %! legend hide @@ -1395,7 +1395,7 @@ %! clf; %! colormap (cool (64)); %! surf (peaks ()); -%! legend ('peaks()') +%! legend ('peaks()'); %! title ('legend() works for surface objects too'); %!demo @@ -1649,10 +1649,10 @@ %! hax2 = subplot (1,2,2); %! plot (1:10); %! hleg1 = legend (hax1, "foo"); -%! assert (get (hleg1, "userdata").handle, hax1) +%! assert (get (hleg1, "userdata").handle, hax1); %! assert (gca (), hax2); %! hleg2 = legend ("bar"); -%! assert (get (hleg2, "userdata").handle, gca ()) +%! assert (get (hleg2, "userdata").handle, gca ()); %! unwind_protect_cleanup %! close (h); %! end_unwind_protect
--- a/scripts/plot/appearance/orient.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/appearance/orient.m Fri Apr 01 16:03:29 2016 -0700 @@ -127,13 +127,13 @@ %!test %! orient portrait; -%! assert (orient, "portrait") # default +%! assert (orient, "portrait"); # default %! assert (get (hfig, "papersize"), papersize); %! assert (get (hfig, "paperposition"), paperposition); %!test %! orient landscape; -%! assert (orient,"landscape") # change to landscape +%! assert (orient,"landscape"); # change to landscape %! assert (get (hfig, "papersize"), papersize([2, 1])); %! assert (get (hfig, "paperposition"), fullpaperposition([1, 2, 4, 3]));
--- a/scripts/plot/appearance/text.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/appearance/text.m Fri Apr 01 16:03:29 2016 -0700 @@ -343,9 +343,9 @@ %! %! ## Test special keyword processing %! h = text (0.5, 0.5, "default"); -%! assert (get (h, "string"), "default") +%! assert (get (h, "string"), "default"); %! h = text (0.5, 0.5, "factory"); -%! assert (get (h, "string"), "factory") +%! assert (get (h, "string"), "factory"); %! %! unwind_protect_cleanup %! close (hf);
--- a/scripts/plot/draw/area.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/draw/area.m Fri Apr 01 16:03:29 2016 -0700 @@ -268,7 +268,7 @@ %! x = 0:10; %! y = rand (size (x)); %! h = area (x, y); -%! set (h, 'ydata', sort (get (h, 'ydata'))) +%! set (h, 'ydata', sort (get (h, 'ydata'))); %! title ('area() plot of sorted data'); ## Test input validation
--- a/scripts/plot/draw/barh.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/draw/barh.m Fri Apr 01 16:03:29 2016 -0700 @@ -80,13 +80,13 @@ %! clf; %! x = rand (10, 1); %! barh (x); -%! title ('barh() graph') +%! title ('barh() graph'); %!demo %! clf; %! h = barh (rand (5, 3)); -%! set (h(1), 'facecolor', 'r') -%! set (h(2), 'facecolor', 'g') -%! set (h(3), 'facecolor', 'b') -%! title ('barh() graph w/multiple bars') +%! set (h(1), 'facecolor', 'r'); +%! set (h(2), 'facecolor', 'g'); +%! set (h(3), 'facecolor', 'b'); +%! title ('barh() graph w/multiple bars');
--- a/scripts/plot/draw/contour.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/draw/contour.m Fri Apr 01 16:03:29 2016 -0700 @@ -117,8 +117,8 @@ %! [c, h] = contour (x, y, z); %! levellist = -6:6; %! set (h, "levellist", levellist); -%! assert (get (h, "levellist"), levellist) -%! assert (get (h, "levellistmode"), "manual") +%! assert (get (h, "levellist"), levellist); +%! assert (get (h, "levellistmode"), "manual"); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect @@ -131,10 +131,10 @@ %! [c, h] = contour (x, y, z); %! levelstep = 3; %! set (h, "levelstep", levelstep); -%! assert (get (h, "levelstep"), levelstep) -%! assert (get (h, "levelstepmode"), "manual") -%! assert (get (h, "levellist"), -6:levelstep:6) -%! assert (get (h, "levellistmode"), "auto") +%! assert (get (h, "levelstep"), levelstep); +%! assert (get (h, "levelstepmode"), "manual"); +%! assert (get (h, "levellist"), -6:levelstep:6); +%! assert (get (h, "levellistmode"), "auto"); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect
--- a/scripts/plot/draw/line.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/draw/line.m Fri Apr 01 16:03:29 2016 -0700 @@ -63,7 +63,7 @@ %!demo -%! clf +%! clf; %! line ([0 1], [0.8 0.8], 'linestyle', '-', 'color', 'b'); %! line ([0 1], [0.6 0.6], 'linestyle', '--', 'color', 'g'); %! line ([0 1], [0.4 0.4], 'linestyle', ':', 'color', 'r'); @@ -73,7 +73,7 @@ %! legend ('"-"', '"--"', '":"', '"-."', 'location', 'eastoutside'); %!demo -%! clf +%! clf; %! x = 0:0.3:10; %! y1 = cos (x); %! y2 = sin (x);
--- a/scripts/plot/draw/plot.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/draw/plot.m Fri Apr 01 16:03:29 2016 -0700 @@ -253,35 +253,35 @@ %!demo %! x = 0:10; -%! plot (x, rand (numel (x), 3)) -%! axis ([0 10 0 1]) -%! title ({'Three random variables', 'x[1x11], y[11x3]'}) +%! plot (x, rand (numel (x), 3)); +%! axis ([0 10 0 1]); +%! title ({'Three random variables', 'x[1x11], y[11x3]'}); %!demo %! x = 0:10; -%! plot (x, rand (3, numel (x))) -%! axis ([0 10 0 1]) -%! title ({'Three random variables', 'x[1x11], y[3x11]'}) +%! plot (x, rand (3, numel (x))); +%! axis ([0 10 0 1]); +%! title ({'Three random variables', 'x[1x11], y[3x11]'}); %!demo %! x = 0:10; -%! plot (repmat (x, 2, 1), rand (2, numel (x)), '-s') -%! axis ([0 10 0 1]) +%! plot (repmat (x, 2, 1), rand (2, numel (x)), '-s'); +%! axis ([0 10 0 1]); %! title ({'Vertical lines with random height and lengths', ... %! 'x[2x11], y[2,11]'}) %!demo %! x = 0:10; -%! plot (repmat (x(:), 1, 2), rand (numel (x), 2)) -%! axis ([0 10 0 1]) -%! title ({'Two random variables', 'x[11x2], y[11x2]'}) +%! plot (repmat (x(:), 1, 2), rand (numel (x), 2)); +%! axis ([0 10 0 1]); +%! title ({'Two random variables', 'x[11x2], y[11x2]'}); %!demo %! x = 0:10; %! shape = [1, 1, numel(x), 2]; %! x = reshape (repmat (x(:), 1, 2), shape); %! y = rand (shape); -%! plot (x, y) -%! axis ([0 10 0 1]) -%! title ({'Two random variables', 'squeezed from 4-d arrays'}) +%! plot (x, y); +%! axis ([0 10 0 1]); +%! title ({'Two random variables', 'squeezed from 4-d arrays'});
--- a/scripts/plot/draw/plot3.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/draw/plot3.m Fri Apr 01 16:03:29 2016 -0700 @@ -377,7 +377,7 @@ %!demo %! clf; %! z = [0:0.05:5]; -%! plot3 (cos (2*pi*z), sin (2*pi*z), z) +%! plot3 (cos (2*pi*z), sin (2*pi*z), z); %! legend ('helix'); %! title ('plot3() of a helix');
--- a/scripts/plot/draw/plotyy.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/draw/plotyy.m Fri Apr 01 16:03:29 2016 -0700 @@ -298,7 +298,7 @@ %! axis square; %!demo -%! clf +%! clf; %! hold on %! t = (0:0.1:9); %! x = sin (t);
--- a/scripts/plot/draw/quiver.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/draw/quiver.m Fri Apr 01 16:03:29 2016 -0700 @@ -97,7 +97,7 @@ %! clf; %! [x,y] = meshgrid (1:2:20); %! h = quiver (x,y, sin (2*pi*x/10), sin (2*pi*y/10)); -%! title ('quiver plot') +%! title ('quiver plot'); %!demo %! clf;
--- a/scripts/plot/draw/stem.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/draw/stem.m Fri Apr 01 16:03:29 2016 -0700 @@ -199,7 +199,7 @@ %! set (gca (), 'xlim', [1, N-1], 'ylim', [0, 1]); %! title ('stem plot data modified through hggroup handle'); %! for k=2:N -%! set (hs, 'xdata', x(1:k), 'ydata', y(1:k)) +%! set (hs, 'xdata', x(1:k), 'ydata', y(1:k)); %! drawnow (); %! pause (0.2); %! end @@ -209,12 +209,12 @@ %! hf = figure ("visible", "off"); %! unwind_protect %! h = stem ([1 2; 1.5 2.5], [1 1;2 2]); -%! assert (get (h(1), "baseline"), get (h(2), "baseline")) +%! assert (get (h(1), "baseline"), get (h(2), "baseline")); %! bv = 0.3; -%! set (h(1), "basevalue", bv) -%! assert (get (get (h(1), "baseline"), "basevalue"), bv) -%! assert (get (h(1), "basevalue"), bv) -%! assert (get (h(2), "basevalue"), bv) +%! set (h(1), "basevalue", bv); +%! assert (get (get (h(1), "baseline"), "basevalue"), bv); +%! assert (get (h(1), "basevalue"), bv); +%! assert (get (h(2), "basevalue"), bv); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect
--- a/scripts/plot/util/clf.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/util/clf.m Fri Apr 01 16:03:29 2016 -0700 @@ -110,7 +110,7 @@ %! end_unwind_protect %!xtest -%! set (0, "defaultfigurevisible", "off") +%! set (0, "defaultfigurevisible", "off"); %! hf = figure ("visible", "off"); %! unwind_protect %! plot (1:10); @@ -124,7 +124,7 @@ %! assert (isempty (get (gcf, "children"))); %! assert (get (hf, "papertype"), "usletter"); %! unwind_protect_cleanup -%! set (0, "defaultfigurevisible", "remove") +%! set (0, "defaultfigurevisible", "remove"); %! close (hf); %! end_unwind_protect
--- a/scripts/plot/util/copyobj.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/util/copyobj.m Fri Apr 01 16:03:29 2016 -0700 @@ -174,11 +174,11 @@ %! hf = figure ("visible", "off"); %! hax = axes ("tag", tag); %! hpa = patch (); -%! set (hpa, "facecolor", [.5 .5 .5], "tag", tag) +%! set (hpa, "facecolor", [.5 .5 .5], "tag", tag); %! hax2 = copyobj (hax, hf); -%! assert (get (hax2, "tag"), tag) +%! assert (get (hax2, "tag"), tag); %! hpa2 = get (hax2, "children"); -%! assert (get (hpa2, "facecolor"), [.5 .5 .5]) +%! assert (get (hpa2, "facecolor"), [.5 .5 .5]); %! unwind_protect_cleanup -%! close (hf) +%! close (hf); %! end_unwind_protect
--- a/scripts/plot/util/findobj.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/util/findobj.m Fri Apr 01 16:03:29 2016 -0700 @@ -361,7 +361,7 @@ %! h3 = subplot (2,2,3, "tag", "3"); %! h4 = subplot (2,2,4, "tag", "4"); %! h = findobj (hf, "type", "axes", "-not", "tag", "1"); -%! assert (h, [h4; h3; h2]) +%! assert (h, [h4; h3; h2]); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect @@ -382,7 +382,7 @@ %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect -%! assert (h, [h4; h3; h2]) +%! assert (h, [h4; h3; h2]); %!test %! hf = figure ("visible", "off"); @@ -393,9 +393,9 @@ %! "-or", "parent", hf, %! "-and", "type", "axes"); %! unwind_protect_cleanup -%! close (hf) +%! close (hf); %! end_unwind_protect -%! assert (h, [hf; ha]) +%! assert (h, [hf; ha]); %!test %! hf = figure ("visible", "off");
--- a/scripts/plot/util/subplot.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/plot/util/subplot.m Fri Apr 01 16:03:29 2016 -0700 @@ -491,23 +491,23 @@ %! x = 0:10; %! ax(1) = subplot (221); %! set (ax(1), 'tag', '1'); -%! plot (x, rand (3, 11)) +%! plot (x, rand (3, 11)); %! title ('x & y labels & ticklabels'); %! xlabel xlabel %! ylabel ylabel %! ax(2) = subplot (222); %! set (ax(2), 'tag', '2'); -%! plot (x, rand (3, 11)) +%! plot (x, rand (3, 11)); %! title ('no labels'); -%! axis ('nolabel','tic') +%! axis ('nolabel','tic'); %! ax(3) = subplot (223); %! set (ax(3), 'tag', '3'); -%! plot (x, rand (3, 11)) +%! plot (x, rand (3, 11)); %! title ('no labels'); -%! axis ('nolabel','tic') +%! axis ('nolabel','tic'); %! ax(4) = subplot (224); %! set (ax(4), 'tag', '4'); -%! plot (x, rand (3, 11)) +%! plot (x, rand (3, 11)); %! title ('x & y labels & ticklabels'); %! xlabel xlabel %! ylabel ylabel @@ -515,7 +515,7 @@ %!demo %! x = 0:10; %! subplot (221); -%! plot (x, rand (3, 11)) +%! plot (x, rand (3, 11)); %! ylim ([0, 1]); %! text (0.5, 0.5, '{x,y}labels & {x,y}ticklabels', ... %! 'horizontalalignment', 'center', ... @@ -524,14 +524,14 @@ %! ylabel ylabel %! title title %! subplot (222); -%! plot (x, rand (3, 11)) +%! plot (x, rand (3, 11)); %! axis ('labely'); %! ylabel ylabel %! text (0.5, 0.5, 'no xlabels, xticklabels', ... %! 'horizontalalignment', 'center', ... %! 'units', 'normalized'); %! subplot (223); -%! plot (x, rand (3, 11)) +%! plot (x, rand (3, 11)); %! axis ('labelx'); %! text (0.5, 0.5, 'no ylabels, yticklabels', ... %! 'horizontalalignment', 'center', ... @@ -539,7 +539,7 @@ %! xlabel xlabel %! title title %! subplot (224); -%! plot (x, rand (3, 11)) +%! plot (x, rand (3, 11)); %! axis ('nolabel','tic'); %! text (0.5, 0.5, 'no {x,y}labels, {x,y}ticklabels', ... %! 'horizontalalignment', 'center', ...
--- a/scripts/polynomial/ppval.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/polynomial/ppval.m Fri Apr 01 16:03:29 2016 -0700 @@ -129,7 +129,7 @@ %! ret = zeros (2, 4, 2); %! ret(:,:,1) = ppval (pp, breaks'); %! ret(:,:,2) = ppval (pp, breaks'); -%! assert (ppval (pp, [breaks',breaks']), ret) +%! assert (ppval (pp, [breaks',breaks']), ret); ## Test input validation %!error ppval ()
--- a/scripts/polynomial/splinefit.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/polynomial/splinefit.m Fri Apr 01 16:03:29 2016 -0700 @@ -154,12 +154,12 @@ %! breaks = [0:5, 2*pi]; %! % Fit a spline of order 5 %! pp = splinefit (x, y, breaks, "order", 4); -%! clf () -%! plot (x, y, "s", x, ppval (pp, x), "r", breaks, ppval (pp, breaks), "+r") -%! xlabel ("Independent Variable") -%! ylabel ("Dependent Variable") +%! clf; +%! plot (x, y, "s", x, ppval (pp, x), "r", breaks, ppval (pp, breaks), "+r"); +%! xlabel ("Independent Variable"); +%! ylabel ("Dependent Variable"); %! title ("Fit a piece-wise polynomial of order 4"); -%! legend ({"data", "fit", "breaks"}) +%! legend ({"data", "fit", "breaks"}); %! axis tight %! ylim auto @@ -171,12 +171,12 @@ %! breaks = [0:5, 2*pi]; %! % Fit a spline of order 3 with periodic boundary conditions %! pp = splinefit (x, y, breaks, "order", 2, "periodic", true); -%! clf () -%! plot (x, y, "s", x, ppval (pp, x), "r", breaks, ppval (pp, breaks), "+r") -%! xlabel ("Independent Variable") -%! ylabel ("Dependent Variable") +%! clf; +%! plot (x, y, "s", x, ppval (pp, x), "r", breaks, ppval (pp, breaks), "+r"); +%! xlabel ("Independent Variable"); +%! ylabel ("Dependent Variable"); %! title ("Fit a periodic piece-wise polynomial of order 2"); -%! legend ({"data", "fit", "breaks"}) +%! legend ({"data", "fit", "breaks"}); %! axis tight %! ylim auto @@ -193,12 +193,12 @@ %! con = struct ("xc", xc, "yc", yc, "cc", cc); %! % Fit a cubic spline with 8 pieces and constraints %! pp = splinefit (x, y, 8, "constraints", con); -%! clf () -%! plot (x, y, "s", x, ppval (pp, x), "r", breaks, ppval (pp, breaks), "+r") -%! xlabel ("Independent Variable") -%! ylabel ("Dependent Variable") -%! title ("Fit a cubic spline with constraints") -%! legend ({"data", "fit", "breaks"}) +%! clf; +%! plot (x, y, "s", x, ppval (pp, x), "r", breaks, ppval (pp, breaks), "+r"); +%! xlabel ("Independent Variable"); +%! ylabel ("Dependent Variable"); +%! title ("Fit a cubic spline with constraints"); +%! legend ({"data", "fit", "breaks"}); %! axis tight %! ylim auto @@ -214,12 +214,12 @@ %! con = struct ("xc", xc, "yc", yc, "cc", cc); %! % Fit a spline of order 6 with constraints and periodicity %! pp = splinefit (x, y, breaks, "constraints", con, "order", 5, "periodic", true); -%! clf () -%! plot (x, y, "s", x, ppval (pp, x), "r", breaks, ppval (pp, breaks), "+r") -%! xlabel ("Independent Variable") -%! ylabel ("Dependent Variable") -%! title ("Fit a 5th order piece-wise periodic polynomial with constraints") -%! legend ({"data", "fit", "breaks"}) +%! clf; +%! plot (x, y, "s", x, ppval (pp, x), "r", breaks, ppval (pp, breaks), "+r"); +%! xlabel ("Independent Variable"); +%! ylabel ("Dependent Variable"); +%! title ("Fit a 5th order piece-wise periodic polynomial with constraints"); +%! legend ({"data", "fit", "breaks"}); %! axis tight %! ylim auto
--- a/scripts/set/ismember.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/set/ismember.m Fri Apr 01 16:03:29 2016 -0700 @@ -163,37 +163,37 @@ %!test %! [result, s_idx] = ismember ([1, 2], []); -%! assert (result, [false false]) +%! assert (result, [false false]); %! assert (s_idx, [0, 0]); %!test %! [result, s_idx] = ismember ([], [1, 2]); -%! assert (result, logical ([])) +%! assert (result, logical ([])); %! assert (s_idx, []); %!test %! [result, s_idx] = ismember ({"a", "b"}, ""); -%! assert (result, [false false]) +%! assert (result, [false false]); %! assert (s_idx, [0, 0]); %!test %! [result, s_idx] = ismember ({"a", "b"}, {}); -%! assert (result, [false false]) +%! assert (result, [false false]); %! assert (s_idx, [0, 0]); %!test %! [result, s_idx] = ismember ("", {"a", "b"}); -%! assert (result, false) +%! assert (result, false); %! assert (s_idx, 0); %!test %! [result, s_idx] = ismember ({}, {"a", "b"}); -%! assert (result, logical ([])) +%! assert (result, logical ([])); %! assert (s_idx, []); %!test %! [result, s_idx] = ismember ([1 2 3 4 5], [3]); -%! assert (result, logical ([0 0 1 0 0])) +%! assert (result, logical ([0 0 1 0 0])); %! assert (s_idx , [0 0 1 0 0]); %!test
--- a/scripts/signal/freqz.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/signal/freqz.m Fri Apr 01 16:03:29 2016 -0700 @@ -208,7 +208,7 @@ %! [h,w] = freqz (b,a,32); %! assert (h(1),1,10*eps); %! assert (abs (h(17)).^2,0.5,10*eps); -%! assert (h,freqz (b,a,w),10*eps); # fft should be consistent with polyval +%! assert (h,freqz (b,a,w),10*eps); # fft should be consistent with polyval %!test # whole-half consistency %! b = [1 1 1]/3; # 3-sample average
--- a/scripts/signal/unwrap.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/signal/unwrap.m Fri Apr 01 16:03:29 2016 -0700 @@ -125,9 +125,9 @@ %!test %! A = [pi*(-4), pi*(-2+1/6), pi/4, pi*(2+1/3), pi*(4+1/2), pi*(8+2/3), pi*(16+1), pi*(32+3/2), pi*64]; -%! assert (unwrap (A), unwrap (A, pi)) -%! assert (unwrap (A, pi), unwrap (A, pi, 2)) -%! assert (unwrap (A', pi), unwrap (A', pi, 1)) +%! assert (unwrap (A), unwrap (A, pi)); +%! assert (unwrap (A, pi), unwrap (A, pi, 2)); +%! assert (unwrap (A', pi), unwrap (A', pi, 1)); %!test %! A = [pi*(-4); pi*(2+1/3); pi*(16+1)]; @@ -138,13 +138,13 @@ %! E(:, :, 2) = [A+B, B+C, C+D, D+A]; %! F(:, :, 1) = [unwrap(A), unwrap(B), unwrap(C), unwrap(D)]; %! F(:, :, 2) = [unwrap(A+B), unwrap(B+C), unwrap(C+D), unwrap(D+A)]; -%! assert (unwrap (E), F) +%! assert (unwrap (E), F); %!test %! A = [0, 2*pi, 4*pi, 8*pi, 16*pi, 65536*pi]; %! B = [pi*(-2+1/6), pi/4, pi*(2+1/3), pi*(4+1/2), pi*(8+2/3), pi*(16+1), pi*(32+3/2), pi*64]; -%! assert (unwrap (A), zeros (1, length (A))) -%! assert (diff (unwrap (B), 1) < 2*pi, true (1, length (B)-1)) +%! assert (unwrap (A), zeros (1, length (A))); +%! assert (diff (unwrap (B), 1) < 2*pi, true (1, length (B)-1)); ## Test input validation %!error unwrap ()
--- a/scripts/sparse/eigs.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/sparse/eigs.m Fri Apr 01 16:03:29 2016 -0700 @@ -497,7 +497,7 @@ %! d0 = eig (A); %! [~, idx] = sort (abs (d0)); %! d0 = d0(idx); -%! rand ("state", 42); % initialize generator to make eigs behavior reproducible +%! rand ("state", 42); # initialize generator to make eigs behavior reproducible %!testif HAVE_ARPACK %! d1 = eigs (A, k); %! assert (abs (d1), abs (d0(end:-1:(end-k+1))), 1e-11); @@ -624,7 +624,7 @@ %! d0 = eig (A); %! [~, idx] = sort (abs (d0)); %! d0 = d0(idx); -%! rand ("state", 42); % initialize generator to make eigs behavior reproducible +%! rand ("state", 42); # initialize generator to make eigs behavior reproducible %!testif HAVE_ARPACK %! d1 = eigs (A, k); %! assert (abs (d1), abs (d0(end:-1:(end-k+1))), 1e-11); @@ -755,7 +755,7 @@ %! d2 = sort (d0); %! [~, idx] = sort (abs (d0)); %! d0 = d0(idx); -%! rand ("state", 42); % initialize generator to make eigs behavior reproducible +%! rand ("state", 42); # initialize generator to make eigs behavior reproducible %!testif HAVE_ARPACK %! d1 = eigs (A, k); %! assert (d1, d0(end:-1:(end-k+1)), 1e-11); @@ -866,7 +866,7 @@ %! d0 = eig (A); %! [~, idx] = sort (abs (d0)); %! d0 = d0(idx); -%! rand ("state", 42); % initialize generator to make eigs behavior reproducible +%! rand ("state", 42); # initialize generator to make eigs behavior reproducible %!testif HAVE_ARPACK %! d1 = eigs (A, k); %! assert (abs (d1), abs (d0(end:-1:(end-k+1))), 1e-11); @@ -992,7 +992,7 @@ %! d0 = eig (A); %! [~, idx] = sort (abs (d0)); %! d0 = d0(idx); -%! rand ("state", 42); % initialize generator to make eigs behavior reproducible +%! rand ("state", 42); # initialize generator to make eigs behavior reproducible %!testif HAVE_ARPACK %! d1 = eigs (A, k); %! assert (abs (d1), abs (d0(end:-1:(end-k+1))), 1e-11); @@ -1117,7 +1117,7 @@ %! B = diag (ones (10, 1)); %! reseig = eig (A, B); %! [~, idx] = sort (abs (reseig), "ascend"); -%! assert (eigs (A, B, 10, 0), reseig (idx)) +%! assert (eigs (A, B, 10, 0), reseig (idx)); %!test %! X = [70 47 42 39 50 73 79 23;
--- a/scripts/sparse/ichol.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/sparse/ichol.m Fri Apr 01 16:03:29 2016 -0700 @@ -318,10 +318,10 @@ %! opts.type = "nofill"; %! opts.michol = "off"; %! L = ichol (A2, opts); -%! assert (norm (A2 - L*L', "fro") / norm (A2, "fro"), 0.0893, 1e-4) +%! assert (norm (A2 - L*L', "fro") / norm (A2, "fro"), 0.0893, 1e-4); %! opts.michol = "on"; %! L = ichol (A2, opts); -%! assert (norm (A2 - L*L', "fro") / norm (A2, "fro"), 0.2377, 1e-4) +%! assert (norm (A2 - L*L', "fro") / norm (A2, "fro"), 0.2377, 1e-4); %! %!test %! opts.type = "nofill"; @@ -390,10 +390,10 @@ %! opts.droptol = 1e-1; %! opts.michol = "off"; %! L = ichol (A2, opts); -%! assert (norm (A2 - L*L', "fro") / norm (A2, "fro"), 0.0893, 1e-4) +%! assert (norm (A2 - L*L', "fro") / norm (A2, "fro"), 0.0893, 1e-4); %! opts.michol = "on"; %! L = ichol (A2, opts); -%! assert (norm (A2 - L*L', "fro") / norm (A2, "fro"), 0.2377, 1e-4) +%! assert (norm (A2 - L*L', "fro") / norm (A2, "fro"), 0.2377, 1e-4); %! %!test %! opts.type = "ict";
--- a/scripts/sparse/pcg.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/sparse/pcg.m Fri Apr 01 16:03:29 2016 -0700 @@ -533,6 +533,6 @@ %! [x, flag, relres, iter, resvec, eigest] = pcg (A, b, [], [], A, [], b); %! assert (norm (x - X) / norm (X), 0, 1e-6); %! assert (flag, 0); -%! assert (iter, 1); # should converge in one iteration +%! assert (iter, 1); # should converge in one iteration %! assert (isnan (eigest), isnan ([NaN, NaN]));
--- a/scripts/sparse/spdiags.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/sparse/spdiags.m Fri Apr 01 16:03:29 2016 -0700 @@ -144,7 +144,7 @@ %! [B, d] = spdiags (A); %! assert (d, [-2 2]'); %! assert (B, [31 0; 0 0; 0 13]); -%! assert (spdiags (B, d, 3,3), A) +%! assert (spdiags (B, d, 3,3), A); %!test %! ## Case 1: M > N @@ -154,7 +154,7 @@ %! [B, d] = spdiags (A); %! assert (d, [-2 2]'); %! assert (B, [31 0; 0 0; 0 13]); -%! assert (spdiags (B, d, 4,3), A) +%! assert (spdiags (B, d, 4,3), A); %!test %! ## Case 1: M < N @@ -164,7 +164,7 @@ %! [B, d] = spdiags (A); %! assert (d, [-2 2]'); %! assert (B, [0 13; 0 0; 31 0]); -%! assert (spdiags (B, d, 3,4), A) +%! assert (spdiags (B, d, 3,4), A); %!assert (spdiags (zeros (1,0),1,1,1), sparse (0)) %!assert (spdiags (zeros (0,1),1,1,1), sparse (0))
--- a/scripts/sparse/svds.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/sparse/svds.m Fri Apr 01 16:03:29 2016 -0700 @@ -269,8 +269,8 @@ %! v = v(:, idx); %! rand_state = rand ("state"); %! rand ("state", 42); -%! opts.v0 = rand (2*n,1); % Initialize eigs ARPACK starting vector -%! % to guarantee reproducible results +%! opts.v0 = rand (2*n,1); # Initialize eigs ARPACK starting vector +%! # to guarantee reproducible results %! %!testif HAVE_ARPACK %! [u2,s2,v2,flag] = svds (A,k);
--- a/scripts/special-matrix/magic.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/special-matrix/magic.m Fri Apr 01 16:03:29 2016 -0700 @@ -90,8 +90,8 @@ ## this properties still must be true. %!test %! m = magic (2); -%! assert (size (m), [2 2]) -%! assert (unique (m), [1; 2; 3; 4]) +%! assert (size (m), [2 2]); +%! assert (unique (m), [1; 2; 3; 4]); %!assert (magic (2), [4 3; 1 2]) %!assert (isempty (magic (-1)))
--- a/scripts/statistics/base/lscov.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/statistics/base/lscov.m Fri Apr 01 16:03:29 2016 -0700 @@ -172,11 +172,11 @@ %! assert(mseg, 0.0019, 1E-4); %! y2 = [y 2*y]; %! [b2, se_b2, mse2, S2] = lscov (X, y2); -%! assert(b2, [b 2*b], 2*eps) -%! assert(se_b2, [se_b 2*se_b], eps) -%! assert(mse2, [mse 4*mse], eps) -%! assert(S2(:, :, 1), S, eps) -%! assert(S2(:, :, 2), 4*S, eps) +%! assert(b2, [b 2*b], 2*eps); +%! assert(se_b2, [se_b 2*se_b], eps); +%! assert(mse2, [mse 4*mse], eps); +%! assert(S2(:, :, 1), S, eps); +%! assert(S2(:, :, 2), 4*S, eps); %!test %! ## Artificial example with positive semidefinite weight matrix
--- a/scripts/statistics/base/median.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/statistics/base/median.m Fri Apr 01 16:03:29 2016 -0700 @@ -122,11 +122,11 @@ %!assert (median (b, 3), (y(:, :, 3, :) + y(:, :, 4, :))/2) ## Test non-floating point types -%!assert (median ([true, false]), true); -%!assert (median (uint8 ([1, 3])), uint8 (2)); -%!assert (median (int8 ([1, 3, 4])), int8 (3)); -%!assert (median (single ([1, 3, 4])), single (3)); -%!assert (median (single ([1, 3, NaN])), single (NaN)); +%!assert (median ([true, false]), true) +%!assert (median (uint8 ([1, 3])), uint8 (2)) +%!assert (median (int8 ([1, 3, 4])), int8 (3)) +%!assert (median (single ([1, 3, 4])), single (3)) +%!assert (median (single ([1, 3, NaN])), single (NaN)) ## Test input validation %!error median ()
--- a/scripts/statistics/base/ols.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/statistics/base/ols.m Fri Apr 01 16:03:29 2016 -0700 @@ -141,7 +141,7 @@ %! x = [1:5]'; %! y = 3*x + 2; %! x = [x, ones(5,1)]; -%! assert (ols (y,x), [3; 2], 50*eps) +%! assert (ols (y,x), [3; 2], 50*eps); %!test %! x = [1, 2; 3, 4];
--- a/scripts/strings/dec2base.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/strings/dec2base.m Fri Apr 01 16:03:29 2016 -0700 @@ -156,7 +156,7 @@ %!test %! a = 0:3; -%! assert (dec2base (! a, 2, 1), ["1"; "0"; "0"; "0"]) +%! assert (dec2base (! a, 2, 1), ["1"; "0"; "0"; "0"]); ## Test input validation %!error dec2base ()
--- a/scripts/strings/strsplit.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/strings/strsplit.m Fri Apr 01 16:03:29 2016 -0700 @@ -272,30 +272,30 @@ %!test %! [a, m] = strsplit ("a\t \nb", '\s', "delimitertype", "regularexpression", %! "collapsedelimiters", false); -%! assert (a, {"a", "", "", "b"}) -%! assert (m, {"\t", " ", "\n"}) +%! assert (a, {"a", "", "", "b"}); +%! assert (m, {"\t", " ", "\n"}); %!test %! [a, m] = strsplit ("a\t \nb", '\s', false, "delimitertype", "regularexpression"); -%! assert (a, {"a", "", "", "b"}) -%! assert (m, {"\t", " ", "\n"}) +%! assert (a, {"a", "", "", "b"}); +%! assert (m, {"\t", " ", "\n"}); %!test %! [a, m] = strsplit ("a\t \nb", '\s', "delimitertype", "regularexpression"); -%! assert (a, {"a", "b"}) -%! assert (m, {"\t \n"}) +%! assert (a, {"a", "b"}); +%! assert (m, {"\t \n"}); %!test %! [a, m] = strsplit ("a\t \nb", {"\t", " ", "\n"}, "delimitertype", "simple"); -%! assert (a, {"a", "b"}) -%! assert (m, {"\t \n"}) +%! assert (a, {"a", "b"}); +%! assert (m, {"\t \n"}); %!test %! [s, m] = strsplit ("hello \t world", true); %! assert (s, {"hello", "world"}); %! assert (m, {" \t "}); ## Compatibility -%! assert (strsplit ("", "a"), {""}) -%! assert (strsplit ("a", "a"), {"", ""}) -%! assert (strsplit ("aa", "a"), {"", ""}) -%! assert (strsplit ("aaa", "a"), {"", ""}) +%! assert (strsplit ("", "a"), {""}); +%! assert (strsplit ("a", "a"), {"", ""}); +%! assert (strsplit ("aa", "a"), {"", ""}); +%! assert (strsplit ("aaa", "a"), {"", ""}); ## Bug #44641 %!assert (strsplit ("xxx<yyy", "<"), {"xxx", "yyy"})
--- a/scripts/strings/strtok.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/strings/strtok.m Fri Apr 01 16:03:29 2016 -0700 @@ -139,7 +139,7 @@ %!demo %! strtok ("this is the life") -%! % split at the first space, returning "this" +%! # split at the first space, returning "this" %!demo %! s = "14*27+31"
--- a/scripts/testfun/test.m Fri Apr 01 14:56:52 2016 -0700 +++ b/scripts/testfun/test.m Fri Apr 01 16:03:29 2016 -0700 @@ -884,7 +884,7 @@ %!xtest %! assert (0, 1); # Test fails -## Test comment block. it can contain anything. +## Test comment block. It can contain anything. %!## %! it is the "#" as the block type that makes it a comment %! and it stays as a comment even through continuation lines
--- a/test/bug-31371.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/bug-31371.tst Fri Apr 01 16:03:29 2016 -0700 @@ -36,6 +36,6 @@ %! Factorial = Ycomb(@(f) @(n) C(C2(Iszero(n), ... %! @(d) One, @(d) Mult(n, f(Dec(n)))),0)); %! -%! assert (Render (Factorial (Two)), 2) -%! assert (Render (Factorial (Three)), 6) -%! assert (Render (Factorial (Four)), 24) +%! assert (Render (Factorial (Two)), 2); +%! assert (Render (Factorial (Three)), 6); +%! assert (Render (Factorial (Four)), 24);
--- a/test/bug-36025/bug-36025.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/bug-36025/bug-36025.tst Fri Apr 01 16:03:29 2016 -0700 @@ -1,5 +1,5 @@ %!test -%! warning off Octave:function-name-clash +%! warning ("off", "Octave:function-name-clash", "local"); %! f = testclass (1, 2); %! assert (one (f), 1); %! assert (two (f), 2);
--- a/test/bug-44940/bug-44940.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/bug-44940/bug-44940.tst Fri Apr 01 16:03:29 2016 -0700 @@ -3,9 +3,9 @@ %! b = a; %! c = a (); %! a.child = 100; -%! assert (a.child, b.child) -%! assert (a.child, c.child) +%! assert (a.child, b.child); +%! assert (a.child, c.child); %! c.child = 500; -%! assert (a.child, b.child) -%! assert (a.child, c.child) +%! assert (a.child, b.child); +%! assert (a.child, c.child);
--- a/test/build-sparse-tests.sh Fri Apr 01 14:56:52 2016 -0700 +++ b/test/build-sparse-tests.sh Fri Apr 01 16:03:29 2016 -0700 @@ -320,7 +320,7 @@ %! sv = as.^bf; %! fv = af.^bf; %! idx = find (af!=0); -%! assert (sv(:)(idx), sparse (fv(:)(idx)), 100*eps) +%! assert (sv(:)(idx), sparse (fv(:)(idx)), 100*eps); EOF } @@ -337,7 +337,7 @@ %! sv = as.^bs; %! fv = af.^bf; %! idx = find (af!=0); -%! assert(sv(:)(idx), sparse (fv(:)(idx)), 100*eps) +%! assert(sv(:)(idx), sparse (fv(:)(idx)), 100*eps); EOF } @@ -628,7 +628,7 @@ cat <<EOF %!testif HAVE_UMFPACK -%! assert(det(bs+speye(size(bs))), det(bf+eye(size(bf))), 100*eps*abs(det(bf+eye(size(bf))))) +%! assert(det(bs+speye(size(bs))), det(bf+eye(size(bf))), 100*eps*abs(det(bf+eye(size(bf))))); %!testif HAVE_UMFPACK %! [l,u] = lu (sparse ([1,1;1,1])); @@ -864,7 +864,7 @@ %!assert (full (as(:,[1,1])), af(:,[1,1])) %!test %! [i,j,v] = find (as); -%! assert (as(i(1),j(1))([1,1]), sparse ([v(1), v(1)])) +%! assert (as(i(1),j(1))([1,1]), sparse ([v(1), v(1)])); %% Assignment test %!test @@ -1069,34 +1069,34 @@ %!test %! us = alpha*[[speye(10,10);sparse(1,10)],[[1,1];sparse(9,2);[1,1]]]; %!testif HAVE_UMFPACK -%! assert (us*(us\xf), xf, 100*eps) +%! assert (us*(us\xf), xf, 100*eps); %!testif HAVE_UMFPACK -%! assert (us*(us\xs), xs, 100*eps) +%! assert (us*(us\xs), xs, 100*eps); %!test %! pus = us(:,[2,1,3:12]); %!testif HAVE_UMFPACK -%! assert (pus*(pus\xf), xf, 100*eps) +%! assert (pus*(pus\xf), xf, 100*eps); %!testif HAVE_UMFPACK -%! assert (pus*(pus\xs), xs, 100*eps) +%! assert (pus*(pus\xs), xs, 100*eps); %!test %! us = alpha*[speye(11,9),[1;sparse(8,1);1;0]]; %!testif HAVE_CXSPARSE %! [c,r] = qr (us, xf); -%! assert (us\xf, r\c, 100*eps) +%! assert (us\xf, r\c, 100*eps); %!testif HAVE_UMFPACK %! [c,r] = qr (us, xs); %! r = matrix_type (r, "Singular"); ## Force Matrix Type -%! assert (us\xs, r\c, 100*eps) +%! assert (us\xs, r\c, 100*eps); %!test %! pus = us(:,[1:8,10,9]); %!testif HAVE_UMFPACK %! [c,r] = qr (pus, xf); %! r = matrix_type (r, "Singular"); ## Force Matrix Type -%! assert (pus\xf, r\c, 100*eps) +%! assert (pus\xf, r\c, 100*eps); %!testif HAVE_UMFPACK %! [c,r] = qr (pus, xs); %! r = matrix_type (r, "Singular"); ## Force Matrix Type -%! assert (pus\xs, r\c, 100*eps) +%! assert (pus\xs, r\c, 100*eps); %!test %! ls = alpha*[speye(9,11);[1, sparse(1,8),1,0]]; %! xf = beta * ones (10,2); @@ -1113,21 +1113,21 @@ %! xs = speye (12,12); %!testif HAVE_UMFPACK %! [c,r] = qr (ls, xf); -%! assert (ls\xf, r\c, 100*eps) +%! assert (ls\xf, r\c, 100*eps); %!testif HAVE_UMFPACK %! [c,r] = qr (ls, xs); %! r = matrix_type (r, "Singular"); ## Force Matrix Type -%! assert (ls\xs, r\c, 100*eps) +%! assert (ls\xs, r\c, 100*eps); %!testif HAVE_CXSPARSE %! pls = ls(:,[1:8,10,9]); %!testif HAVE_UMFPACK %! [c,r] = qr (pls, xf); %! r = matrix_type (r, "Singular"); ## Force Matrix Type -%! assert (pls\xf, r\c, 100*eps) +%! assert (pls\xf, r\c, 100*eps); %!testif HAVE_UMFPACK %! [c,r] = qr (pls, xs); %! r = matrix_type (r, "Singular"); ## Force Matrix Type -%! assert (pls\xs, r\c, 100*eps) +%! assert (pls\xs, r\c, 100*eps); EOF }
--- a/test/class-concat/class-concat.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/class-concat/class-concat.tst Fri Apr 01 16:03:29 2016 -0700 @@ -1,14 +1,14 @@ %!test %! f = foo (); %! x = [f,f]; -%! assert (size (x), [1, 2]) -%! assert (class (x), "foo") +%! assert (size (x), [1, 2]); +%! assert (class (x), "foo"); %!test %! f = foo (); %! x = [f,f]; %! tmp = num2cell (x); -%! assert (iscell (tmp)) -%! assert (size (tmp), [1, 2]) -%! assert (class (tmp{1}), "foo") -%! assert (class (tmp{2}), "foo") +%! assert (iscell (tmp)); +%! assert (size (tmp), [1, 2]); +%! assert (class (tmp{1}), "foo"); +%! assert (class (tmp{2}), "foo");
--- a/test/classdef/classdef.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/classdef/classdef.tst Fri Apr 01 16:03:29 2016 -0700 @@ -49,9 +49,9 @@ %!assert (p.amount, amt, eps ()) %!assert (amount (p), amt, eps ()) %!xtest -%! assert (properties (p), {'rate'; 'term'; 'principle'}) +%! assert (properties (p), {'rate'; 'term'; 'principle'}); %!xtest -%! assert (methods (p), {'amount'; 'foo_value_class'}) +%! assert (methods (p), {'amount'; 'foo_value_class'}); %!assert (isempty (foo_value_class().rate)) %!error <property `rate' is not constant> foo_value_class.rate @@ -64,10 +64,10 @@ %!test %! obj = foo_static_method_constant_property; %! obj.frequency = 10; -%! assert (obj.cosine (0.1), cos (2 * pi * 10 * 0.1), eps ()) -%! assert (obj.sine (0.1), sin (2 * pi * 10 * 0.1), eps ()) +%! assert (obj.cosine (0.1), cos (2 * pi * 10 * 0.1), eps ()); +%! assert (obj.sine (0.1), sin (2 * pi * 10 * 0.1), eps ()); %!test %! obj = foo_method_changes_property_size (3); %! obj = obj.move_element_to_end (2); -%! assert (obj.element, [1 3 2]) +%! assert (obj.element, [1 3 2]);
--- a/test/classes/classes.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/classes/classes.tst Fri Apr 01 16:03:29 2016 -0700 @@ -369,8 +369,8 @@ %!shared st %!test st = SizeTester ([1 1]); -%! assert (isequal (size (st), [1 1])) -%! assert (isequal (numel (st), 1)) +%! assert (isequal (size (st), [1 1])); +%! assert (isequal (numel (st), 1)); %!assert (isequal (ndims (st), 2)) %!assert (isequal (rows (st), 1)) %!assert (isequal (columns (st), 1)) @@ -379,8 +379,8 @@ %!assert (isvector (st)) %!test st = SizeTester ([1 2]); -%! assert (isequal (size (st), [1 2])) -%! assert (isequal (numel (st), 2)) +%! assert (isequal (size (st), [1 2])); +%! assert (isequal (numel (st), 2)); %!assert (isequal (ndims (st), 2)) %!assert (isequal (rows (st), 1)) %!xtest assert (isequal (columns (st), 2)) @@ -389,8 +389,8 @@ %!assert (isvector (st)) %!test st = SizeTester ([2 3]); -%! assert (isequal (size (st), [2 3])) -%! assert (isequal (numel (st), 6)) +%! assert (isequal (size (st), [2 3])); +%! assert (isequal (numel (st), 6)); %!assert (isequal (ndims (st), 2)) %!xtest assert (isequal (rows (st), 2)) %!xtest assert (isequal (columns (st), 3)) @@ -399,8 +399,8 @@ %!xtest assert (not (isvector (st))) # bug #44498 %!test st = SizeTester ([2 3 4]); -%! assert (isequal (size (st), [2 3 4])) -%! assert (isequal (numel (st), 24)) +%! assert (isequal (size (st), [2 3 4])); +%! assert (isequal (numel (st), 24)); %!xtest assert (isequal (ndims (st), 3)) %!xtest assert (isequal (rows (st), 2)) %!xtest assert (isequal (columns (st), 3))
--- a/test/colormaps.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/colormaps.tst Fri Apr 01 16:03:29 2016 -0700 @@ -21,20 +21,20 @@ %! unwind_protect %! all_colormaps = colormap ("list"); %! -%! assert (numel (all_colormaps) > 0) +%! assert (numel (all_colormaps) > 0); %! %! for i = 1:numel (all_colormaps) %! f = str2func (all_colormaps{i}); %! -%! assert (iscolormap (f (1))) -%! assert (iscolormap (f (12))) -%! assert (iscolormap (f (200))) +%! assert (iscolormap (f (1))); +%! assert (iscolormap (f (12))); +%! assert (iscolormap (f (200))); %! %! ## bug #44070 -%! assert (class (f (uint8 (12))), "double") -%! assert (iscolormap (f (uint8 (12)))) +%! assert (class (f (uint8 (12))), "double"); +%! assert (iscolormap (f (uint8 (12)))); %! -%! assert (f (0), zeros (0, 3)) +%! assert (f (0), zeros (0, 3)); %! endfor %! unwind_protect_cleanup %! close (hf);
--- a/test/command.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/command.tst Fri Apr 01 16:03:29 2016 -0700 @@ -12,143 +12,143 @@ ## 0, 1, 2, 3 simple arguments %!test %! command_test -%! assert (cmd_out, '|') +%! assert (cmd_out, '|'); %!test %! command_test a -%! assert (cmd_out, '|a|') +%! assert (cmd_out, '|a|'); %!test %! command_test aa b -%! assert (cmd_out, '|aa|b|') +%! assert (cmd_out, '|aa|b|'); %!test %! command_test aaa bb c -%! assert (cmd_out, '|aaa|bb|c|') +%! assert (cmd_out, '|aaa|bb|c|'); ## continuation %!test %! command_test a... %! bb ccc -%! assert (cmd_out, '|a|bb|ccc|') +%! assert (cmd_out, '|a|bb|ccc|'); %!test %! command_test a ... %! bb ccc -%! assert (cmd_out, '|a|bb|ccc|') +%! assert (cmd_out, '|a|bb|ccc|'); %!test %! command_test aa(... %! bb cc -%! assert (cmd_out, '|aa(|bb|cc|') +%! assert (cmd_out, '|aa(|bb|cc|'); %!test %! command_test aa( ... %! bb cc -%! assert (cmd_out, '|aa( |bb|cc|') +%! assert (cmd_out, '|aa( |bb|cc|'); ## comments %!test %! command_test aa bb cc%comment -%! assert (cmd_out, '|aa|bb|cc|') +%! assert (cmd_out, '|aa|bb|cc|'); %!test %! command_test aa bb cc#comment -%! assert (cmd_out, '|aa|bb|cc|') +%! assert (cmd_out, '|aa|bb|cc|'); %!test %! command_test aa bb cc %comment -%! assert (cmd_out, '|aa|bb|cc|') +%! assert (cmd_out, '|aa|bb|cc|'); %!test %! command_test aa bb cc #comment -%! assert (cmd_out, '|aa|bb|cc|') +%! assert (cmd_out, '|aa|bb|cc|'); %!test %! command_test aa bb cc( %comment -%! assert (cmd_out, '|aa|bb|cc( |') +%! assert (cmd_out, '|aa|bb|cc( |'); %!test %! command_test aa bb cc( #comment -%! assert (cmd_out, '|aa|bb|cc( |') +%! assert (cmd_out, '|aa|bb|cc( |'); ## semicolons and commas; multiple commands %!test %! command_test aa bb, gobble_command cc -%! assert (cmd_out, '|aa|bb|') +%! assert (cmd_out, '|aa|bb|'); %!test %! command_test aa bb ; gobble_command cc -%! assert (cmd_out, '|aa|bb|') +%! assert (cmd_out, '|aa|bb|'); %!test %! command_test aa bb ; command_test cc dd -%! assert (cmd_out, '|cc|dd|') +%! assert (cmd_out, '|cc|dd|'); %!test %! command_test aa bb %!test %! command_test cc dd -%! assert (cmd_out, '|cc|dd|') +%! assert (cmd_out, '|cc|dd|'); ## parenthesis matching %!test %! command_test aa(bb,cc,dd) ee(ff,gg) hh -%! assert (cmd_out, '|aa(bb,cc,dd)|ee(ff,gg)|hh|') +%! assert (cmd_out, '|aa(bb,cc,dd)|ee(ff,gg)|hh|'); %!test %! command_test aa([bb,cc)] -%! assert (cmd_out, '|aa([bb,cc)]|') +%! assert (cmd_out, '|aa([bb,cc)]|'); %!test %! command_test aa(,@!$@"bb"'cc' -%! assert (cmd_out, '|aa(,@!$@"bb"''cc''|') +%! assert (cmd_out, '|aa(,@!$@"bb"''cc''|'); %!test %! command_test aa(bb,cc,dd) -%! assert (cmd_out, '|aa(bb,cc,dd)|') +%! assert (cmd_out, '|aa(bb,cc,dd)|'); %!test %! command_test aa( bb,cc,dd ) -%! assert (cmd_out, '|aa( bb,cc,dd )|') +%! assert (cmd_out, '|aa( bb,cc,dd )|'); %!test %! command_test aa (bb,cc,dd) -%! assert (cmd_out, '|aa|(bb,cc,dd)|') +%! assert (cmd_out, '|aa|(bb,cc,dd)|'); %!test %! command_test aa ( bb,cc,dd ) -%! assert (cmd_out, '|aa|( bb,cc,dd )|') +%! assert (cmd_out, '|aa|( bb,cc,dd )|'); %!test %! command_test aa(bb, cc, dd) -%! assert (cmd_out, '|aa(bb, cc, dd)|') +%! assert (cmd_out, '|aa(bb, cc, dd)|'); %!test %! command_test aa( bb, cc, dd ) -%! assert (cmd_out, '|aa( bb, cc, dd )|') +%! assert (cmd_out, '|aa( bb, cc, dd )|'); %!test %! command_test aa (bb, cc, dd) -%! assert (cmd_out, '|aa|(bb, cc, dd)|') +%! assert (cmd_out, '|aa|(bb, cc, dd)|'); %!test %! command_test aa ( bb, cc, dd ) -%! assert (cmd_out, '|aa|( bb, cc, dd )|') +%! assert (cmd_out, '|aa|( bb, cc, dd )|'); ## single and double quotes %!test %! command_test "aa" 'bb' cc -%! assert (cmd_out, '|aa|bb|cc|') +%! assert (cmd_out, '|aa|bb|cc|'); %!test %! command_test "aa"'bb'cc -%! assert (cmd_out, '|aabbcc|') +%! assert (cmd_out, '|aabbcc|'); %!test %! command_test aa'bb'"cc" -%! assert (cmd_out, '|aabbcc|') +%! assert (cmd_out, '|aabbcc|'); %!test %! command_test "aa"bb'cc' -%! assert (cmd_out, '|aabbcc|') +%! assert (cmd_out, '|aabbcc|'); ## CVX-inspired %!test %! command_test Z(n,n) hermitian toeplitz -%! assert (cmd_out, '|Z(n,n)|hermitian|toeplitz|') +%! assert (cmd_out, '|Z(n,n)|hermitian|toeplitz|'); %!test %! command_test X( n, n ) symmetric -%! assert (cmd_out, '|X( n, n )|symmetric|') +%! assert (cmd_out, '|X( n, n )|symmetric|'); %!test %! command_test xw( nm-1, nv ); -%! assert (cmd_out, '|xw( nm-1, nv )|') +%! assert (cmd_out, '|xw( nm-1, nv )|'); %!test %! command_test x( sx ) y( sx ) z( sx ) -%! assert (cmd_out, '|x( sx )|y( sx )|z( sx )|') +%! assert (cmd_out, '|x( sx )|y( sx )|z( sx )|'); %!test %! command_test coeffs(deg+1) complex; -%! assert (cmd_out, '|coeffs(deg+1)|complex|') +%! assert (cmd_out, '|coeffs(deg+1)|complex|'); %!test %! command_test w( 1, npairs * nv ) v( 1, npairs * nv ) -%! assert (cmd_out, '|w( 1, npairs * nv )|v( 1, npairs * nv )|') +%! assert (cmd_out, '|w( 1, npairs * nv )|v( 1, npairs * nv )|'); %!test %! command_test w(m,1) % edge weights -%! assert (cmd_out, '|w(m,1)|') +%! assert (cmd_out, '|w(m,1)|'); %!test %! command_test x2( size( x ) ) -%! assert (cmd_out, '|x2( size( x ) )|') +%! assert (cmd_out, '|x2( size( x ) )|');
--- a/test/ctor-vs-method/ctor-vs-method.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/ctor-vs-method/ctor-vs-method.tst Fri Apr 01 16:03:29 2016 -0700 @@ -35,14 +35,14 @@ %! 'end parent/parent'; %! 'end derived/parent'; %! 'end parent/method'}; -%! __trace__ (); %% clear call trace info +%! __trace__ (); # clear call trace info %! method (d); %! assert (__trace__ (), ctrace); %!test %! ctrace = {'begin other/parent'; %! 'end other/parent'}; -%! __trace__ (); %% clear call trace info +%! __trace__ (); # clear call trace info %! parent (o); %! assert (__trace__ (), ctrace); @@ -51,6 +51,6 @@ %! 'begin parent/parent'; %! 'end parent/parent'; %! 'end derived/parent'}; -%! __trace__ (); %% clear call trace info +%! __trace__ (); # clear call trace info %! parent (d); %! assert (__trace__ (), ctrace);
--- a/test/error.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/error.tst Fri Apr 01 16:03:29 2016 -0700 @@ -84,8 +84,8 @@ %! warnstat = warning ("query", warnoffId); %! warnoff = warnstat; %! warnoff.state = "off"; -%! warning (warnoff); %update warning status -%! warning (warnstat); %reset warning status +%! warning (warnoff); # update warning status +%! warning (warnstat); # reset warning status %! w = warning; %! assert (w, w0);
--- a/test/fcn-handle-derived-resolution/fcn-handle-derived-resolution.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/fcn-handle-derived-resolution/fcn-handle-derived-resolution.tst Fri Apr 01 16:03:29 2016 -0700 @@ -35,33 +35,33 @@ %!test %! p = fhdr_parent (7); -%! assert (numel (p), 7) +%! assert (numel (p), 7); %!test %! d = fhdr_derived (13); -%! assert (numel (d), 13) +%! assert (numel (d), 13); %!test %! p = fhdr_parent (11); %! f = @numel; -%! assert (f (p), 11) +%! assert (f (p), 11); %!test %! d = fhdr_parent (21); %! f = @numel; -%! assert (f (d), 21) +%! assert (f (d), 21); %!test %! o(1) = fhdr_other (13); %! o(2) = fhdr_other (42); -%! assert (getsize_loop (o), [13, 42]) +%! assert (getsize_loop (o), [13, 42]); %!test %! o(1) = fhdr_other (13); %! o(2) = fhdr_other (42); -%! assert (getsize_cellfun (o), [13, 42]) +%! assert (getsize_cellfun (o), [13, 42]); %!test %! o(1) = fhdr_other (13); %! o(2) = fhdr_other (42); -%! assert (getsize_arrayfun (o), [13, 42]) +%! assert (getsize_arrayfun (o), [13, 42]);
--- a/test/for.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/for.tst Fri Apr 01 16:03:29 2016 -0700 @@ -91,14 +91,14 @@ %! a = [1,3;2,4]; %! j = 0; %! for i = cat (3, a, 4 + a) -%! assert (i, [1;2] + 2*j++) +%! assert (i, [1;2] + 2*j++); %! endfor %!test %! a = {1,3;2,4}; %! j = 0; %! for i = cat (3, a, cellfun (@(x) 4 + x, a, "UniformOutput", 0)) -%! assert (i, {1 + 2*j; 2 + 2*j++}) +%! assert (i, {1 + 2*j; 2 + 2*j++}); %! endfor ## test parsing of single-quoted character string appearing at the
--- a/test/index.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/index.tst Fri Apr 01 16:03:29 2016 -0700 @@ -94,19 +94,19 @@ %!test %! c(:,:,1) = [1,2;3,4]; %! c(:,:,2) = [1,2;3,4]; -%! assert (a(:,:,[1,1]), c) +%! assert (a(:,:,[1,1]), c); %!test %! c(:,:,1,1) = [1,2;3,4]; %! c(:,:,1,2) = [1,2;3,4]; -%! assert (a(:,:,1,[1,1]), c) +%! assert (a(:,:,1,[1,1]), c); %!test %! c(:,:,1,1) = [1,2;3,4]; %! c(:,:,2,1) = [1,2;3,4]; %! c(:,:,1,2) = [1,2;3,4]; %! c(:,:,2,2) = [1,2;3,4]; -%! assert (a(:,:,[1,1],[1,1]), c) +%! assert (a(:,:,[1,1],[1,1]), c); %!assert (a(1,[]), zeros (1,0)) %!assert (a(1,[],[1,1]), zeros (1,0,2))
--- a/test/io.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/io.tst Fri Apr 01 16:03:29 2016 -0700 @@ -254,7 +254,7 @@ %!test %! matrix1 = rand (100, 2); %! matrix_ascii = fullfile (P_tmpdir, "matrix.ascii"); -%! save ("-ascii", matrix_ascii, "matrix1") +%! save ("-ascii", matrix_ascii, "matrix1"); %! matrix2 = load (matrix_ascii); %! assert (matrix1, matrix2, 1e-9); %! @@ -311,8 +311,8 @@ %! [v2, c2, m2] = sscanf ("1 2 bar 3 4 5 6", "%d"); %! %! assert ((a == 1.2 && b == 3 && c == "foo" -%! && v1 == [1; 2; 3; 4; 5; 6] && c1 == 6 && ischar (m1) -%! && v2 == [1; 2] && c2 == 2 && ischar (m2))); +%! && v1 == [1; 2; 3; 4; 5; 6] && c1 == 6 && ischar (m1) +%! && v2 == [1; 2] && c2 == 2 && ischar (m2))); %!error <Invalid call to sscanf> sscanf () %!error sscanf (1, 2)
--- a/test/jit.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/jit.tst Fri Apr 01 16:03:29 2016 -0700 @@ -27,7 +27,7 @@ ## Test some simple cases that compile. %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! for i=1:1e6 %! if (i < 5) %! break; @@ -39,7 +39,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! while (1) %! if (1) %! break; @@ -50,14 +50,14 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! do %! break; %! until (0) %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! do %! if (1) %! break; @@ -66,7 +66,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! i=1; %! do %! continue; @@ -76,7 +76,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! for i=1:1e6 %! if (i == 100) %! break; @@ -87,7 +87,7 @@ ## Also test parfor keyword %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! parfor i=1:1e6 %! if (i == 100) %! break; @@ -97,7 +97,7 @@ %! assert (jit_failcnt, 0); ## Test some switch statements %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! do %! switch (1) %! end; @@ -105,7 +105,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! do %! switch (1) %! case 1 @@ -115,7 +115,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! do %! switch (1) %! otherwise @@ -125,7 +125,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! do %! switch (1) %! case 1 @@ -137,7 +137,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! i=0; %! a=0; %! b=0; @@ -163,7 +163,7 @@ ## Some more complex calculations %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! inc = 1e-5; %! result = 0; %! for ii = 0:inc:1 @@ -173,7 +173,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! inc = 1e-5; %! result = 0; %! for ii = 0:inc:1 @@ -184,7 +184,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! temp = 1+1i; %! nan = NaN; %! while (1) @@ -196,7 +196,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! temp = 1+1i; %! nan = NaN+1i; %! while (1) @@ -209,7 +209,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! temp = 1+1i; %! while (1) %! temp = temp * 5; @@ -219,7 +219,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! nr = 1001; %! mat = zeros (1, nr); %! for i = 1:nr @@ -229,7 +229,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! nr = 1001; %! mat = 1:nr; %! mat(end) = 0; # force mat to a matrix @@ -241,7 +241,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! nr = 1001; %! mat = [3 1 5]; %! try @@ -291,13 +291,13 @@ %!endfunction %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! test_set = gen_test (10000); %! assert (all (vectorized (test_set, 3) == loopy (test_set, 3))); %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! niter = 1001; %! i = 0; %! while (i < niter) @@ -307,7 +307,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! niter = 1001; %! result = 0; %! m = [5 10]; @@ -318,7 +318,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! ndim = 100; %! result = 0; %! m = zeros (ndim); @@ -334,7 +334,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! ndim = 100; %! m = zeros (ndim); %! i = 1; @@ -350,7 +350,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! ndim = 2; %! m = zeros (ndim, ndim, ndim, ndim); %! result = 0; @@ -386,7 +386,7 @@ %!endfunction %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! lasterr (""); %! try %! test_divide (); @@ -395,7 +395,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! while (1) %! a = 0; %! result = a / 1; @@ -405,7 +405,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! m = zeros (2, 1001); %! for i=1:1001 %! m(end, i) = i; @@ -418,7 +418,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! m = [1 2 3]; %! for i=1:1001 %! m = sin (m); @@ -428,7 +428,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! i = 0; %! while i < 10 %! i += 1; @@ -437,7 +437,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! i = 0; %! while i < 10 %! a = ++i; @@ -447,7 +447,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! i = 0; %! while i < 10 %! a = i++; @@ -457,7 +457,7 @@ %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! num = 2; %! a = zeros (1, num); %! i = 1; @@ -481,7 +481,7 @@ %! endwhile %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! lasterr (""); %! try %! test_compute_idom (); @@ -497,7 +497,7 @@ %!endfunction %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! assert (test_overload (1), 1); %! assert (test_overload ([1 2]), [1 2]); %! assert (jit_failcnt, 0); @@ -519,12 +519,12 @@ %!endfunction %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! assert (bubble (), [1 2 3]); %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! a = 0; %! b = 1; %! for i=1:1e3 @@ -539,7 +539,7 @@ %!xtest %! ## FIXME: No support for functions with complex input prototypes %! ## testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! a = [1+1i 1+2i]; %! b = 0; %! while (1) @@ -556,7 +556,7 @@ %!endfunction %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! lasterr (""); %! try %! test_undef (); @@ -570,14 +570,14 @@ %!xtest %! ## FIXME: No support for functions with complex input prototypes %! ## testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! assert (id (1), 1); %! assert (id (1+1i), 1+1i); %! assert (id (1, 2), 1); %! assert (jit_failcnt, 0); %!testif HAVE_LLVM -%! jit_failcnt (0) +%! jit_failcnt (0); %! lasterr (""); %! try %! id ();
--- a/test/null-assign.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/null-assign.tst Fri Apr 01 16:03:29 2016 -0700 @@ -17,17 +17,17 @@ ## <http://www.gnu.org/licenses/>. %!test -%! a = 1:3; a(:) = []; assert (size (a), [0, 0]) +%! a = 1:3; a(:) = []; assert (size (a), [0, 0]); %!test -%! a = 1:3; a(1:3) = []; assert (size (a), [1, 0]) +%! a = 1:3; a(1:3) = []; assert (size (a), [1, 0]); %!test -%! a = (1:3).'; a(1:3) = []; assert (size (a), [0, 1]) +%! a = (1:3).'; a(1:3) = []; assert (size (a), [0, 1]); %!test -%! a = ones (3); a(:,:) = []; assert (size (a), [0, 3]) +%! a = ones (3); a(:,:) = []; assert (size (a), [0, 3]); %!test -%! a = ones (3); a(1:3,:) = []; assert (size (a), [0, 3]) +%! a = ones (3); a(1:3,:) = []; assert (size (a), [0, 3]); %!test -%! a = ones (3); a(:,1:3) = []; assert (size (a), [3, 0]) +%! a = ones (3); a(:,1:3) = []; assert (size (a), [3, 0]); %!test %! a = ones (3); fail ("a(1:2,1:2) = []", ".*"); %!test @@ -35,31 +35,31 @@ ## null strings should delete. [,] and [;] should delete. %!test -%! a = ones (3); a(1:2,:) = [,]; assert (size (a), [1,3]) +%! a = ones (3); a(1:2,:) = [,]; assert (size (a), [1,3]); %!test -%! a = ones (3); a(1:2,:) = [;]; assert (size (a), [1,3]) +%! a = ones (3); a(1:2,:) = [;]; assert (size (a), [1,3]); %!test -%! a = ones (3); a(1:2,:) = ''; assert (size (a), [1,3]) +%! a = ones (3); a(1:2,:) = ''; assert (size (a), [1,3]); %!test -%! a = ones (3); a(1:2,:) = ""; assert (size (a), [1,3]) +%! a = ones (3); a(1:2,:) = ""; assert (size (a), [1,3]); ## null matrix stored anywhere should lose its special status %!test -%! a = ones (3); b = []; fail ("a(:,1:3) = b", ".") +%! a = ones (3); b = []; fail ("a(:,1:3) = b", "."); %!test -%! a = ones (3); b{1} = []; fail ("a(:,1:3) = b{1}", ".") +%! a = ones (3); b{1} = []; fail ("a(:,1:3) = b{1}", "."); %!test -%! a = ones (3); b.x = []; fail ("a(:,1:3) = b.x", ".") +%! a = ones (3); b.x = []; fail ("a(:,1:3) = b.x", "."); ## filtering a null matrix through a function should not delete %!test -%! a = ones (3); fail ("a(:,1:3) = double ([])") +%! a = ones (3); fail ("a(:,1:3) = double ([])"); ## subsasgn should work the same way %!test -%! a = ones (3); a = subsasgn (a, substruct ('()', {':',1:2}), []); assert (size (a), [3,1]) +%! a = ones (3); a = subsasgn (a, substruct ('()', {':',1:2}), []); assert (size (a), [3,1]); %!test -%! a = ones (3); b = []; fail ("subsasgn (a, substruct ('()', {':',1:2}), b)", ".") +%! a = ones (3); b = []; fail ("subsasgn (a, substruct ('()', {':',1:2}), b)", "."); %!test %! classes = {@int8, @int16, @int32, @int64, ...
--- a/test/parser.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/parser.tst Fri Apr 01 16:03:29 2016 -0700 @@ -90,18 +90,18 @@ ## Level 11 (transpose and exponentiation) %!test %! a = 2; -%! assert (2 ^a++, 4) -%! assert (a, 3) -%! assert (2 ^--a ^2, 16) -%! assert (a, 2) -%! assert (2 ^++a, 8) -%! assert (a, 3) -%! assert (a' ^2, 9) -%! assert (2 ^sin(0), 1) -%! assert (-2 ^2, -4); -%! assert (2 ^+1 ^3, 8) -%! assert (2 ^-1 ^3, 0.125) -%! assert (2 ^~0 ^2, 4) +%! assert (2 ^a++, 4); +%! assert (a, 3); +%! assert (2 ^--a ^2, 16); +%! assert (a, 2); +%! assert (2 ^++a, 8); +%! assert (a, 3); +%! assert (a' ^2, 9); +%! assert (2 ^sin(0), 1); +%! assert (-2 ^2, -4);; +%! assert (2 ^+1 ^3, 8); +%! assert (2 ^-1 ^3, 0.125); +%! assert (2 ^~0 ^2, 4); %! assert (!0 ^0, false); %! assert (2*3 ^2, 18); %! assert (2+3 ^2, 11); @@ -315,7 +315,7 @@ %!test %! a = {1, @sin, 2, @cos}; %! b = {1 @sin 2 @cos}; -%! assert (a, b) +%! assert (a, b); ## Maybe unnecessary, but check that further changes to parser don't ## invalidate error handling (bug #46534).
--- a/test/struct.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/struct.tst Fri Apr 01 16:03:29 2016 -0700 @@ -138,8 +138,7 @@ %! c(1, 2, 3, 4).value = 2; %! c(3, 3, 3, 3).value = 1; %! d = reshape ({c.value}, size (c)); -%! assert ([d{4, 4, 4, 4}, d{1, 2, 3, 4}, d{3, 3, 3, 3}], -%! [3, 2, 1]); +%! assert ([d{4, 4, 4, 4}, d{1, 2, 3, 4}, d{3, 3, 3, 3}], [3, 2, 1]); ## test assignment to mixed cs-list of field element subranges %!test
--- a/test/system.tst Fri Apr 01 14:56:52 2016 -0700 +++ b/test/system.tst Fri Apr 01 16:03:29 2016 -0700 @@ -129,38 +129,38 @@ %!test %! [s, err, msg] = stat (filesep); -%! assert ((err == 0 -%! && isstruct (s) -%! && isfield (s, "dev") -%! && isfield (s, "ino") -%! && isfield (s, "modestr") -%! && isfield (s, "nlink") -%! && isfield (s, "uid") -%! && isfield (s, "gid") -%! && isfield (s, "size") -%! && isfield (s, "atime") -%! && isfield (s, "mtime") -%! && isfield (s, "ctime") -%! && ischar (msg))); +%! assert (err == 0 +%! && isstruct (s) +%! && isfield (s, "dev") +%! && isfield (s, "ino") +%! && isfield (s, "modestr") +%! && isfield (s, "nlink") +%! && isfield (s, "uid") +%! && isfield (s, "gid") +%! && isfield (s, "size") +%! && isfield (s, "atime") +%! && isfield (s, "mtime") +%! && isfield (s, "ctime") +%! && ischar (msg)); %!error <Invalid call to stat> stat () %!error <Invalid call to stat> stat ("foo", 1) %!test %! [s, err, msg] = lstat (filesep); -%! assert ((err == 0 -%! && isstruct (s) -%! && isfield (s, "dev") -%! && isfield (s, "ino") -%! && isfield (s, "modestr") -%! && isfield (s, "nlink") -%! && isfield (s, "uid") -%! && isfield (s, "gid") -%! && isfield (s, "size") -%! && isfield (s, "atime") -%! && isfield (s, "mtime") -%! && isfield (s, "ctime") -%! && ischar (msg))); +%! assert (err == 0 +%! && isstruct (s) +%! && isfield (s, "dev") +%! && isfield (s, "ino") +%! && isfield (s, "modestr") +%! && isfield (s, "nlink") +%! && isfield (s, "uid") +%! && isfield (s, "gid") +%! && isfield (s, "size") +%! && isfield (s, "atime") +%! && isfield (s, "mtime") +%! && isfield (s, "ctime") +%! && ischar (msg)); %!error <Invalid call to lstat> lstat () %!error <Invalid call to lstat> lstat ("foo", 1) @@ -296,14 +296,14 @@ %!testif HAVE_GETPWENT %! s = getpwent (); %! endpwent (); -%! assert ((isstruct (s) -%! && isfield (s, "name") -%! && isfield (s, "passwd") -%! && isfield (s, "uid") -%! && isfield (s, "gid") -%! && isfield (s, "gecos") -%! && isfield (s, "dir") -%! && isfield (s, "shell"))); +%! assert (isstruct (s) +%! && isfield (s, "name") +%! && isfield (s, "passwd") +%! && isfield (s, "uid") +%! && isfield (s, "gid") +%! && isfield (s, "gecos") +%! && isfield (s, "dir") +%! && isfield (s, "shell")); %!error <Invalid call to getpwent> getpwent (1) @@ -338,11 +338,11 @@ %!testif HAVE_GETGRENT %! x = getgrent (); %! endgrent (); -%! assert ((isstruct (x) -%! && isfield (x, "name") -%! && isfield (x, "passwd") -%! && isfield (x, "gid") -%! && isfield (x, "mem"))); +%! assert (isstruct (x) +%! && isfield (x, "name") +%! && isfield (x, "passwd") +%! && isfield (x, "gid") +%! && isfield (x, "mem")); %!error <Invalid call to getgrent> getgrent (1)