Mercurial > octave
changeset 28886:d8318c12d903
test: remove unnecessary BIST tests in m-files checking for excessive number of inputs.
Remove BIST tests now that interpreter enforces calling function with no more than
the number of arguments defined in the function prototype.
* makeUniqueStrings.m, makeValidName.m, base64decode.m, base64encode.m,
record.m, sound.m, soundsc.m, acosd.m, acot.m, acotd.m, acoth.m, acsc.m,
acscd.m, acsch.m, asec.m, asecd.m, asech.m, asind.m, atan2d.m, atand.m, cosd.m,
cot.m, cotd.m, coth.m, csc.m, cscd.m, csch.m, sec.m, secd.m, sech.m, sind.m,
tand.m, accumdim.m, bincoeff.m, bitget.m, bitset.m, cell2mat.m, circshift.m,
cplxpair.m, cumtrapz.m, deg2rad.m, flip.m, fliplr.m, flipud.m, int2str.m,
interpft.m, logspace.m, num2str.m, postpad.m, prepad.m, rad2deg.m, rot90.m,
rotdim.m, shift.m, subsindex.m, trapz.m, rotx.m, roty.m, rotz.m, getappdata.m,
getpixelposition.m, guidata.m, isappdata.m, waitforbuttonpress.m,
__gripe_missing_component__.m, bessel.m, hsv2rgb.m, ind2gray.m, rgb2gray.m,
rgb2hsv.m, rgbplot.m, fileread.m, javachk.m, usejava.m, findstr.m,
genvarname.m, isdir.m, vectorize.m, cond.m, cross.m, duplication_matrix.m,
expm.m, isbanded.m, isdefinite.m, isdiag.m, ishermitian.m, issymmetric.m,
istril.m, istriu.m, trace.m, vech.m, vecnorm.m, cast.m, citation.m,
compare_versions.m, grabcode.m, inputname.m, isfile.m, isfolder.m, ismac.m,
ispc.m, isunix.m, list_primes.m, methods.m, news.m, open.m, run.m, swapbytes.m,
tar.m, verLessThan.m, zip.m, odeget.m, optimget.m, stemleaf.m, allchild.m,
ancestor.m, close.m, groot.m, hgsave.m, isaxes.m, isfigure.m, isgraphics.m,
ishandle.m, isprop.m, linkaxes.m, rotate.m, saveas.m, conv.m, poly.m,
polyint.m, polyreduce.m, ppval.m, roots.m, addpref.m, getpref.m, ispref.m,
rmpref.m, setpref.m, profile.m, profshow.m, powerset.m, autoreg_matrix.m,
bartlett.m, blackman.m, detrend.m, fftconv.m, fftfilt.m, fftshift.m, hamming.m,
hanning.m, ifftshift.m, sinewave.m, spectral_adf.m, spectral_xdf.m, unwrap.m,
nonzeros.m, spconvert.m, sprand.m, sprandn.m, beta.m, betainc.m, betaln.m,
cosint.m, expint.m, factorial.m, legendre.m, nchoosek.m, nthroot.m, perms.m,
pow2.m, primes.m, reallog.m, realpow.m, realsqrt.m, sinint.m, hankel.m, hilb.m,
invhilb.m, magic.m, pascal.m, toeplitz.m, vander.m, wilkinson.m, center.m,
corr.m, cov.m, discrete_cdf.m, discrete_inv.m, discrete_pdf.m, empirical_cdf.m,
empirical_inv.m, empirical_pdf.m, iqr.m, kendall.m, kurtosis.m, mad.m,
meansq.m, median.m, moment.m, prctile.m, quantile.m, range.m, run_count.m,
skewness.m, spearman.m, statistics.m, std.m, var.m, base2dec.m, bin2dec.m,
blanks.m, dec2base.m, dec2bin.m, dec2hex.m, endsWith.m, erase.m, hex2dec.m,
index.m, isletter.m, isstring.m, isstrprop.m, mat2str.m, ostrsplit.m, rindex.m,
startsWith.m, strtrunc.m, substr.m, fail.m, addtodate.m, asctime.m, ctime.m,
date.m, datestr.m, eomday.m, etime.m, is_leap_year.m, now.m:
remove unnecessary BIST tests in m-files checking for excessive number of inputs.
line wrap: on
line diff
--- a/scripts/+matlab/+lang/makeUniqueStrings.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/+matlab/+lang/makeUniqueStrings.m Fri Oct 09 13:28:53 2020 -0700 @@ -228,8 +228,7 @@ %! assert (uniqstr, {"a_1","a_2","a_4","a_6","a_5"}); ## Test input validation -%!error matlab.lang.makeUniqueStrings () -%!error [a, b, c] = matlab.lang.makeUniqueStrings ("a"); +%!error <Invalid call> matlab.lang.makeUniqueStrings () %!error <STR must be a string or cellstr> matlab.lang.makeUniqueStrings (1) %!error <STR and EX logical array must have the same length> %! matlab.lang.makeUniqueStrings ("a", [true false]);
--- a/scripts/+matlab/+lang/makeValidName.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/+matlab/+lang/makeValidName.m Fri Oct 09 13:28:53 2020 -0700 @@ -67,7 +67,7 @@ function [varname, ismodified] = makeValidName (str, varargin) - if (nargin == 0 || nargout > 2) + if (nargin == 0) print_usage (); endif @@ -218,7 +218,7 @@ %!error matlab.lang.makeValidName ("for", "Prefix", "for") ## Test input validation -%!error matlab.lang.makeValidName () +%!error <Invalid call> matlab.lang.makeValidName () %!error <STR must be a string or cellstr> matlab.lang.makeValidName (42) %!error <options must occur in pairs> matlab.lang.makeValidName ("a", "opt1") %!error <option argument must be a string>
--- a/scripts/+matlab/+net/base64decode.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/+matlab/+net/base64decode.m Fri Oct 09 13:28:53 2020 -0700 @@ -58,7 +58,7 @@ %!assert (matlab.net.base64decode ("YWJjZGVmZw=="), uint8 ("abcdefg")); ## Test input validation -%!error matlab.net.base64decode () +%!error <Invalid call> matlab.net.base64decode () %!error <character vector> matlab.net.base64decode (pi) %!error <character vector> matlab.net.base64decode ({1,2}) %!error <character vector> matlab.net.base64decode ([1,2;3,4])
--- a/scripts/+matlab/+net/base64encode.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/+matlab/+net/base64encode.m Fri Oct 09 13:28:53 2020 -0700 @@ -61,7 +61,7 @@ %!assert (matlab.net.base64encode ("abcdefg"), "YWJjZGVmZw=="); ## Test input validation -%!error matlab.net.base64encode () +%!error <Invalid call> matlab.net.base64encode () %!error <numeric or character vector> matlab.net.base64encode ({1,2}) %!error <numeric or character vector> matlab.net.base64encode ([1,2;3,4]) %!error <consist of integers> matlab.net.base64encode (pi)
--- a/scripts/audio/record.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/audio/record.m Fri Oct 09 13:28:53 2020 -0700 @@ -38,11 +38,15 @@ function x = record (sec, fs = 8000) - if (! (isscalar (sec) && (sec >= 0))) + if (nargin < 1) + print_usage (); + endif + + if (! (isscalar (sec) && sec >= 0)) error ("record: recording duration SEC must be a non-negative number"); endif - if (! (isscalar (fs) && (fs > 0))) + if (! (isscalar (fs) && fs > 0)) error ("record: sample rate FS must be a positive number"); endif @@ -62,11 +66,10 @@ ## Tests of record must not actually record anything. - %!assert (isempty (record (0))) ## Test input validation -%!error record () -%!error record (1,2,3) -%!error record (-1) -%!error record (1, -1) +%!error <SEC must be a non-negative number> record (ones (2,2)) +%!error <SEC must be a non-negative number> record (-1) +%!error <FS must be a positive number> record (1, ones (2,2)) +%!error <FS must be a positive number> record (1, -1)
--- a/scripts/audio/sound.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/audio/sound.m Fri Oct 09 13:28:53 2020 -0700 @@ -51,7 +51,7 @@ if (nargin < 2 || isempty (fs)) fs = 8000; - elseif (! (isscalar (fs) && (fs > 0))) + elseif (! (isscalar (fs) && fs > 0)) error ("sound: sample rate FS must be a positive number"); endif @@ -71,7 +71,7 @@ ## Tests of sound must not actually play anything. ## Test input validation -%!error sound () -%!error sound (1,2,3,4) -%!error sound (1, -1) -%!error sound (1, [], 2) +%!error <Invalid call> sound () +%!error <FS must be a positive number> sound (1, ones (2,2)) +%!error <FS must be a positive number> sound (1, -1) +%!error <NBITS must be 8, 16, or 24> sound (1, [], 2)
--- a/scripts/audio/soundsc.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/audio/soundsc.m Fri Oct 09 13:28:53 2020 -0700 @@ -64,7 +64,7 @@ elseif (nargin == 2 && numel (fs) > 1) yrange = fs; fs = 8000; - elseif (! (isscalar (fs) && (fs > 0))) + elseif (! (isscalar (fs) && fs > 0)) error ("soundsc: sample rate FS must be a positive number"); endif @@ -102,15 +102,14 @@ ## Tests of soundsc must not actually play anything. - ## Test input validation -%!error soundsc () -%!error soundsc (1,2,3,4,5) -%!error soundsc (1, -1) -%!error soundsc (1, [], 2) -%!error soundsc (1, [2 1]) -%!error soundsc (1, [1 2 3]) -%!error soundsc (1, 8000, [2 1]) -%!error soundsc (1, 8000, [1 2 3]) -%!error soundsc (1, 8000, 8, [2 1]) -%!error soundsc (1, 8000, 8, [1 2 3]) +%!error <Invalid call> soundsc () +%!error <FS must be a positive number> soundsc (1, ones (2,2), 8) +%!error <FS must be a positive number> soundsc (1, -1) +%!error <NBITS must be 8, 16, or 24> soundsc (1, [], 2) +%!error <range must be a 2-element .* vector> soundsc (1, [2 1]) +%!error <range must be a 2-element .* vector> soundsc (1, [1 2 3]) +%!error <range must be a 2-element .* vector> soundsc (1, 8000, [2 1]) +%!error <range must be a 2-element .* vector> soundsc (1, 8000, [1 2 3]) +%!error <range must be a 2-element .* vector> soundsc (1, 8000, 8, [2 1]) +%!error <range must be a 2-element .* vector> soundsc (1, 8000, 8, [1 2 3])
--- a/scripts/elfun/acosd.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/acosd.m Fri Oct 09 13:28:53 2020 -0700 @@ -43,4 +43,3 @@ %!assert (acosd (0:0.1:1), 180/pi * acos (0:0.1:1), -10*eps) %!error acosd () -%!error acosd (1, 2)
--- a/scripts/elfun/acot.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/acot.m Fri Oct 09 13:28:53 2020 -0700 @@ -48,4 +48,3 @@ %! assert (acot (x), v, sqrt (eps)); %!error acot () -%!error acot (1, 2)
--- a/scripts/elfun/acotd.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/acotd.m Fri Oct 09 13:28:53 2020 -0700 @@ -43,4 +43,3 @@ %!assert (acotd (0:10:90), 180/pi * acot (0:10:90), -10*eps) %!error acotd () -%!error acotd (1, 2)
--- a/scripts/elfun/acoth.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/acoth.m Fri Oct 09 13:28:53 2020 -0700 @@ -48,4 +48,3 @@ %! assert (acoth (x), v, sqrt (eps)); %!error acoth () -%!error acoth (1, 2)
--- a/scripts/elfun/acsc.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/acsc.m Fri Oct 09 13:28:53 2020 -0700 @@ -48,4 +48,3 @@ %! assert (acsc (x), v, sqrt (eps)); %!error acsc () -%!error acsc (1, 2)
--- a/scripts/elfun/acscd.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/acscd.m Fri Oct 09 13:28:53 2020 -0700 @@ -43,4 +43,3 @@ %!assert (acscd (0:10:90), 180/pi * acsc (0:10:90), -10*eps) %!error acscd () -%!error acscd (1, 2)
--- a/scripts/elfun/acsch.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/acsch.m Fri Oct 09 13:28:53 2020 -0700 @@ -46,4 +46,3 @@ %! assert (acsch (x), v, sqrt (eps)); %!error acsch () -%!error acsch (1, 2)
--- a/scripts/elfun/asec.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/asec.m Fri Oct 09 13:28:53 2020 -0700 @@ -48,4 +48,3 @@ %! assert (asec (x), v, sqrt (eps)); %!error asec () -%!error asec (1, 2)
--- a/scripts/elfun/asecd.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/asecd.m Fri Oct 09 13:28:53 2020 -0700 @@ -43,4 +43,3 @@ %!assert (asecd (0:10:90), 180/pi * asec (0:10:90), -10*eps) %!error asecd () -%!error asecd (1, 2)
--- a/scripts/elfun/asech.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/asech.m Fri Oct 09 13:28:53 2020 -0700 @@ -54,4 +54,3 @@ %! assert (asech (x), v, sqrt (eps)); %!error asech () -%!error asech (1, 2)
--- a/scripts/elfun/asind.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/asind.m Fri Oct 09 13:28:53 2020 -0700 @@ -43,4 +43,3 @@ %!assert (asind (0:0.1:1), 180/pi * asin (0:0.1:1), -10*eps) %!error asind () -%!error asind (1, 2)
--- a/scripts/elfun/atan2d.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/atan2d.m Fri Oct 09 13:28:53 2020 -0700 @@ -43,5 +43,5 @@ %!assert (atan2d (-1:.1:1, 1:-.1:-1), 180/pi * atan2 (-1:.1:1, 1:-.1:-1), -10*eps) -%!error atan2d () -%!error atan2d (1) +%!error <Invalid call> atan2d () +%!error <Invalid call> atan2d (1)
--- a/scripts/elfun/atand.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/atand.m Fri Oct 09 13:28:53 2020 -0700 @@ -43,4 +43,3 @@ %!assert (atand (0:10:90), 180/pi * atan (0:10:90), -10*eps) %!error atand () -%!error atand (1, 2)
--- a/scripts/elfun/cosd.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/cosd.m Fri Oct 09 13:28:53 2020 -0700 @@ -50,4 +50,3 @@ %!assert (cosd ([90, 270]) == 0) %!error cosd () -%!error cosd (1, 2)
--- a/scripts/elfun/cot.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/cot.m Fri Oct 09 13:28:53 2020 -0700 @@ -48,4 +48,3 @@ %! assert (cot (x), v, sqrt (eps)); %!error cot () -%!error cot (1, 2)
--- a/scripts/elfun/cotd.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/cotd.m Fri Oct 09 13:28:53 2020 -0700 @@ -45,4 +45,3 @@ %!assert (cotd ([90, 270]) == 0) %!error cotd () -%!error cotd (1, 2)
--- a/scripts/elfun/coth.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/coth.m Fri Oct 09 13:28:53 2020 -0700 @@ -46,4 +46,3 @@ %! assert (coth (x), v, sqrt (eps)); %!error coth () -%!error coth (1, 2)
--- a/scripts/elfun/csc.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/csc.m Fri Oct 09 13:28:53 2020 -0700 @@ -48,4 +48,3 @@ %! assert (csc (x), v, sqrt (eps)); %!error csc () -%!error csc (1, 2)
--- a/scripts/elfun/cscd.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/cscd.m Fri Oct 09 13:28:53 2020 -0700 @@ -45,4 +45,3 @@ %!assert (cscd ([90, 270]) != Inf) %!error cscd () -%!error cscd (1, 2)
--- a/scripts/elfun/csch.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/csch.m Fri Oct 09 13:28:53 2020 -0700 @@ -46,4 +46,3 @@ %! assert (csch (x), v, sqrt (eps)); %!error csch () -%!error csch (1, 2)
--- a/scripts/elfun/sec.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/sec.m Fri Oct 09 13:28:53 2020 -0700 @@ -48,4 +48,3 @@ %! assert (sec (x), v, sqrt (eps)); %!error sec () -%!error sec (1, 2)
--- a/scripts/elfun/secd.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/secd.m Fri Oct 09 13:28:53 2020 -0700 @@ -45,4 +45,3 @@ %!assert (secd ([90, 270]) == Inf) %!error secd () -%!error secd (1, 2)
--- a/scripts/elfun/sech.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/sech.m Fri Oct 09 13:28:53 2020 -0700 @@ -46,4 +46,3 @@ %! assert (sech (x), v, sqrt (eps)); %!error sech () -%!error sech (1, 2)
--- a/scripts/elfun/sind.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/sind.m Fri Oct 09 13:28:53 2020 -0700 @@ -49,4 +49,3 @@ %!assert (sind ([90, 270]) != 0) %!error sind () -%!error sind (1, 2)
--- a/scripts/elfun/tand.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/elfun/tand.m Fri Oct 09 13:28:53 2020 -0700 @@ -52,4 +52,3 @@ %!assert (tand ([90, 270]) == Inf) %!error tand () -%!error tand (1, 2)
--- a/scripts/general/accumdim.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/accumdim.m Fri Oct 09 13:28:53 2020 -0700 @@ -172,8 +172,8 @@ %!assert (accumdim ([1;3;1;3;3], a, 1, 4, [], pi)([2 4],:,:), pi (2,5,5)) ## Test input validation -%!error accumdim (1) -%!error accumdim (1,2,3,4,5,6,7) +%!error <Invalid call> accumdim () +%!error <Invalid call> accumdim (1) %!error <SUBS must be a subscript vector> accumdim (ones (2,2), ones (2,2)) %!error <indices must be positive integers> accumdim ([-1 1], ones (2,2)) %!error <N index out of range> accumdim ([1 2], ones (2,2), 1, 1)
--- a/scripts/general/bincoeff.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/bincoeff.m Fri Oct 09 13:28:53 2020 -0700 @@ -118,7 +118,7 @@ %!assert (bincoeff ([4 NaN 4], [-1, 2, 2.5]), NaN (1, 3)) ## Test input validation -%!error bincoeff () -%!error bincoeff (1, 2, 3) -%!error bincoeff (ones (3),ones (2)) -%!error bincoeff (ones (2),ones (3)) +%!error <Invalid call> bincoeff () +%!error <Invalid call> bincoeff (1) +%!error bincoeff (ones (3), ones (2)) +%!error bincoeff (ones (2), ones (3))
--- a/scripts/general/bitget.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/bitget.m Fri Oct 09 13:28:53 2020 -0700 @@ -103,23 +103,19 @@ %! endfor %! endfor -%!error bitget (0, 0) -%!error bitget (0, 55) - -%!error bitget (single (0), 0) -%!error bitget (single (0), 26) - -%!error bitget (int8 (0), 9) -%!error bitget (uint8 (0), 9) - -%!error bitget (int16 (0), 17) -%!error bitget (uint16 (0), 17) - -%!error bitget (int32 (0), 33) -%!error bitget (uint32 (0), 33) - -%!error bitget (int64 (0), 65) -%!error bitget (uint64 (0), 65) - -%!error bitget (1) -%!error bitget (1, 2, 3) +## Test input validation +%!error <Invalid call> bitget () +%!error <Invalid call> bitget (1) +%!error <invalid class> bitget ("char", 1) +%!error <N must be in the range \[1,53\]> bitget (0, 0) +%!error <N must be in the range \[1,53\]> bitget (0, 55) +%!error <N must be in the range \[1,24\]> bitget (single (0), 0) +%!error <N must be in the range \[1,24\]> bitget (single (0), 26) +%!error <N must be in the range \[1,8\]> bitget (int8 (0), 9) +%!error <N must be in the range \[1,8\]> bitget (uint8 (0), 9) +%!error <N must be in the range \[1,16\]> bitget (int16 (0), 17) +%!error <N must be in the range \[1,16\]> bitget (uint16 (0), 17) +%!error <N must be in the range \[1,32\]> bitget (int32 (0), 33) +%!error <N must be in the range \[1,32\]> bitget (uint32 (0), 33) +%!error <N must be in the range \[1,64\]> bitget (int64 (0), 65) +%!error <N must be in the range \[1,64\]> bitget (uint64 (0), 65)
--- a/scripts/general/bitset.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/bitset.m Fri Oct 09 13:28:53 2020 -0700 @@ -141,8 +141,9 @@ %!assert <*54110> (bitset (1:5, 1, 1), [1, 3, 3, 5, 5]) %!assert (bitset (1:5, 1, [1, 1, 1, 1, 0]), [1, 3, 3, 5, 4]) -%!error bitset (1) -%!error bitset (1, 2, 3, 4) +## Test input validation +%!error <Invalid call> bitset () +%!error <Invalid call> bitset (1) %!error <A must be .= 0> bitset (-1, 2) %!error <must be the same size or scalar> bitset (1, [1 2], [1 2 3]) %!error <must be the same size or scalar> bitset ([1 2], [1 2 3])
--- a/scripts/general/cell2mat.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/cell2mat.m Fri Oct 09 13:28:53 2020 -0700 @@ -130,8 +130,7 @@ %!assert (cell2mat ({"foo", "lol"; "bar", "qux"}), %! reshape ("fboaorlqoulx", [2 6])) -%!error cell2mat () -%!error cell2mat (1,2) +%!error <Invalid call> cell2mat () %!error <C must be a cell array> cell2mat ([1,2]) %!error <mixed cells, structs, and matrices> cell2mat ({[1], struct()}) %!error <mixed cells, structs, and matrices> cell2mat ({[1], {1}})
--- a/scripts/general/circshift.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/circshift.m Fri Oct 09 13:28:53 2020 -0700 @@ -141,9 +141,8 @@ %!test <*53178> assert (circshift (1:4, 1, 1), 1:4) ## Test input validation -%!error circshift () -%!error circshift (1) -%!error circshift (1,2,3) +%!error <Invalid call> circshift () +%!error <Invalid call> circshift (1) %!error <N must be a scalar> circshift (1, [2 3], 4) %!error <N must be a vector> circshift (1, ones (2,2)) %!error <no longer than the number of dimensions in X> circshift (1, [1 2 3])
--- a/scripts/general/cplxpair.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/cplxpair.m Fri Oct 09 13:28:53 2020 -0700 @@ -175,8 +175,7 @@ %! cplxpair ([2e6 + j; 2e6 - j; 1e-9 * (1 + j); 1e-9 * (1 - 2j)]); ## Test input validation -%!error cplxpair () -%!error cplxpair (1,2,3,4) +%!error <Invalid call> cplxpair () %!error <cplxpair: TOL must be .* scalar number> cplxpair (1, ones (2,2)) %!error <cplxpair: TOL must be .* in the range 0 <= TOL < 1> cplxpair (1, -1) %!error <cplxpair: TOL must be .* in the range 0 <= TOL < 1> cplxpair (1, -1)
--- a/scripts/general/cumtrapz.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/cumtrapz.m Fri Oct 09 13:28:53 2020 -0700 @@ -158,8 +158,7 @@ %!assert (cumtrapz (x2,y,3), reshape ([0,3,8;0,9,20],[1 2 3])) ## Test input validation -%!error cumtrapz () -%!error cumtrapz (1,2,3,4) +%!error <Invalid call> cumtrapz () %!error <DIM must be an integer> cumtrapz (1, 2, [1 2]) %!error <DIM must be an integer> cumtrapz (1, 2, 1.5) %!error <DIM must be .* a valid dimension> cumtrapz (1, 2, 0)
--- a/scripts/general/deg2rad.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/deg2rad.m Fri Oct 09 13:28:53 2020 -0700 @@ -67,7 +67,6 @@ %!assert (deg2rad ([0, 90, 180, 270, 360]), pi*[0, 1/2, 1, 3/2, 2]) ## Test input validation -%!error deg2rad () -%!error deg2rad (1, 2) +%!error <Invalid call> deg2rad () %!error <DEG must be a floating point class> deg2rad (uint8 (1)) %!error <DEG must be a floating point class> deg2rad ("A")
--- a/scripts/general/flip.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/flip.m Fri Oct 09 13:28:53 2020 -0700 @@ -107,6 +107,5 @@ %! assert (flip (a, 4), b); %! assert (flip (a, 5), a); -%!error flip () -%!error flip (1, 2, 3) +%!error <Invalid call> flip () %!error <DIM must be a positive integer> flip (magic (3), -1)
--- a/scripts/general/fliplr.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/fliplr.m Fri Oct 09 13:28:53 2020 -0700 @@ -78,5 +78,5 @@ %! a(:,1,:,2) = [ 5 6 7 8]; %! assert (fliplr (a), a); -%!error fliplr() -%!error fliplr (1, 2) +## Test input validation +%!error fliplr ()
--- a/scripts/general/flipud.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/flipud.m Fri Oct 09 13:28:53 2020 -0700 @@ -78,5 +78,4 @@ %! a(1,:,:,2) = [ 5 6 7 8]; %! assert (flipud (a), a); -%!error flipud () -%!error flipud (1, 2) +%!error <Invalid call> flipud ()
--- a/scripts/general/int2str.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/int2str.m Fri Oct 09 13:28:53 2020 -0700 @@ -108,6 +108,5 @@ %!assert (int2str ([1, 2, 3; 4, 5, 6]), ["1 2 3";"4 5 6"]) %!assert (int2str ([]), "") -%!error int2str () -%!error int2str (1, 2) +%!error <Invalid call> int2str () %!error <N must be a numeric> int2str ({1})
--- a/scripts/general/interpft.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/interpft.m Fri Oct 09 13:28:53 2020 -0700 @@ -141,9 +141,8 @@ %! assert (max (abs (imag (interpft ([1:9], 21)))), 0, 21*eps) ## Test input validation -%!error interpft () -%!error interpft (1) -%!error interpft (1,2,3) +%!error <Invalid call> interpft () +%!error <Invalid call> interpft (1) %!error <N must be a scalar integer> interpft (1,[2,2]) %!error <N must be a scalar integer> interpft (1,2.1) %!error <invalid dimension DIM> interpft (1,2,0)
--- a/scripts/general/logspace.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/logspace.m Fri Oct 09 13:28:53 2020 -0700 @@ -119,8 +119,7 @@ ##%!assert (logspace (Inf, 0, 3), [Inf, NaN, 1]) ## Test input validation -%!error logspace () -%!error logspace (1, 2, 3, 4) +%!error <Invalid call> logspace () %!error logspace ([1, 2; 3, 4], 5, 6) %!error logspace (1, [1, 2; 3, 4], 6) %!error logspace (1, 2, [1, 2; 3, 4])
--- a/scripts/general/num2str.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/num2str.m Fri Oct 09 13:28:53 2020 -0700 @@ -265,8 +265,7 @@ %!assert <*45174> (num2str ([65 66 67], "%s"), "ABC") ## Test input validation -%!error num2str () -%!error num2str (1, 2, 3) +%!error <Invalid call> num2str () %!error <X must be a numeric> num2str ({1}) %!error <PRECISION must be a scalar integer .= 0> num2str (1, {1}) %!error <PRECISION must be a scalar integer .= 0> num2str (1, ones (2))
--- a/scripts/general/postpad.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/postpad.m Fri Oct 09 13:28:53 2020 -0700 @@ -113,6 +113,5 @@ %!assert <*44162> (postpad ("Octave", 16, "x"), "Octavexxxxxxxxxx") %!assert (postpad ("Octave", 4), "Octa") -%!error postpad () -%!error postpad (1) -%!error postpad (1,2,3,4,5) +%!error <Invalid call> postpad () +%!error <Invalid call> postpad (1)
--- a/scripts/general/prepad.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/prepad.m Fri Oct 09 13:28:53 2020 -0700 @@ -118,9 +118,8 @@ ## FIXME: We need tests for multidimensional arrays. -%!error prepad () -%!error prepad (1) -%!error prepad (1,2,3,4,5) +%!error <Invalid call> prepad () +%!error <Invalid call> prepad (1) %!error <C must be empty or a scalar> prepad ([1,2], 2, ones (2)) %!error <DIM must be an integer> prepad ([1,2], 2, 2, ones (3)) %!error <DIM must be an integer> prepad ([1,2], 2, 2, 1.1)
--- a/scripts/general/rad2deg.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/rad2deg.m Fri Oct 09 13:28:53 2020 -0700 @@ -67,7 +67,6 @@ %!assert (rad2deg (pi*[0, 1/2, 1, 3/2, 2]), [0, 90, 180, 270, 360]) ## Test input validation -%!error rad2deg () -%!error rad2deg (1, 2) +%!error <Invalid call> rad2deg () %!error <RAD must be a floating point class> rad2deg (uint8 (1)) %!error <RAD must be a floating point class> rad2deg ("A")
--- a/scripts/general/rot90.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/rot90.m Fri Oct 09 13:28:53 2020 -0700 @@ -140,8 +140,7 @@ %! assert (rot90 (a, 3), rot90 (b, 2)); ## Test input validation -%!error rot90 () -%!error rot90 (1, 2, 3) +%!error <Invalid call> rot90 () %!error rot90 (1, ones (2)) %!error rot90 (1, 1.5) %!error rot90 (1, 1+i)
--- a/scripts/general/rotdim.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/rotdim.m Fri Oct 09 13:28:53 2020 -0700 @@ -164,5 +164,4 @@ ## FIXME: We need tests for multidimensional arrays ## and different values of PLANE. -%!error rotdim () -%!error rotdim (1, 2, 3, 4) +%!error <Invalid call> rotdim ()
--- a/scripts/general/shift.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/shift.m Fri Oct 09 13:28:53 2020 -0700 @@ -91,11 +91,11 @@ %! assert (shift (m, -2), [c; a; b]); ## Test input validation -%!error shift () -%!error shift (1, 2, 3, 4) -%!error shift ([], 1) -%!error shift (ones (2), ones (2)) -%!error shift (ones (2), 1.5) -%!error shift (1, 1, 1.5) -%!error shift (1, 1, 0) -%!error shift (1, 1, 3) +%!error <Invalid call> shift () +%!error <Invalid call> shift (1) +%!error <X must not be empty> shift ([], 1) +%!error <B must be an integer> shift (ones (2), ones (2)) +%!error <B must be an integer> shift (ones (2), 1.5) +%!error <DIM must be an integer> shift (1, 1, 1.5) +%!error <DIM must be .* a valid dimension> shift (1, 1, 0) +%!error <DIM must be .* a valid dimension> shift (1, 1, 3)
--- a/scripts/general/subsindex.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/subsindex.m Fri Oct 09 13:28:53 2020 -0700 @@ -82,5 +82,4 @@ %!error <not defined for class "double"> subsindex (1) ## Test input validation -%!error subsindex () -%!error subsindex (1, 2) +%!error <Invalid call> subsindex ()
--- a/scripts/general/trapz.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/general/trapz.m Fri Oct 09 13:28:53 2020 -0700 @@ -153,8 +153,7 @@ %!assert <*54277> (trapz (ones (3,1), 2), zeros (3,1)) ## Test input validation -%!error trapz () -%!error trapz (1,2,3,4) +%!error <Invalid call> trapz () %!error <DIM must be an integer> trapz (1, 2, [1 2]) %!error <DIM must be an integer> trapz (1, 2, 1.5) %!error <DIM must be .* a valid dimension> trapz (1, 2, 0)
--- a/scripts/geometry/rotx.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/geometry/rotx.m Fri Oct 09 13:28:53 2020 -0700 @@ -83,7 +83,7 @@ function retmat = rotx (angle_in_deg) - if ((nargin != 1) || ! isscalar (angle_in_deg)) + if (nargin != 1 || ! isscalar (angle_in_deg)) print_usage (); endif @@ -96,13 +96,13 @@ endfunction + ## Function output tests -%!assert (rotx (0), [1 0 0; 0 1 0; 0 0 1]); -%!assert (rotx (45), [1, 0, 0; [0; 0],[(sqrt(2)/2).*[1 -1; 1 1]]], 1e-12); -%!assert (rotx (90), [1 0 0; 0 0 -1; 0 1 0], 1e-12); -%!assert (rotx (180), [1 0 0; 0 -1 0; 0 0 -1], 1e-12); +%!assert (rotx (0), [1 0 0; 0 1 0; 0 0 1]) +%!assert (rotx (45), [1, 0, 0; [0; 0],[(sqrt(2)/2).*[1 -1; 1 1]]], 1e-12) +%!assert (rotx (90), [1 0 0; 0 0 -1; 0 1 0], 1e-12) +%!assert (rotx (180), [1 0 0; 0 -1 0; 0 0 -1], 1e-12) ## Test input validation -%!error rotx () -%!error rotx (1, 2) -%!error rotx ([1 2 3]) +%!error <Invalid call> rotx () +%!error <Invalid call> rotx ([1 2 3])
--- a/scripts/geometry/roty.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/geometry/roty.m Fri Oct 09 13:28:53 2020 -0700 @@ -83,7 +83,7 @@ function retmat = roty (angle_in_deg) - if ((nargin != 1) || ! isscalar (angle_in_deg)) + if (nargin != 1 || ! isscalar (angle_in_deg)) print_usage (); endif @@ -96,13 +96,13 @@ endfunction + ## Function output tests -%!assert (roty (0), [1 0 0; 0 1 0; 0 0 1]); -%!assert (roty (45), [sqrt(2) 0 sqrt(2); 0 2 0; -sqrt(2) 0 sqrt(2)]./2, 1e-12); -%!assert (roty (90), [0 0 1; 0 1 0; -1 0 0], 1e-12); -%!assert (roty (180), [-1 0 0; 0 1 0; 0 0 -1], 1e-12); +%!assert (roty (0), [1 0 0; 0 1 0; 0 0 1]) +%!assert (roty (45), [sqrt(2) 0 sqrt(2); 0 2 0; -sqrt(2) 0 sqrt(2)]./2, 1e-12) +%!assert (roty (90), [0 0 1; 0 1 0; -1 0 0], 1e-12) +%!assert (roty (180), [-1 0 0; 0 1 0; 0 0 -1], 1e-12) ## Test input validation -%!error roty () -%!error roty (1, 2) -%!error roty ([1 2 3]) +%!error <Invalid call> roty () +%!error <Invalid call> roty ([1 2 3])
--- a/scripts/geometry/rotz.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/geometry/rotz.m Fri Oct 09 13:28:53 2020 -0700 @@ -83,7 +83,7 @@ function retmat = rotz (angle_in_deg) - if ((nargin != 1) || ! isscalar (angle_in_deg)) + if (nargin != 1 || ! isscalar (angle_in_deg)) print_usage (); endif @@ -96,13 +96,13 @@ endfunction + ## Function output tests -%!assert (rotz (0), [1 0 0; 0 1 0; 0 0 1]); -%!assert (rotz (45), [(sqrt(2)/2).*[1 -1; 1 1] ,[0; 0]; 0, 0, 1], 1e-12); -%!assert (rotz (90), [0 -1 0; 1 0 0; 0 0 1], 1e-12); -%!assert (rotz (180), [-1 0 0; 0 -1 0; 0 0 1], 1e-12); +%!assert (rotz (0), [1 0 0; 0 1 0; 0 0 1]) +%!assert (rotz (45), [(sqrt(2)/2).*[1 -1; 1 1] ,[0; 0]; 0, 0, 1], 1e-12) +%!assert (rotz (90), [0 -1 0; 1 0 0; 0 0 1], 1e-12) +%!assert (rotz (180), [-1 0 0; 0 -1 0; 0 0 1], 1e-12) ## Test input validation -%!error rotz () -%!error rotz (1, 2) -%!error rotz ([1 2 3]) +%!error <Invalid call> rotz () +%!error <Invalid call> rotz ([1 2 3])
--- a/scripts/gui/getappdata.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/gui/getappdata.m Fri Oct 09 13:28:53 2020 -0700 @@ -90,8 +90,7 @@ %! end_unwind_protect ## Test input validation -%!error getappdata () -%!error getappdata (1,2,3) +%!error <Invalid call> getappdata () %!error <H must be a scalar .* graphic handle> getappdata (-1, "hello") %!error <NAME must be a string> getappdata (0, 1) %!error <Only one handle H may be used when fetching appdata> getappdata ([0 0])
--- a/scripts/gui/getpixelposition.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/gui/getpixelposition.m Fri Oct 09 13:28:53 2020 -0700 @@ -120,8 +120,7 @@ %! end_unwind_protect ## Test input validation -%!error getpixelposition () -%!error getpixelposition (1,2,3) +%!error <Invalid call> getpixelposition () %!error <H must be a scalar> getpixelposition ([1, 2]) %!error <H must be a .* graphics handle> getpixelposition (-1)
--- a/scripts/gui/guidata.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/gui/guidata.m Fri Oct 09 13:28:53 2020 -0700 @@ -65,7 +65,6 @@ ## Test input validation -%!error guidata () -%!error guidata (1,2,3) +%!error <Invalid call> guidata () %!error <H must be a valid object handle> guidata ({1}) %!error <no ancestor figure of H found> guidata (0)
--- a/scripts/gui/isappdata.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/gui/isappdata.m Fri Oct 09 13:28:53 2020 -0700 @@ -66,7 +66,6 @@ %! end_unwind_protect ## Test input validation -%!error isappdata () -%!error isappdata (1,2,3) +%!error <Invalid call> isappdata () %!error <H must be a scalar .* graphic handle> isappdata (-1, "hello") %!error <NAME must be a string> isappdata (0, 1)
--- a/scripts/gui/waitforbuttonpress.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/gui/waitforbuttonpress.m Fri Oct 09 13:28:53 2020 -0700 @@ -50,8 +50,3 @@ endif endfunction - - -## Test input validation -%!error waitforbuttonpress (1) -%!error [a,b,c] = waitforbuttonpress ()
--- a/scripts/help/__gripe_missing_component__.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/help/__gripe_missing_component__.m Fri Oct 09 13:28:53 2020 -0700 @@ -62,14 +62,15 @@ endfunction -## WARNING: Tests cannot rely on the exact error strings shown above because we -## specifically allow these messages to be overridden by -## missing_component_hook. The prefix is all we can be sure of. +## NOTE: Tests cannot rely on the exact error strings shown above because we +## specifically allow these messages to be overridden by +## missing_component_hook. The prefix is all we can be sure of. %!error <abc: .*> __gripe_missing_component__ ("abc", "info-file") %!error <abc: .*> __gripe_missing_component__ ("abc", "octave") %!error <abc: .*> __gripe_missing_component__ ("abc", "octave-config") %!error <abc: .*> __gripe_missing_component__ ("abc", "xyz") +%!error <Invalid call> __gripe_missing_component__ () %!error __gripe_missing_component__ () %!error __gripe_missing_component__ ("fcn") %!error __gripe_missing_component__ ("fcn", 1 , 2)
--- a/scripts/help/bessel.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/help/bessel.m Fri Oct 09 13:28:53 2020 -0700 @@ -101,4 +101,4 @@ endfunction -%!error bessel () +%!error <you must use besselj, ...> bessel ()
--- a/scripts/image/hsv2rgb.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/image/hsv2rgb.m Fri Oct 09 13:28:53 2020 -0700 @@ -136,8 +136,7 @@ %!assert (hsv2rgb (sparse ([1 1 1])), sparse ([1 0 0])) ## Test input validation -%!error hsv2rgb () -%!error hsv2rgb (1,2) +%!error <Invalid call> hsv2rgb () %!error <invalid data type> hsv2rgb ({1}) %!error <HSV must be a colormap or HSV image> hsv2rgb (ones (2,2))
--- a/scripts/image/ind2gray.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/image/ind2gray.m Fri Oct 09 13:28:53 2020 -0700 @@ -77,9 +77,8 @@ %!assert (gray2ind (i2g, 100), uint8 (0:99)) ## Test input validation -%!error ind2gray () -%!error ind2gray (1) -%!error ind2gray (1,2,3) +%!error <Invalid call> ind2gray () +%!error <Invalid call> ind2gray (1) %!error <X must be an indexed image> ind2gray (ones (3,3,3), jet (64)) %!error <X must be an indexed image> ind2gray (1+i, jet (64)) %!error <X must be an indexed image> ind2gray (sparse (1), jet (64))
--- a/scripts/image/rgb2gray.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/image/rgb2gray.m Fri Oct 09 13:28:53 2020 -0700 @@ -161,7 +161,6 @@ %! assert (rgb2gray (single (rgb_double)), single (expected)); ## Test input validation -%!error rgb2gray () -%!error rgb2gray (1,2) +%!error <Invalid call> rgb2gray () %!error <invalid data type 'cell'> rgb2gray ({1}) %!error <RGB must be a colormap or RGB image> rgb2gray (ones (2,2))
--- a/scripts/image/rgb2hsv.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/image/rgb2hsv.m Fri Oct 09 13:28:53 2020 -0700 @@ -113,8 +113,7 @@ %!assert (rgb2hsv (sparse ([1 1 1])), sparse ([0 0 1])) ## Test input validation -%!error rgb2hsv () -%!error rgb2hsv (1,2) +%!error <Invalid call> rgb2hsv () %!error <invalid data type 'cell'> rgb2hsv ({1}) %!error <RGB must be a colormap or RGB image> rgb2hsv (ones (2,2))
--- a/scripts/image/rgbplot.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/image/rgbplot.m Fri Oct 09 13:28:53 2020 -0700 @@ -91,8 +91,7 @@ %! rgbplot (ocean, "composite"); ## Test input validation -%!error rgbplot () -%!error rgbplot (1,2) +%!error <Invalid call> rgbplot () %!error <CMAP must be a valid colormap> rgbplot ({0 1 0}) %!error <STYLE must be a string> rgbplot ([0 1 0], 2) %!error <unknown STYLE 'nostyle'> rgbplot ([0 1 0], "nostyle")
--- a/scripts/io/fileread.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/io/fileread.m Fri Oct 09 13:28:53 2020 -0700 @@ -64,6 +64,5 @@ %! assert (str, [cstr{1} "\n" cstr{2} "\n" cstr{3} "\n"]); ## Test input validation -%!error fileread () -%!error fileread (1, 2) +%!error <Invalid call> fileread () %!error <FILENAME argument must be a string> fileread (1)
--- a/scripts/java/javachk.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/java/javachk.m Fri Oct 09 13:28:53 2020 -0700 @@ -158,7 +158,7 @@ %! assert (javachk ("jvm"), stnul); ## Test input validation -%!error javachk () -%!error javachk (1) +%!error <Invalid call> javachk () +%!error <FEATURE must be a string> javachk (1) %!error javachk ("jvm", 2) %!error javachk ("jvm", "feature", "ok")
--- a/scripts/java/usejava.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/java/usejava.m Fri Oct 09 13:28:53 2020 -0700 @@ -92,7 +92,6 @@ %! assert (usejava ("jvm"), true); ## Test input validation -%!error usejava () -%!error usejava (1, 2) -%!error usejava (1) +%!error <Invalid call> usejava () +%!error <Invalid call> usejava (1) %!error <unrecognized FEATURE> usejava ("abc")
--- a/scripts/legacy/findstr.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/legacy/findstr.m Fri Oct 09 13:28:53 2020 -0700 @@ -157,6 +157,6 @@ %!assert (findstr ("aba", "abababa", 0), [1, 5]) ## Test input validation -%!error findstr () -%!error findstr ("foo", "bar", 3, 4) +%!error <Invalid call> findstr () +%!error <Invalid call> findstr ("str1") %!error <must have only one non-singleton dimension> findstr (["AB" ; "CD"], "C")
--- a/scripts/legacy/genvarname.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/legacy/genvarname.m Fri Oct 09 13:28:53 2020 -0700 @@ -227,8 +227,7 @@ %!assert (genvarname ("x", {"a", "b"; "x", "d"}), "x1") ## Test input validation -%!error genvarname () -%!error genvarname (1,2,3) +%!error <Invalid call> genvarname () %!error <more than one STR is given, it must be a cellstr> genvarname (char ("a", "b", "c")) %!error <STR must be a string or cellstr> genvarname (1) %!error <more than one exclusion is given, it must be a cellstr> genvarname ("x", char ("a", "b", "c"))
--- a/scripts/legacy/isdir.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/legacy/isdir.m Fri Oct 09 13:28:53 2020 -0700 @@ -69,5 +69,4 @@ %!assert (isdir (pwd ())) %!assert (! isdir (tempname ())) -%!error isdir () -%!error isdir (1, 2) +%!error <Invalid call> isdir ()
--- a/scripts/legacy/vectorize.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/legacy/vectorize.m Fri Oct 09 13:28:53 2020 -0700 @@ -91,7 +91,6 @@ %! assert (finfo.function, "@(x) 2 .^ x .^ 5"); ## Test input validation -%!error vectorize () -%!error vectorize (1, 2) +%!error <Invalid call> vectorize () %!error <FUN must be a string or anonymous function handle> vectorize (1)
--- a/scripts/linear-algebra/cond.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/cond.m Fri Oct 09 13:28:53 2020 -0700 @@ -95,8 +95,7 @@ %!assert (cond ([1, 2; 2, 1]), 3, sqrt (eps)) %!assert (cond ([1, 2, 3; 4, 5, 6; 7, 8, 9]) > 1.0e+16) -%!error cond () -%!error cond (1, 2, 3) +%!error <Invalid call> cond () %!error <A must be a 2-D matrix> cond (ones (1,3,3)) %!error <A must not contain Inf or NaN value> cond ([1, 2;Inf 4]) %!error <A must not contain Inf or NaN value> cond ([1, 2;NaN 4])
--- a/scripts/linear-algebra/cross.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/cross.m Fri Oct 09 13:28:53 2020 -0700 @@ -119,5 +119,8 @@ %! assert (cross (x, y, 2), r, 2e-8); %! assert (cross (x, y, 1), -r, 2e-8); -%!error cross (0,0) -%!error cross () +## Test input validation +%!error <Invalid call> cross () +%!error <Invalid call> cross (1) +## FIXME: Need tests for other error() conditions and warning() calls. +%!error <must have at least one dimension with 3 elements> cross (0,0)
--- a/scripts/linear-algebra/duplication_matrix.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/duplication_matrix.m Fri Oct 09 13:28:53 2020 -0700 @@ -118,7 +118,7 @@ %! assert (D * vech (B), vec (B), 1e-6); %! assert (D * vech (C), vec (C), 1e-6); -%!error duplication_matrix () +%!error <Invalid call> duplication_matrix () %!error duplication_matrix (0.5) %!error duplication_matrix (-1) %!error duplication_matrix (ones (1,4))
--- a/scripts/linear-algebra/expm.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/expm.m Fri Oct 09 13:28:53 2020 -0700 @@ -157,7 +157,6 @@ %!assert (full (expm (10*eye (3))), expm (full (10*eye (3))), 8*eps) ## Test input validation -%!error expm () -%!error expm (1, 2) +%!error <Invalid call> expm () %!error <expm: A must be a square matrix> expm ({1}) %!error <expm: A must be a square matrix> expm ([1 0;0 1; 2 2])
--- a/scripts/linear-algebra/isbanded.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/isbanded.m Fri Oct 09 13:28:53 2020 -0700 @@ -80,10 +80,9 @@ %! assert (! isbanded (A,1,0)); ## Test input validation -%!error isbanded () -%!error isbanded (1) -%!error isbanded (1,2) -%!error isbanded (1,2,3,4) +%!error <Invalid call> isbanded () +%!error <Invalid call> isbanded (1) +%!error <Invalid call> isbanded (1,2) %!error <LOWER and UPPER must be non-negative> isbanded (1, -1, 1) %!error <LOWER and UPPER must be non-negative> isbanded (1, 1, -1) %!error <LOWER and UPPER must be non-negative> isbanded (1, {1}, 1)
--- a/scripts/linear-algebra/isdefinite.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/isdefinite.m Fri Oct 09 13:28:53 2020 -0700 @@ -103,8 +103,7 @@ %!assert (! isdefinite (magic (3))) -%!error isdefinite () -%!error isdefinite (1,2,3) +%!error <Invalid call> isdefinite () %!error <TOL must be a scalar .= 0> isdefinite (1, {1}) %!error <TOL must be a scalar .= 0> isdefinite (1, [1 1]) %!error <TOL must be a scalar .= 0> isdefinite (1, -1)
--- a/scripts/linear-algebra/isdiag.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/isdiag.m Fri Oct 09 13:28:53 2020 -0700 @@ -60,5 +60,4 @@ %!assert (isdiag (diag (1:10))) ## Test input validation -%!error isdiag () -%!error isdiag (1,2) +%!error <Invalid call> isdiag ()
--- a/scripts/linear-algebra/ishermitian.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/ishermitian.m Fri Oct 09 13:28:53 2020 -0700 @@ -133,8 +133,7 @@ %! assert (! ishermitian (s)); ## Test input validation -%!error ishermitian () -%!error ishermitian (1,2,3,4) +%!error <Invalid call> ishermitian () %!error <second argument must be> ishermitian (1, {"skew"}) %!error <SKEWOPT must be 'skew' or 'nonskew'> ishermitian (1, "foobar") %!error <SKEWOPT must be 'skew' or 'nonskew'> ishermitian (1, "foobar")
--- a/scripts/linear-algebra/issymmetric.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/issymmetric.m Fri Oct 09 13:28:53 2020 -0700 @@ -132,8 +132,7 @@ %! assert (! issymmetric (s)); ## Test input validation -%!error issymmetric () -%!error issymmetric (1,2,3,4) +%!error <Invalid call> issymmetric () %!error <second argument must be> issymmetric (1, {"skew"}) %!error <SKEWOPT must be 'skew' or 'nonskew'> issymmetric (1, "foobar") %!error <SKEWOPT must be 'skew' or 'nonskew'> issymmetric (1, "foobar")
--- a/scripts/linear-algebra/istril.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/istril.m Fri Oct 09 13:28:53 2020 -0700 @@ -61,5 +61,4 @@ %!assert (! istril (randn (10))) ## Test input validation -%!error istril () -%!error istril (1,2) +%!error <Invalid call> istril ()
--- a/scripts/linear-algebra/istriu.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/istriu.m Fri Oct 09 13:28:53 2020 -0700 @@ -61,5 +61,4 @@ %!assert (! istriu (randn (10))) ## Test input validation -%!error istriu () -%!error istriu (1,2) +%!error <Invalid call> istriu ()
--- a/scripts/linear-algebra/trace.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/trace.m Fri Oct 09 13:28:53 2020 -0700 @@ -58,6 +58,5 @@ %!assert (trace (rand (1,0)), 0) %!assert (trace ([3:10]), 3) -%!error trace () -%!error trace (1, 2) +%!error <Invalid call> trace () %!error <only valid on 2-D objects> trace (reshape (1:9,[1,3,3]))
--- a/scripts/linear-algebra/vech.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/vech.m Fri Oct 09 13:28:53 2020 -0700 @@ -58,5 +58,4 @@ %!assert (vech ([1, 2, 3; 4, 5, 6; 7, 8, 9]), [1; 4; 7; 5; 8; 9]) -%!error vech () -%!error vech (1, 2) +%!error <Invalid call> vech ()
--- a/scripts/linear-algebra/vecnorm.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/linear-algebra/vecnorm.m Fri Oct 09 13:28:53 2020 -0700 @@ -111,8 +111,7 @@ %! assert (vecnorm (A), ret, 1e-4); ## Test input validation -%!error vecnorm () -%!error vecnorm (1,2,3,4) +%!error <Invalid call> vecnorm () %!error <P must be positive real scalar> vecnorm (1, [1 2]) %!error <P must be positive real scalar> vecnorm (1, i) %!error <P must be positive real scalar> vecnorm (1, -1)
--- a/scripts/miscellaneous/cast.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/cast.m Fri Oct 09 13:28:53 2020 -0700 @@ -108,8 +108,7 @@ %!assert (cast ([-2.5 1.1 2.5], "uint64"), uint64 ([0 1 3])) ## Test input validation -%!error cast () -%!error cast (1) -%!error cast (1,2,3) +%!error <Invalid call> cast () +%!error <Invalid call> cast (1) %!error <TYPE 'foobar' is not a built-in type> cast (1, "foobar") %!error <TYPE must be a string> cast (1, {"foobar"})
--- a/scripts/miscellaneous/citation.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/citation.m Fri Oct 09 13:28:53 2020 -0700 @@ -54,7 +54,6 @@ ## Test input validation -%!error citation (1, 2) %!error <citation: PACKAGE must be a string> citation (1) %!error <citation: package .* is not installed> %! citation ("__NOT_A_VALID_PKG_NAME__");
--- a/scripts/miscellaneous/compare_versions.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/compare_versions.m Fri Oct 09 13:28:53 2020 -0700 @@ -223,10 +223,9 @@ %!assert (compare_versions ("0.1", "0.1", "~="), false) ## Test input validation -%!error compare_versions () -%!error compare_versions (1) -%!error compare_versions (1,2) -%!error compare_versions (1,2,3,4) +%!error <Invalid call> compare_versions () +%!error <Invalid call> compare_versions (1) +%!error <Invalid call> compare_versions (1,2) %!error <V1 and V2 must be strings> compare_versions (0.1, "0.1", "==") %!error <V1 and V2 must be strings> compare_versions ("0.1", 0.1, "==") %!error <V1 and V2 must be a single row> compare_versions (["0";".";"1"], "0.1", "==")
--- a/scripts/miscellaneous/grabcode.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/grabcode.m Fri Oct 09 13:28:53 2020 -0700 @@ -100,5 +100,4 @@ ## Test input validation -%!error grabcode () -%!error grabcode (1,2) +%!error <Invalid call> grabcode ()
--- a/scripts/miscellaneous/inputname.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/inputname.m Fri Oct 09 13:28:53 2020 -0700 @@ -158,7 +158,6 @@ %! assert (__iname1_ID__ (x / 2), "x / 2"); %! assert (__iname1_ID__ (Inf), "Inf"); -%!error inputname () -%!error inputname (1,2,3) +%!error <Invalid call> inputname () %!error <N must be a scalar> inputname (ones (2,2)) %!error <N must be a scalar index> inputname (-1)
--- a/scripts/miscellaneous/isfile.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/isfile.m Fri Oct 09 13:28:53 2020 -0700 @@ -75,6 +75,6 @@ %! end_unwind_protect ## Test input validation -%!error isfile () +%!error <Invalid call> isfile () %!error isfile ("a", "b") %!error <F must be a string> isfile (1.0)
--- a/scripts/miscellaneous/isfolder.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/isfolder.m Fri Oct 09 13:28:53 2020 -0700 @@ -75,6 +75,6 @@ %! end_unwind_protect ## Test input validation -%!error isfolder () +%!error <Invalid call> isfolder () %!error isfolder ("a", "b") %!error <F must be a string> isfolder (1.0)
--- a/scripts/miscellaneous/ismac.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/ismac.m Fri Oct 09 13:28:53 2020 -0700 @@ -37,5 +37,3 @@ %!assert (islogical (ismac ())) - -%!error ismac (1)
--- a/scripts/miscellaneous/ispc.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/ispc.m Fri Oct 09 13:28:53 2020 -0700 @@ -37,5 +37,3 @@ %!assert (islogical (ispc ())) - -%!error ispc (1)
--- a/scripts/miscellaneous/isunix.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/isunix.m Fri Oct 09 13:28:53 2020 -0700 @@ -37,5 +37,3 @@ %!assert (islogical (isunix ())) - -%!error isunix (1)
--- a/scripts/miscellaneous/list_primes.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/list_primes.m Fri Oct 09 13:28:53 2020 -0700 @@ -67,6 +67,5 @@ %!assert (list_primes (1), [2]) ## Test input validation -%!error list_primes (1, 2) %!error <N must be a real scalar> list_primes (i) %!error <N must be a real scalar> list_primes ([1 2])
--- a/scripts/miscellaneous/methods.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/methods.m Fri Oct 09 13:28:53 2020 -0700 @@ -145,7 +145,7 @@ %! "validate_name"}); ## Test input validation -%!error methods () +%!error <Invalid call> methods () %!error methods ("a", "b", "c") %!error <invalid option> methods ("ftp", "option1") %!error <invalid input argument> methods (1)
--- a/scripts/miscellaneous/news.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/news.m Fri Oct 09 13:28:53 2020 -0700 @@ -43,6 +43,5 @@ endfunction -%!error news (1, 2) %!error <news: PACKAGE must be a string> news (1) %!error <news: package .* is not installed> news ("__NOT_A_VALID_PKG_NAME__")
--- a/scripts/miscellaneous/open.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/open.m Fri Oct 09 13:28:53 2020 -0700 @@ -131,6 +131,6 @@ ## Test input validation -%!error open () +%!error <Invalid call> open () %!error open ("abc", "def") %!error <FILE must be a string> open (1)
--- a/scripts/miscellaneous/run.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/run.m Fri Oct 09 13:28:53 2020 -0700 @@ -145,6 +145,6 @@ %! end_unwind_protect ## Test input validation -%!error run () +%!error <Invalid call> run () %!error run ("a", "b") %!error <SCRIPT must exist> run ("__A_very_#unlikely#_file_name__")
--- a/scripts/miscellaneous/swapbytes.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/swapbytes.m Fri Oct 09 13:28:53 2020 -0700 @@ -74,6 +74,5 @@ %! assert (swapbytes (swapbytes (single (pi))), single (pi)); ## Test input validation -%!error swapbytes () -%!error swapbytes (1, 2) +%!error <Invalid call> swapbytes () %!error <invalid object of class 'cell'> swapbytes ({1})
--- a/scripts/miscellaneous/tar.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/tar.m Fri Oct 09 13:28:53 2020 -0700 @@ -154,8 +154,7 @@ %! end_unwind_protect ## Test input validation -%!error tar () -%!error tar (1) -%!error tar (1,2,3,4) +%!error <Invalid call> tar () +%!error <Invalid call> tar (1) %!error <TARFILE must be a string> tar (1, "foobar") %!error <FILES must be a character array or cellstr> tar ("foobar", 1)
--- a/scripts/miscellaneous/verLessThan.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/verLessThan.m Fri Oct 09 13:28:53 2020 -0700 @@ -83,7 +83,7 @@ %!assert (verLessThan ("Octave", "99.9.9")) ## Test input validation -%!error verLessThan () +%!error <Invalid call> verLessThan () %!error verLessThan ("a") %!error verLessThan ("a", "1", "b") %!error <package "no-such-package" is not installed>
--- a/scripts/miscellaneous/zip.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/miscellaneous/zip.m Fri Oct 09 13:28:53 2020 -0700 @@ -134,8 +134,7 @@ %! end_unwind_protect ## Test input validation -%!error zip () -%!error zip (1) -%!error zip (1,2,3,4) +%!error <Invalid call> zip () +%!error <Invalid call> zip (1) %!error <ZIPFILE must be a string> zip (1, "foobar") %!error <FILES must be a character array or cellstr> zip ("foobar", 1)
--- a/scripts/ode/odeget.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/ode/odeget.m Fri Oct 09 13:28:53 2020 -0700 @@ -43,6 +43,10 @@ function val = odeget (ode_opt, field, default = []) + if (nargin < 2) + print_usage (); + endif + validateattributes (ode_opt, {"struct"}, {"nonempty"}); validateattributes (field, {"char"}, {"nonempty"}); @@ -79,9 +83,9 @@ %! warning ("off", "Octave:invalid-input-arg", "local"); %! assert (odeget (odeset ("foo", 42), "foo"), 42); -%!error odeget () -%!error odeget (1) -%!error odeget (1,2,3,4,5) +## Test input validation +%!error <Invalid call> odeget () +%!error <Invalid call> odeget (1) %!error odeget (1, "opt1") %!error odeget (struct ("opt1", 1), 1) %!error odeget (struct ("opt1", 1), "foo")
--- a/scripts/optimization/optimget.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/optimization/optimget.m Fri Oct 09 13:28:53 2020 -0700 @@ -75,9 +75,8 @@ %!assert (optimget (opts, "TolFun", 1e-3), 1e-3) ## Test input validation -%!error optimget () -%!error optimget (1) -%!error optimget (1,2,3,4,5) +%!error <Invalid call> optimget () +%!error <Invalid call> optimget (1) %!error optimget (1, "name") %!error optimget (struct (), 2) %!warning <unrecognized option: foobar> (optimget (opts, "foobar"));
--- a/scripts/plot/draw/stemleaf.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/draw/stemleaf.m Fri Oct 09 13:28:53 2020 -0700 @@ -585,8 +585,7 @@ %! assert (r, rexp); ## Test input validation -%!error stemleaf () -%!error stemleaf (1, 2, 3, 4) +%!error <Invalid call> stemleaf () %!error <X must be a vector> stemleaf (ones (2,2), "") %!warning <X truncated to integer values> tmp = stemleaf ([0 0.5 1],""); %!error <X must be a numeric vector> stemleaf ("Hello World", "data")
--- a/scripts/plot/util/allchild.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/util/allchild.m Fri Oct 09 13:28:53 2020 -0700 @@ -66,5 +66,4 @@ %! graphics_toolkit (toolkit); %! end_unwind_protect -%!error allchild () -%!error allchild (1, 2) +%!error <Invalid call> allchild ()
--- a/scripts/plot/util/ancestor.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/util/ancestor.m Fri Oct 09 13:28:53 2020 -0700 @@ -117,7 +117,6 @@ %!assert (ancestor ([], "axes"), []) -%!error ancestor () -%!error ancestor (1,2,3) +%!error <Invalid call> ancestor () %!error <TYPE must be a string> ancestor (1,2) %!error <third argument must be "toplevel"> ancestor (1, "axes", "foo")
--- a/scripts/plot/util/close.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/util/close.m Fri Oct 09 13:28:53 2020 -0700 @@ -179,7 +179,6 @@ %! end_unwind_protect ## Test input validation -%!error close (1,2,3) %!error <first argument must be "all", a figure handle> close ({"all"}) %!error <first argument must be "all", a figure handle> close (-1) %!error <second argument must be "hidden"> close all hid
--- a/scripts/plot/util/groot.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/util/groot.m Fri Oct 09 13:28:53 2020 -0700 @@ -64,6 +64,3 @@ %!assert (groot (), 0) - -## Test input validation -%!error groot (1)
--- a/scripts/plot/util/hgsave.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/util/hgsave.m Fri Oct 09 13:28:53 2020 -0700 @@ -134,8 +134,7 @@ %! end_unwind_protect ## Test input validation -%!error hgsave () -%!error hgsave (1, 2, 3, 4) +%!error <Invalid call> hgsave () %!error <no current figure to save> %! unwind_protect %! old_fig = get (0, "currentfigure");
--- a/scripts/plot/util/isaxes.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/util/isaxes.m Fri Oct 09 13:28:53 2020 -0700 @@ -66,5 +66,4 @@ %! close (hf); %! end_unwind_protect -%!error isaxes () -%!error isaxes (1, 2) +%!error <Invalid call> isaxes ()
--- a/scripts/plot/util/isfigure.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/util/isfigure.m Fri Oct 09 13:28:53 2020 -0700 @@ -65,5 +65,4 @@ %! close (hf); %! end_unwind_protect -%!error isfigure () -%!error isfigure (1, 2) +%!error <Invalid call> isfigure ()
--- a/scripts/plot/util/isgraphics.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/util/isgraphics.m Fri Oct 09 13:28:53 2020 -0700 @@ -106,7 +106,6 @@ %! assert (isgraphics ([-1 0], "foobar"), [false false]); ## Test input validation -%!error isgraphics () -%!error isgraphics (1, 2, 3) +%!error <Invalid call> isgraphics () %!error <TYPE must be a string> isgraphics (0, 1) %!error <TYPE must be a string> isgraphics (0, {1})
--- a/scripts/plot/util/ishandle.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/util/ishandle.m Fri Oct 09 13:28:53 2020 -0700 @@ -72,5 +72,4 @@ %! assert (ishandle (jobj)); ## Test input validation -%!error ishandle () -%!error ishandle (1, 2) +%!error <Invalid call> ishandle ()
--- a/scripts/plot/util/isprop.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/util/isprop.m Fri Oct 09 13:28:53 2020 -0700 @@ -81,7 +81,6 @@ %! assert (isprop (m, "KeyType")); %! assert (! isprop (m, "FooBar")); -%!error isprop () -%!error isprop (1) -%!error isprop (1,2,3) +%!error <Invalid call> isprop () +%!error <Invalid call> isprop (1) %!error <PROP name must be a string> isprop (0, {"visible"})
--- a/scripts/plot/util/linkaxes.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/util/linkaxes.m Fri Oct 09 13:28:53 2020 -0700 @@ -165,6 +165,5 @@ %! end_unwind_protect ## Test input validation -%!error linkaxes () -%!error linkaxes (1,2,3) +%!error <Invalid call> linkaxes () %!error <HAX must be a vector of axes handles> linkaxes ([pi, e])
--- a/scripts/plot/util/rotate.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/util/rotate.m Fri Oct 09 13:28:53 2020 -0700 @@ -181,9 +181,10 @@ %! h2 = figure ("visible", "off"); %! o2 = line (); %! o3 = text (0, 0, "foobar"); -%!error rotate () -%!error rotate (o1) -%!error rotate (o1, [0,0,0]) + +%!error <Invalid call> rotate () +%!error <Invalid call> rotate (o1) +%!error <Invalid call> rotate (o1, [0,0,0]) %!error <all handles must be children of the same axes object> rotate ([o1, o2], [0,0,0], 90) %!error <invalid direction> rotate (o1, "foo", 90) %!error <invalid rotation angle> rotate (o1, [0,0,0], "foo")
--- a/scripts/plot/util/saveas.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/plot/util/saveas.m Fri Oct 09 13:28:53 2020 -0700 @@ -150,9 +150,8 @@ ## Test input validation -%!error saveas () -%!error saveas (1) -%!error saveas (1,2,3,4) +%!error <Invalid call> saveas () +%!error <Invalid call> saveas (1) %!error <H must be a graphics handle> saveas (Inf, "tst.pdf") %!error <FILENAME must be a string> saveas (0, 1) %!error <FMT must be a string> saveas (0, "tst.pdf", 1)
--- a/scripts/polynomial/conv.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/polynomial/conv.m Fri Oct 09 13:28:53 2020 -0700 @@ -128,8 +128,7 @@ ## Test input validation -%!error conv (1) -%!error conv (1,2,3,4) +%!error <Invalid call> conv (1) %!error <A and B must be vectors> conv ([1, 2; 3, 4], 3) %!error <A and B must be vectors> conv (3, [1, 2; 3, 4]) %!error <SHAPE argument must be> conv (2, 3, "INVALID_SHAPE")
--- a/scripts/polynomial/poly.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/polynomial/poly.m Fri Oct 09 13:28:53 2020 -0700 @@ -112,6 +112,5 @@ %! y = poly (x); %! assert (y, [1 + 0i, -9 - 3i, 25 + 24i, -17 - 57i, -12 + 36i]); -%!error poly () -%!error poly (1,2) +%!error <Invalid call> poly () %!error poly ([1, 2, 3; 4, 5, 6])
--- a/scripts/polynomial/polyint.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/polynomial/polyint.m Fri Oct 09 13:28:53 2020 -0700 @@ -79,5 +79,5 @@ %! B = [length(A):-1:1]; %! assert (polyint (A), [1./B, 0]); -%!error polyint () +%!error <Invalid call> polyint () %!error polyint (ones (2,2))
--- a/scripts/polynomial/polyreduce.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/polynomial/polyreduce.m Fri Oct 09 13:28:53 2020 -0700 @@ -54,7 +54,6 @@ %!assert (polyreduce ([1, 0, 3]), [1, 0, 3]) %!assert (polyreduce ([0, 0, 0]), 0) -%!error polyreduce () -%!error polyreduce (1, 2) +%!error <Invalid call> polyreduce () %!error <C must be a non-empty vector> polyreduce ([1, 2; 3, 4]) %!error <C must be a non-empty vector> polyreduce ([])
--- a/scripts/polynomial/ppval.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/polynomial/ppval.m Fri Oct 09 13:28:53 2020 -0700 @@ -139,9 +139,8 @@ %! assert (ppval (pp, [breaks',breaks']), ret); ## Test input validation -%!error ppval () -%!error ppval (1) -%!error ppval (1,2,3) +%!error <Invalid call> ppval () +%!error <Invalid call> ppval (1) %!error <argument must be a pp-form structure> ppval (1,2) %!error <argument must be a pp-form structure> ppval (struct ("a", 1), 2) %!error <argument must be a pp-form structure> ppval (struct ("form", "ab"), 2)
--- a/scripts/polynomial/roots.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/polynomial/roots.m Fri Oct 09 13:28:53 2020 -0700 @@ -135,8 +135,7 @@ %!assert (roots ([1e-200, -1e200, 1]), 1e-200) %!assert (roots ([1e-200, -1e200 * 1i, 1]), -1e-200 * 1i) -%!error roots () -%!error roots (1,2) +%!error <Invalid call> roots () %!error roots ([1, 2; 3, 4]) %!error <inputs must not contain Inf or NaN> roots ([1 Inf 1]) %!error <inputs must not contain Inf or NaN> roots ([1 NaN 1])
--- a/scripts/prefs/addpref.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/prefs/addpref.m Fri Oct 09 13:28:53 2020 -0700 @@ -109,9 +109,9 @@ %! endif %! end_unwind_protect -%!error addpref () -%!error addpref (1) -%!error addpref (1,2) -%!error addpref (1,2,3,4) +## Test input validation +%!error <Invalid call> addpref () +%!error <Invalid call> addpref (1) +%!error <Invalid call> addpref (1,2) %!error <GROUP must be a string> addpref (1, "pref1", 2) %!error <PREF must be a string> addpref ("group1", 1, 2)
--- a/scripts/prefs/getpref.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/prefs/getpref.m Fri Oct 09 13:28:53 2020 -0700 @@ -155,6 +155,5 @@ %! endif %! end_unwind_protect -%!error getpref (1,2,3,4) %!error <GROUP must be a string> getpref (1) %!error <PREF must be a string> getpref ("group1", 1, 2)
--- a/scripts/prefs/ispref.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/prefs/ispref.m Fri Oct 09 13:28:53 2020 -0700 @@ -98,7 +98,6 @@ %! endif %! end_unwind_protect -%!error ispref () -%!error ispref (1,2,3) +%!error <Invalid call> ispref () %!error <GROUP must be a string> ispref (1, "pref1") %!error <PREF must be a string> ispref ("group1", 1)
--- a/scripts/prefs/rmpref.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/prefs/rmpref.m Fri Oct 09 13:28:53 2020 -0700 @@ -113,7 +113,6 @@ %! end_unwind_protect ## Test input validation -%!error rmpref () -%!error rmpref (1,2,3) +%!error <Invalid call> rmpref () %!error <GROUP must be a string> rmpref (1) %!error <PREF must be a string> rmpref ("group1", 1)
--- a/scripts/prefs/setpref.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/prefs/setpref.m Fri Oct 09 13:28:53 2020 -0700 @@ -104,9 +104,9 @@ %! endif %! end_unwind_protect -%!error setpref () -%!error setpref (1) -%!error setpref (1,2) -%!error setpref (1,2,3,4) +## Test input validation +%!error <Invalid call> setpref () +%!error <Invalid call> setpref (1) +%!error <Invalid call> setpref (1,2) %!error <GROUP must be a string> setpref (1, "pref1", 2) %!error <PREF must be a string> setpref ("group1", 1, 2)
--- a/scripts/profiler/profile.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/profiler/profile.m Fri Oct 09 13:28:53 2020 -0700 @@ -151,6 +151,6 @@ %! assert (fieldnames (hier), {"Index"; "SelfTime"; "TotalTime"; "NumCalls"; "Children"}); ## Test input validation -%!error profile () +%!error <Invalid call> profile () %!error profile ("on", 2) %!error profile ("INVALID_OPTION")
--- a/scripts/profiler/profshow.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/profiler/profshow.m Fri Oct 09 13:28:53 2020 -0700 @@ -109,7 +109,7 @@ %! profile off; %! profshow (profile ("info"), 5); -%!error profshow (1, 2, 3) +## Test input validation %!error <N must be a positive integer> profshow (struct (), ones (2)) %!error <N must be a positive integer> profshow (struct (), 1+i) %!error <N must be a positive integer> profshow (struct (), -1)
--- a/scripts/set/powerset.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/set/powerset.m Fri Oct 09 13:28:53 2020 -0700 @@ -113,8 +113,7 @@ %!assert (powerset([]), {}); # always return a cell array ## Test input validation -%!error powerset () -%!error powerset (1,2,3) +%!error <Invalid call> powerset () %!error <second argument must be "rows"> powerset (1, "cols") %!error <"rows" not valid for cell arrays> powerset ({1}, "rows") %!error <cell arrays can only be used for character> powerset ({1})
--- a/scripts/signal/autoreg_matrix.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/autoreg_matrix.m Fri Oct 09 13:28:53 2020 -0700 @@ -63,6 +63,6 @@ %! B(:,1) = 1; %! assert (autoreg_matrix (A,K), B); -%!error autoreg_matrix () -%!error autoreg_matrix (1) +%!error <Invalid call> autoreg_matrix () +%!error <Invalid call> autoreg_matrix (1) %!error autoreg_matrix (ones (4,1), 5)
--- a/scripts/signal/bartlett.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/bartlett.m Fri Oct 09 13:28:53 2020 -0700 @@ -63,7 +63,7 @@ %! A = bartlett (N); %! assert (A(ceil (N/2)), 1); -%!error bartlett () +%!error <Invalid call> bartlett () %!error bartlett (0.5) %!error bartlett (-1) %!error bartlett (ones (1,4))
--- a/scripts/signal/blackman.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/blackman.m Fri Oct 09 13:28:53 2020 -0700 @@ -90,7 +90,7 @@ %! A = blackman (N, "periodic"); %! assert (A(N/2 + 1), 1, 1e-6); -%!error blackman () +%!error <Invalid call> blackman () %!error blackman (0.5) %!error blackman (-1) %!error blackman (ones (1,4))
--- a/scripts/signal/detrend.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/detrend.m Fri Oct 09 13:28:53 2020 -0700 @@ -101,8 +101,7 @@ %! assert (abs (y(:)) < 20*eps); ## Test input validation -%!error detrend () -%!error detrend (1, 2, 3) +%!error <Invalid call> detrend () %!error detrend ("a") %!error detrend (true) %!error detrend (1, "invalid")
--- a/scripts/signal/fftconv.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/fftconv.m Fri Oct 09 13:28:53 2020 -0700 @@ -102,8 +102,7 @@ %! assert (size (conv (b,a)), [1, numel(a)+numel(b)-1]); ## Test input validation -%!error fftconv (1) -%!error fftconv (1,2,3,4) +%!error <Invalid call> fftconv (1) %!error fftconv ([1, 2; 3, 4], 3) %!error fftconv (2, []) %!error fftconv ([1,1], [2,2] , [3, 4])
--- a/scripts/signal/fftfilt.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/fftfilt.m Fri Oct 09 13:28:53 2020 -0700 @@ -187,8 +187,7 @@ %! assert (y0, y, 55*eps); ## Test input validation -%!error fftfilt (1) -%!error fftfilt (1, 2, 3, 4) +%!error <Invalid call> fftfilt (1) %!error fftfilt (ones (2), 1) %!error fftfilt (2, ones (3,3,3)) %!error fftfilt (2, 1, ones (2))
--- a/scripts/signal/fftshift.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/fftshift.m Fri Oct 09 13:28:53 2020 -0700 @@ -151,7 +151,6 @@ %! assert (fftshift (y), x); ## Test input validation -%!error fftshift () -%!error fftshift (1, 2, 3) +%!error <Invalid call> fftshift () %!error fftshift (0:3, -1) %!error fftshift (0:3, 0:3)
--- a/scripts/signal/hamming.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/hamming.m Fri Oct 09 13:28:53 2020 -0700 @@ -87,7 +87,7 @@ %! A = hamming (N, "periodic"); %! assert (A(N/2 + 1), 1); -%!error hamming () +%!error <Invalid call> hamming () %!error hamming (0.5) %!error hamming (-1) %!error hamming (ones (1,4))
--- a/scripts/signal/hanning.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/hanning.m Fri Oct 09 13:28:53 2020 -0700 @@ -87,7 +87,7 @@ %! A = hanning (N, "periodic"); %! assert (A(N/2 + 1), 1); -%!error hanning () +%!error <Invalid call> hanning () %!error hanning (0.5) %!error hanning (-1) %!error hanning (ones (1,4))
--- a/scripts/signal/ifftshift.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/ifftshift.m Fri Oct 09 13:28:53 2020 -0700 @@ -134,7 +134,6 @@ %! assert (ifftshift (y), x); ## Test input validation -%!error ifftshift () -%!error ifftshift (1, 2, 3) +%!error <Invalid call> ifftshift () %!error ifftshift (0:3, -1) %!error ifftshift (0:3, 0:3)
--- a/scripts/signal/sinewave.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/sinewave.m Fri Oct 09 13:28:53 2020 -0700 @@ -60,4 +60,4 @@ %!assert (sinewave (1), sinewave (1, 1,0)) %!assert (sinewave (3, 4), sinewave (3, 4, 0)) -%!error sinewave () +%!error <Invalid call> sinewave ()
--- a/scripts/signal/spectral_adf.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/spectral_adf.m Fri Oct 09 13:28:53 2020 -0700 @@ -74,7 +74,6 @@ ## Test input validation -%!error spectral_adf () -%!error spectral_adf (1, 2, 3, 4) -%!error spectral_adf (1, 2) -%!error spectral_adf (1, "invalid") +%!error <Invalid call> spectral_adf () +%!error <WIN must be a string> spectral_adf (1, 2) +%!error <unable to find function for @invalid_lw> spectral_adf (1, "invalid")
--- a/scripts/signal/spectral_xdf.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/spectral_xdf.m Fri Oct 09 13:28:53 2020 -0700 @@ -76,7 +76,6 @@ ## Test input validation -%!error spectral_xdf () -%!error spectral_xdf (1, 2, 3, 4) -%!error spectral_xdf (1, 2) -%!error spectral_xdf (1, "invalid") +%!error <Invalid call> spectral_xdf () +%!error <WIN must be a string> spectral_xdf (1, 2) +%!error <unable to find function for @invalid_sw> spectral_xdf (1, "invalid")
--- a/scripts/signal/unwrap.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/signal/unwrap.m Fri Oct 09 13:28:53 2020 -0700 @@ -152,6 +152,5 @@ %! assert (diff (unwrap (B), 1) < 2*pi, true (1, length (B)-1)); ## Test input validation -%!error unwrap () -%!error unwrap (1,2,3,4) +%!error <Invalid call> unwrap () %!error unwrap ("foo")
--- a/scripts/sparse/nonzeros.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/sparse/nonzeros.m Fri Oct 09 13:28:53 2020 -0700 @@ -52,5 +52,4 @@ %!assert (nonzeros (sparse ([1,2,3,0])), [1;2;3]) ## Test input validation -%!error nonzeros () -%!error nonzeros (1, 2) +%!error <Invalid call> nonzeros ()
--- a/scripts/sparse/spconvert.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/sparse/spconvert.m Fri Oct 09 13:28:53 2020 -0700 @@ -73,8 +73,7 @@ %! assert (size (spconvert ([1, 1, 3; 5, 15, 0])), [5, 15]); ## Test input validation -%!error spconvert () -%!error spconvert (1, 2) +%!error <Invalid call> spconvert () %!error spconvert ({[1 2 3]}) %!error spconvert ([1 2]) %!error spconvert ([1 2 3i])
--- a/scripts/sparse/sprand.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/sparse/sprand.m Fri Oct 09 13:28:53 2020 -0700 @@ -99,9 +99,8 @@ %!assert (size (sprand (3, 0, 0.5)), [3, 0]) ## Test input validation -%!error sprand () -%!error sprand (1, 2) -%!error sprand (1, 2, 3, 4) +%!error <Invalid call> sprand () +%!error <Invalid call> sprand (1, 2) %!error <M must be a non-negative integer> sprand (-1, -1, 0.5) %!error <M must be a non-negative integer> sprand (ones (3), 3, 0.5) %!error <M must be a non-negative integer> sprand (3.5, 3, 0.5)
--- a/scripts/sparse/sprandn.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/sparse/sprandn.m Fri Oct 09 13:28:53 2020 -0700 @@ -98,9 +98,8 @@ %!assert (size (sprandn (3, 0, 0.5)), [3, 0]) ## Test input validation -%!error sprandn () -%!error sprandn (1, 2) -%!error sprandn (1, 2, 3, 4) +%!error <Invalid call> sprandn () +%!error <Invalid call> sprandn (1, 2) %!error <M must be a non-negative integer> sprand (-1, -1, 0.5) %!error <M must be a non-negative integer> sprandn (ones (3), 3, 0.5) %!error <M must be a non-negative integer> sprandn (3.5, 3, 0.5)
--- a/scripts/specfun/beta.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/beta.m Fri Oct 09 13:28:53 2020 -0700 @@ -88,9 +88,8 @@ %! assert (zeros (size (a)), beta (a, -a), tol); %! assert (zeros (size (a)), beta (-a, a), tol); -%!error beta () -%!error beta (1) -%!error beta (1,2,3) +%!error <Invalid call> beta () +%!error <Invalid call> beta (1) %!error <A and B must be real> beta (1i, 2) %!error <A and B must be real> beta (2, 1i) %!error <A and B must have consistent sizes> beta ([1 2], [1 2 3])
--- a/scripts/specfun/betainc.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/betainc.m Fri Oct 09 13:28:53 2020 -0700 @@ -223,10 +223,9 @@ %! assert (betainc (0.5, 1, Inf), NaN); ## Test input validation -%!error betainc () -%!error betainc (1) -%!error betainc (1,2) -%!error betainc (1,2,3,4,5) +%!error <Invalid call> betainc () +%!error <Invalid call> betainc (1) +%!error <Invalid call> betainc (1,2) %!error <must be of common size or scalars> betainc (ones (2,2), ones (1,2), 1) %!error <all inputs must be real> betainc (0.5i, 1, 2) %!error <all inputs must be real> betainc (0, 1i, 1)
--- a/scripts/specfun/betaln.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/betaln.m Fri Oct 09 13:28:53 2020 -0700 @@ -68,9 +68,8 @@ %!assert (betaln (3,4), log (beta (3,4)), eps) ## Test input validation -%!error betaln () -%!error betaln (1) -%!error betaln (1,2,3) +%!error <Invalid call> betaln () +%!error <Invalid call> betaln (1) %!error <A and B must be real> betaln (1i, 2) %!error <A and B must be real> betaln (2, 1i) %!error <A and B must have consistent sizes> betaln ([1 2], [1 2 3])
--- a/scripts/specfun/cosint.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/cosint.m Fri Oct 09 13:28:53 2020 -0700 @@ -267,6 +267,5 @@ %#!test <*52953> ## Test input validation -%!error cosint () -%!error cosint (1,2) +%!error <Invalid call> cosint () %!error <X must be numeric> cosint ("1")
--- a/scripts/specfun/expint.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/expint.m Fri Oct 09 13:28:53 2020 -0700 @@ -273,6 +273,5 @@ %!assert (! isreal (expint (-1))) ## Test input validation -%!error expint () -%!error expint (1,2) +%!error <Invalid call> expint () %!error <X must be numeric> expint ("1")
--- a/scripts/specfun/factorial.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/factorial.m Fri Oct 09 13:28:53 2020 -0700 @@ -65,8 +65,7 @@ %!assert (factorial (70), exp (sum (log (1:70))), -128*eps) %!assert (factorial (0), 1) -%!error factorial () -%!error factorial (1,2) +%!error <Invalid call> factorial () %!error <must be real non-negative integers> factorial (2i) %!error <must be real non-negative integers> factorial (-3) %!error <must be real non-negative integers> factorial (5.5)
--- a/scripts/specfun/legendre.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/legendre.m Fri Oct 09 13:28:53 2020 -0700 @@ -311,9 +311,8 @@ %! assert (result, expected); ## Test input validation -%!error legendre () -%!error legendre (1) -%!error legendre (1,2,3,4) +%!error <Invalid call> legendre () +%!error <Invalid call> legendre (1) %!error <must be a real non-negative integer> legendre (i, [-1, 0, 1]) %!error <must be a real non-negative integer> legendre ([1, 2], [-1, 0, 1]) %!error <must be a real non-negative integer> legendre (-1, [-1, 0, 1])
--- a/scripts/specfun/nchoosek.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/nchoosek.m Fri Oct 09 13:28:53 2020 -0700 @@ -149,9 +149,8 @@ %!assert (size (nchoosek (1:5,0)), [1 0]) ## Test input validation -%!error nchoosek () -%!error nchoosek (1) -%!error nchoosek (1,2,3) +%!error <Invalid call> nchoosek () +%!error <Invalid call> nchoosek (1) %!error nchoosek (100, 2i) %!error nchoosek (100, [2 3])
--- a/scripts/specfun/nthroot.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/nthroot.m Fri Oct 09 13:28:53 2020 -0700 @@ -106,9 +106,8 @@ %! assert (lastwarn (), warnmsg); ## Test input validation -%!error nthroot () -%!error nthroot (1) -%!error nthroot (1,2,3) +%!error <Invalid call> nthroot () +%!error <Invalid call> nthroot (1) %!error <X must not contain complex values> nthroot (1+j, 2) %!error <N must be a real nonzero scalar> nthroot (1, i) %!error <N must be a real nonzero scalar> nthroot (1, [1 2])
--- a/scripts/specfun/perms.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/perms.m Fri Oct 09 13:28:53 2020 -0700 @@ -123,8 +123,7 @@ %!assert (unique (perms (1:5)(:))', 1:5) %!assert (perms (int8 (1:4)), int8 (perms (1:4))) -%!error perms () -%!error perms (1, 2) +%!error <Invalid call> perms () ## Should work for any array type, such as cells and structs, and not ## only for numeric data.
--- a/scripts/specfun/pow2.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/pow2.m Fri Oct 09 13:28:53 2020 -0700 @@ -71,5 +71,4 @@ %! z = x .* (2 .^ y); %! assert (pow2 (x,y), z, sqrt (eps)); -%!error pow2 () -%!error pow2 (1,2,3) +%!error <Invalid call> pow2 ()
--- a/scripts/specfun/primes.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/primes.m Fri Oct 09 13:28:53 2020 -0700 @@ -108,7 +108,6 @@ %!assert (class (primes (single (10))), "single") %!assert (class (primes (uint8 (10))), "uint8") -%!error primes () -%!error primes (1, 2) +%!error <Invalid call> primes () %!error <N must be a numeric scalar> primes ("1") %!error <N must be a numeric scalar> primes (ones (2,2))
--- a/scripts/specfun/reallog.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/reallog.m Fri Oct 09 13:28:53 2020 -0700 @@ -50,7 +50,6 @@ %! x = rand (10, 10); %! assert (reallog (x), log (x)); -%!error reallog () -%!error reallog (1,2) +%!error <Invalid call> reallog () %!error <produced complex result> reallog (2i) %!error <produced complex result> reallog (-1)
--- a/scripts/specfun/realpow.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/realpow.m Fri Oct 09 13:28:53 2020 -0700 @@ -54,7 +54,6 @@ %! assert (x.^y, realpow (x,y)); %!assert <47775> (realpow (1i,2), -1) -%!error realpow () -%!error realpow (1) -%!error realpow (1,2,3) +%!error <Invalid call> realpow () +%!error <Invalid call> realpow (1) %!error <produced complex result> realpow (-1, 1/2)
--- a/scripts/specfun/realsqrt.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/realsqrt.m Fri Oct 09 13:28:53 2020 -0700 @@ -50,6 +50,5 @@ %! x = rand (10, 10); %! assert (realsqrt (x), sqrt (x)); -%!error realsqrt () -%!error realsqrt (1,2) +%!error <Invalid call> realsqrt () %!error <produced complex result> realsqrt (-1)
--- a/scripts/specfun/sinint.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/specfun/sinint.m Fri Oct 09 13:28:53 2020 -0700 @@ -210,6 +210,5 @@ %#!test <*52953> ## Test input validation -%!error sinint () -%!error sinint (1,2) +%!error <Invalid call> sinint () %!error <X must be numeric> sinint ("1")
--- a/scripts/special-matrix/hankel.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/special-matrix/hankel.m Fri Oct 09 13:28:53 2020 -0700 @@ -99,7 +99,6 @@ %!warning <column wins anti-diagonal conflict> %! assert (hankel (1:3,4:6), [1,2,3;2,3,5;3,5,6]); -%!error hankel () -%!error hankel (1, 2, 3) +%!error <Invalid call> hankel () %!error <C must be a vector> hankel ([1, 2; 3, 4]) %!error <C and R must be vectors> hankel (1:4, [1, 2; 3, 4])
--- a/scripts/special-matrix/hilb.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/special-matrix/hilb.m Fri Oct 09 13:28:53 2020 -0700 @@ -77,6 +77,5 @@ %!assert (hilb (2), [1, 1/2; 1/2, 1/3]) %!assert (hilb (3), [1, 1/2, 1/3; 1/2, 1/3, 1/4; 1/3, 1/4, 1/5]) -%!error hilb () -%!error hilb (1, 2) +%!error <Invalid call> hilb () %!error <N must be a scalar integer> hilb (ones (2))
--- a/scripts/special-matrix/invhilb.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/special-matrix/invhilb.m Fri Oct 09 13:28:53 2020 -0700 @@ -128,6 +128,5 @@ %! assert (invhilb (4), result4); %!assert (invhilb (7) * hilb (7), eye (7), sqrt (eps)) -%!error invhilb () -%!error invhilb (1, 2) +%!error <Invalid call> invhilb () %!error <N must be a scalar integer> invhilb ([1, 2])
--- a/scripts/special-matrix/magic.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/special-matrix/magic.m Fri Oct 09 13:28:53 2020 -0700 @@ -105,6 +105,5 @@ %!assert (magic (1.5), 1) ## Test input validation -%!error magic () -%!error magic (1, 2) +%!error <Invalid call> magic () %!error <N must be non-negative> magic (-5)
--- a/scripts/special-matrix/pascal.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/special-matrix/pascal.m Fri Oct 09 13:28:53 2020 -0700 @@ -90,8 +90,7 @@ %!assert (pascal (0,2), []) ## Test input validation -%!error pascal () -%!error pascal (1,2,3) +%!error <Invalid call> pascal () %!error <N and T must be scalars> pascal ([1 2]) %!error <N and T must be scalars> pascal (1, [1 2]) %!error <T must be -1> pascal (3,-2)
--- a/scripts/special-matrix/toeplitz.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/special-matrix/toeplitz.m Fri Oct 09 13:28:53 2020 -0700 @@ -133,8 +133,7 @@ %!assert (toeplitz ([1, 2, 3], [1; -3i; -5i]), [1, -3i, -5i; 2, 1, -3i; 3, 2, 1]) ## Test input validation -%!error toeplitz () -%!error toeplitz (1, 2, 3) +%!error <Invalid call> toeplitz () %!error <C must be a vector> toeplitz ([1, 2; 3, 4]) %!error <C and R must be vectors> toeplitz ([1, 2; 3, 4], 1) %!error <C and R must be vectors> toeplitz (1, [1, 2; 3, 4])
--- a/scripts/special-matrix/vander.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/special-matrix/vander.m Fri Oct 09 13:28:53 2020 -0700 @@ -95,6 +95,5 @@ %!assert (vander (2, 3), [4, 2, 1]) %!assert (vander ([2, 3], 3), [4, 2, 1; 9, 3, 1]) -%!error vander () -%!error vander (1, 2, 3) +%!error <Invalid call> vander () %!error <polynomial C must be a vector> vander ([1, 2; 3, 4])
--- a/scripts/special-matrix/wilkinson.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/special-matrix/wilkinson.m Fri Oct 09 13:28:53 2020 -0700 @@ -58,8 +58,7 @@ %!assert (wilkinson (4), [1.5,1,0,0;1,0.5,1,0;0,1,0.5,1;0,0,1,1.5]) ## Test input validation -%!error wilkinson () -%!error wilkinson (1,2) +%!error <Invalid call> wilkinson () %!error <N must be a non-negative integer> wilkinson (ones (2)) %!error <N must be a non-negative integer> wilkinson (-1) %!error <N must be a non-negative integer> wilkinson (1.5)
--- a/scripts/statistics/center.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/center.m Fri Oct 09 13:28:53 2020 -0700 @@ -92,8 +92,7 @@ %!assert (center (1, 3), 0) ## Test input validation -%!error center () -%!error center (1, 2, 3) +%!error <Invalid call> center () %!error <DIM must be an integer> center (1, ones (2,2)) %!error <DIM must be an integer> center (1, 1.5) %!error <DIM must be .* a valid dimension> center (1, 0)
--- a/scripts/statistics/corr.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/corr.m Fri Oct 09 13:28:53 2020 -0700 @@ -107,8 +107,7 @@ %!assert (corr (single (5)), single (1)) ## Test input validation -%!error corr () -%!error corr (1, 2, 3) +%!error <Invalid call> corr () %!error corr ([1; 2], ["A", "B"]) %!error corr (ones (2,2,2)) %!error corr (ones (2,2), ones (2,2,2))
--- a/scripts/statistics/cov.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/cov.m Fri Oct 09 13:28:53 2020 -0700 @@ -171,10 +171,9 @@ %! assert (c, 2); ## Test input validation -%!error cov () -%!error cov (1, 2, 3, 4) +%!error <Invalid call> cov () %!error cov ([1; 2], ["A", "B"]) %!error cov (ones (2,2,2)) %!error cov (ones (2,2), ones (2,2,2)) -%!error cov (1, 3) +%!error <normalization OPT must be 0 or 1> cov (1, 3) %!error cov (ones (2,2), ones (3,2))
--- a/scripts/statistics/discrete_cdf.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/discrete_cdf.m Fri Oct 09 13:28:53 2020 -0700 @@ -74,10 +74,9 @@ %!assert (discrete_cdf ([x, NaN], v, single (p)), single ([y, NaN]), 2*eps ("single")) ## Test input validation -%!error discrete_cdf () -%!error discrete_cdf (1) -%!error discrete_cdf (1,2) -%!error discrete_cdf (1,2,3,4) +%!error <Invalid call> discrete_cdf () +%!error <Invalid call> discrete_cdf (1) +%!error <Invalid call> discrete_cdf (1,2) %!error discrete_cdf (1, ones (2), ones (2,1)) %!error discrete_cdf (1, [1 ; NaN], ones (2,1)) %!error discrete_cdf (1, ones (2,1), ones (1,1))
--- a/scripts/statistics/discrete_inv.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/discrete_inv.m Fri Oct 09 13:28:53 2020 -0700 @@ -86,10 +86,9 @@ %!assert (discrete_inv ([x, NaN], v, single (p)), single ([y, NaN]), eps ("single")) ## Test input validation -%!error discrete_inv () -%!error discrete_inv (1) -%!error discrete_inv (1,2) -%!error discrete_inv (1,2,3,4) +%!error <Invalid call> discrete_inv () +%!error <Invalid call> discrete_inv (1) +%!error <Invalid call> discrete_inv (1,2) %!error discrete_inv (1, ones (2), ones (2,1)) %!error discrete_inv (1, ones (2,1), ones (1,1)) %!error discrete_inv (1, ones (2,1), [1 NaN])
--- a/scripts/statistics/discrete_pdf.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/discrete_pdf.m Fri Oct 09 13:28:53 2020 -0700 @@ -75,10 +75,9 @@ %!assert (discrete_pdf ([x, NaN], v, single (p)), single ([y, NaN]), 5*eps ("single")) ## Test input validation -%!error discrete_pdf () -%!error discrete_pdf (1) -%!error discrete_pdf (1,2) -%!error discrete_pdf (1,2,3,4) +%!error <Invalid call> discrete_pdf () +%!error <Invalid call> discrete_pdf (1) +%!error <Invalid call> discrete_pdf (1,2) %!error discrete_pdf (1, ones (2), ones (2,1)) %!error discrete_pdf (1, [1 ; NaN], ones (2,1)) %!error discrete_pdf (1, ones (2,1), ones (1,1))
--- a/scripts/statistics/empirical_cdf.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/empirical_cdf.m Fri Oct 09 13:28:53 2020 -0700 @@ -58,7 +58,6 @@ %!assert (empirical_cdf ([x, NaN], single (v)), single ([y, NaN]), eps) ## Test input validation -%!error empirical_cdf () -%!error empirical_cdf (1) -%!error empirical_cdf (1,2,3) +%!error <Invalid call> empirical_cdf () +%!error <Invalid call> empirical_cdf (1) %!error empirical_cdf (1, ones (2))
--- a/scripts/statistics/empirical_inv.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/empirical_inv.m Fri Oct 09 13:28:53 2020 -0700 @@ -57,7 +57,6 @@ %!assert (empirical_inv ([x, NaN], single (v)), single ([y, NaN]), eps) ## Test input validation -%!error empirical_inv () -%!error empirical_inv (1) -%!error empirical_inv (1,2,3) +%!error <Invalid call> empirical_inv () +%!error <Invalid call> empirical_inv (1) %!error empirical_inv (1, ones (2))
--- a/scripts/statistics/empirical_pdf.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/empirical_pdf.m Fri Oct 09 13:28:53 2020 -0700 @@ -68,7 +68,6 @@ %!assert (empirical_pdf (2, [1 2 3 2]), 0.5) ## Test input validation -%!error empirical_pdf () -%!error empirical_pdf (1) -%!error empirical_pdf (1,2,3) +%!error <Invalid call> empirical_pdf () +%!error <Invalid call> empirical_pdf (1) %!error empirical_inv (1, ones (2))
--- a/scripts/statistics/iqr.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/iqr.m Fri Oct 09 13:28:53 2020 -0700 @@ -97,8 +97,7 @@ %! assert (iqr (x, 1), 50); %! assert (iqr (x', 2), 50); -%!error iqr () -%!error iqr (1, 2, 3) +%!error <Invalid call> iqr () %!error iqr (1) %!error iqr (['A'; 'B']) %!error iqr (1:10, 3)
--- a/scripts/statistics/kendall.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/kendall.m Fri Oct 09 13:28:53 2020 -0700 @@ -148,8 +148,7 @@ %!assert (kendall (single (1)), single (1)) ## Test input validation -%!error kendall () -%!error kendall (1, 2, 3) +%!error <Invalid call> kendall () %!error kendall (['A'; 'B']) %!error kendall (ones (2,1), ['A'; 'B']) %!error kendall (ones (2,2,2))
--- a/scripts/statistics/kurtosis.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/kurtosis.m Fri Oct 09 13:28:53 2020 -0700 @@ -162,8 +162,7 @@ %! assert (lastwarn (), ""); ## Test input validation -%!error kurtosis () -%!error kurtosis (1, 2, 3) +%!error <Invalid call> kurtosis () %!error <X must be a numeric vector or matrix> kurtosis (['A'; 'B']) %!error <FLAG must be 0 or 1> kurtosis (1, 2) %!error <FLAG must be 0 or 1> kurtosis (1, [1 0])
--- a/scripts/statistics/mad.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/mad.m Fri Oct 09 13:28:53 2020 -0700 @@ -105,8 +105,7 @@ %!assert (mad (magic (4), 1, 2), [5.5; 1.5; 1.5; 5.5]) ## Test input validation -%!error mad () -%!error mad (1, 2, 3, 4) +%!error <Invalid call> mad () %!error <X must be a numeric> mad (['A'; 'B']) %!error <OPT must be 0 or 1> mad (1, 2) %!error <DIM must be an integer> mad (1, [], ones (2,2))
--- a/scripts/statistics/meansq.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/meansq.m Fri Oct 09 13:28:53 2020 -0700 @@ -88,8 +88,7 @@ %!assert (meansq ([1 2], 3), [1 4]) ## Test input validation -%!error meansq () -%!error meansq (1, 2, 3) +%!error <Invalid call> meansq () %!error <X must be a numeric> meansq (['A'; 'B']) %!error <DIM must be an integer> meansq (1, ones (2,2)) %!error <DIM must be an integer> meansq (1, 1.5)
--- a/scripts/statistics/median.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/median.m Fri Oct 09 13:28:53 2020 -0700 @@ -138,8 +138,7 @@ %!assert (median (single ([1, 3, NaN])), single (NaN)) ## Test input validation -%!error median () -%!error median (1, 2, 3) +%!error <Invalid call> median () %!error <X must be a numeric> median ({1:5}) %!error <X cannot be an empty matrix> median ([]) %!error <DIM must be an integer> median (1, ones (2,2))
--- a/scripts/statistics/moment.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/moment.m Fri Oct 09 13:28:53 2020 -0700 @@ -206,9 +206,8 @@ %!assert (moment (1, 2, 4), 0) ## Test input validation -%!error moment () -%!error moment (1) -%!error moment (1, 2, 3, 4, 5) +%!error <Invalid call> moment () +%!error <Invalid call> moment (1) %!error <X must be a non-empty numeric matrix> moment (['A'; 'B'], 2) %!error <X must be a non-empty numeric matrix> moment (ones (2,0,3), 2) %!error <P must be a numeric scalar> moment (1, true)
--- a/scripts/statistics/prctile.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/prctile.m Fri Oct 09 13:28:53 2020 -0700 @@ -180,8 +180,7 @@ %! assert (q, qa, tol); ## Test input validation -%!error prctile () -%!error prctile (1, 2, 3, 4) +%!error <Invalid call> prctile () %!error prctile (['A'; 'B'], 10) %!error prctile (1:10, [true, false]) %!error prctile (1:10, ones (2,2))
--- a/scripts/statistics/quantile.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/quantile.m Fri Oct 09 13:28:53 2020 -0700 @@ -384,8 +384,7 @@ %!assert <*54421> (quantile ([1:10], [0.25, 0.75]'), [3; 8]) ## Test input validation -%!error quantile () -%!error quantile (1, 2, 3, 4, 5) +%!error <Invalid call> quantile () %!error quantile (['A'; 'B'], 10) %!error quantile (1:10, [true, false]) %!error quantile (1:10, ones (2,2))
--- a/scripts/statistics/range.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/range.m Fri Oct 09 13:28:53 2020 -0700 @@ -62,5 +62,4 @@ %!assert (range (2), 0) ## Test input validation -%!error range () -%!error range (1, 2, 3) +%!error <Invalid call> range ()
--- a/scripts/statistics/run_count.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/run_count.m Fri Oct 09 13:28:53 2020 -0700 @@ -103,9 +103,8 @@ %!assert (run_count (ones (3), 4), [0,0,0;0,0,0;1,1,1;0,0,0]) ## Test input validation -%!error run_count () -%!error run_count (1) -%!error run_count (1, 2, 3, 4) +%!error <Invalid call> run_count () +%!error <Invalid call> run_count (1) %!error run_count ({1, 2}, 3) %!error run_count (['A'; 'A'; 'B'], 3) %!error run_count (1:5, ones (2,2))
--- a/scripts/statistics/skewness.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/skewness.m Fri Oct 09 13:28:53 2020 -0700 @@ -161,8 +161,7 @@ %! assert (lastwarn (), ""); ## Test input validation -%!error skewness () -%!error skewness (1, 2, 3) +%!error <Invalid call> skewness () %!error <X must be a numeric vector or matrix> skewness (['A'; 'B']) %!error <FLAG must be 0 or 1> skewness (1, 2) %!error <FLAG must be 0 or 1> skewness (1, [1 0])
--- a/scripts/statistics/spearman.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/spearman.m Fri Oct 09 13:28:53 2020 -0700 @@ -114,8 +114,7 @@ %!assert (spearman ([1 2 3], [-1 1 -2]), -0.5, 5*eps) ## Test input validation -%!error spearman () -%!error spearman (1, 2, 3) +%!error <Invalid call> spearman () %!error spearman (['A'; 'B']) %!error spearman (ones (1,2), {1, 2}) %!error spearman (ones (2,2,2))
--- a/scripts/statistics/statistics.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/statistics.m Fri Oct 09 13:28:53 2020 -0700 @@ -39,7 +39,7 @@ function stats = statistics (x, dim) - if (nargin != 1 && nargin != 2) + if (nargin < 1) print_usage (); endif @@ -93,8 +93,7 @@ %! assert (kurtosis (x, [], 2), s(:,9), eps); ## Test input validation -%!error statistics () -%!error statistics (1, 2, 3) +%!error <Invalid call> statistics () %!error statistics (['A'; 'B']) %!error statistics (1, ones (2,2)) %!error statistics (1, 1.5)
--- a/scripts/statistics/std.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/std.m Fri Oct 09 13:28:53 2020 -0700 @@ -126,8 +126,7 @@ %!assert (std ([1 2 3], [], 3), [0 0 0]) ## Test input validation -%!error std () -%!error std (1, 2, 3, 4) +%!error <Invalid call> std () %!error <X must be a numeric> std (['A'; 'B']) %!error <OPT must be 0 or 1> std (1, 2) %!error <DIM must be an integer> std (1, [], ones (2,2))
--- a/scripts/statistics/var.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/statistics/var.m Fri Oct 09 13:28:53 2020 -0700 @@ -123,8 +123,7 @@ %!assert (var ([1,2,3], [], 3), [0,0,0]) ## Test input validation -%!error var () -%!error var (1,2,3,4) +%!error <Invalid call> var () %!error <X must be a numeric> var (['A'; 'B']) %!error <OPT must be 0 or 1> var (1, -1) %!error <FLAG must be 0 or 1> skewness (1, 2)
--- a/scripts/strings/base2dec.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/base2dec.m Fri Oct 09 13:28:53 2020 -0700 @@ -128,7 +128,7 @@ %!assert <*35621> (base2dec (["0"; "1"], 2), [0; 1]) ## Test input validation -%!error base2dec () +%!error <Invalid call> base2dec () %!error base2dec ("11120") %!error base2dec ("11120", 3, 4) %!error <symbols .* must be unique> base2dec ("11120", "1231")
--- a/scripts/strings/bin2dec.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/bin2dec.m Fri Oct 09 13:28:53 2020 -0700 @@ -74,6 +74,5 @@ %!assert (bin2dec (char ("1 0 1", " 1111")), [5; 15]) ## Test input validation -%!error bin2dec () -%!error bin2dec (1) -%!error bin2dec ("1", 2) +%!error <Invalid call> bin2dec () +%!error <S must be a string> bin2dec (1)
--- a/scripts/strings/blanks.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/blanks.m Fri Oct 09 13:28:53 2020 -0700 @@ -63,8 +63,7 @@ %!assert (blanks (10), " ") ## Test input validation -%!error blanks () -%!error blanks (1, 2) +%!error <Invalid call> blanks () %!error blanks (ones (2)) %!error blanks (2.1) %!error blanks (-2)
--- a/scripts/strings/dec2base.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/dec2base.m Fri Oct 09 13:28:53 2020 -0700 @@ -163,9 +163,8 @@ %!assert <*56005> (dec2base ([0, 0], 16), ["0"; "0"]) ## Test input validation -%!error dec2base () -%!error dec2base (1) -%!error dec2base (1, 2, 3, 4) +%!error <Invalid call> dec2base () +%!error <Invalid call> dec2base (1) %!error dec2base ("A") %!error dec2base (2i) %!error dec2base (-1)
--- a/scripts/strings/dec2bin.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/dec2bin.m Fri Oct 09 13:28:53 2020 -0700 @@ -130,6 +130,5 @@ %! ["00000001"; "00000011"; "00000010"; "11111100"]) ## Test input validation -%!error dec2bin () -%!error dec2bin (1, 2, 3) +%!error <Invalid call> dec2bin () %!error <negative inputs cannot be less than> dec2bin (- flintmax ())
--- a/scripts/strings/dec2hex.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/dec2hex.m Fri Oct 09 13:28:53 2020 -0700 @@ -122,6 +122,5 @@ %!assert (dec2hex ({1, 2; 3, -4}), ["01"; "03"; "02"; "FC"]) ## Test input validation -%!error dec2hex () -%!error dec2hex (1, 2, 3) +%!error <Invalid call> dec2hex () %!error <negative inputs cannot be less than> dec2hex (- flintmax ())
--- a/scripts/strings/endsWith.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/endsWith.m Fri Oct 09 13:28:53 2020 -0700 @@ -156,7 +156,7 @@ %! assert (endsWith (str, pattern, "iG", 0), expected_wo_ignore); ## Test input validation -%!error endsWith () +%!error <Invalid call> endsWith () %!error endsWith ("A") %!error endsWith ("A", "B", "C") %!error endsWith ("A", "B", "C", "D", "E")
--- a/scripts/strings/erase.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/erase.m Fri Oct 09 13:28:53 2020 -0700 @@ -143,7 +143,7 @@ %!assert (erase ({'Hello World t '}, {'ld '; 'o '}), {'HellWort '}) ## Test input validation -%!error erase () +%!error <Invalid call> erase () %!error erase ("a") %!error erase ("a", "b", "c") %!error <STR must be a string> erase ([1], "foo")
--- a/scripts/strings/hex2dec.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/hex2dec.m Fri Oct 09 13:28:53 2020 -0700 @@ -65,6 +65,5 @@ %!assert (hex2dec ({"A1", "1A"}), [161; 26]) ## Test input validation -%!error hex2dec () -%!error hex2dec (1) -%!error hex2dec ("1", 2) +%!error <Invalid call> hex2dec () +%!error <S must be a string> hex2dec (1)
--- a/scripts/strings/index.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/index.m Fri Oct 09 13:28:53 2020 -0700 @@ -113,7 +113,7 @@ %! assert (index (str, "o", "last"), [5; 2; 3; 2]); ## Test input validation -%!error index () +%!error <Invalid call> index () %!error index ("a") %!error index ("a", "b", "first", "d") %!error index (1, "bar")
--- a/scripts/strings/isletter.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/isletter.m Fri Oct 09 13:28:53 2020 -0700 @@ -43,5 +43,5 @@ endfunction -%!error isletter () +%!error <Invalid call> isletter () %!error isletter ("a", "b")
--- a/scripts/strings/isstring.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/isstring.m Fri Oct 09 13:28:53 2020 -0700 @@ -59,5 +59,5 @@ %!assert (isstring ({'a'}), false) %!assert (isstring ({"b"}), false) -%!error isstring () +%!error <Invalid call> isstring () %!error isstring ("a", "b")
--- a/scripts/strings/isstrprop.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/isstrprop.m Fri Oct 09 13:28:53 2020 -0700 @@ -137,7 +137,7 @@ %!assert (isstrprop ({"AbC", "123"}, "lower"), {logical([0 1 0]), logical([0 0 0])}) ## Test input validation -%!error isstrprop () +%!error <Invalid call> isstrprop () %!error isstrprop ("abc123") %!error isstrprop ("abc123", "alpha", "alpha") %!error <invalid string property> isstrprop ("abc123", "foo")
--- a/scripts/strings/mat2str.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/mat2str.m Fri Oct 09 13:28:53 2020 -0700 @@ -151,8 +151,7 @@ %!assert (mat2str (logical ([0 1; 0 0])), "[false true;false false]") ## Test input validation -%!error mat2str () -%!error mat2str (1,2,3,4) +%!error <Invalid call> mat2str () %!error mat2str (["Hello"]) %!error <X must be two dimensional> mat2str (ones (3,3,2)) %!error <N must have only 1 or 2 elements> mat2str (ones (3,3), [1 2 3])
--- a/scripts/strings/ostrsplit.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/ostrsplit.m Fri Oct 09 13:28:53 2020 -0700 @@ -119,7 +119,7 @@ %!assert (ostrsplit (char ("a,bc", ",de"), ", ", true), {"a", "bc", "de"}) ## Test input validation -%!error ostrsplit () +%!error <Invalid call> ostrsplit () %!error ostrsplit ("abc") %!error ostrsplit ("abc", "b", true, 4) %!error <S and SEP must be string values> ostrsplit (123, "b")
--- a/scripts/strings/rindex.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/rindex.m Fri Oct 09 13:28:53 2020 -0700 @@ -67,6 +67,6 @@ %! assert (rindex (str, "o"), [5; 2; 3; 2]); ## Test input validation -%!error rindex () +%!error <Invalid call> rindex () %!error rindex ("foo") %!error rindex ("foo", "bar", "last")
--- a/scripts/strings/startsWith.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/startsWith.m Fri Oct 09 13:28:53 2020 -0700 @@ -155,7 +155,7 @@ %! assert (startsWith (str, pattern, "iG", 0), expected_wo_ignore); ## Test input validation -%!error startsWith () +%!error <Invalid call> startsWith () %!error startsWith ("A") %!error startsWith ("A", "B", "C") %!error startsWith ("A", "B", "C", "D", "E")
--- a/scripts/strings/strtrunc.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/strtrunc.m Fri Oct 09 13:28:53 2020 -0700 @@ -78,7 +78,7 @@ %! assert (y{2}, repmat ("line", 2, 1)); ## Test input validation -%!error strtrunc () +%!error <Invalid call> strtrunc () %!error strtrunc ("abcd") %!error strtrunc ("abcd", 4, 5) %!error <N must be a positive integer> strtrunc ("abcd", ones (2,2))
--- a/scripts/strings/substr.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/strings/substr.m Fri Oct 09 13:28:53 2020 -0700 @@ -104,7 +104,7 @@ %!assert (isempty (substr ("This is a test string", 1, 0))) ## Test input validation -%!error substr () +%!error <Invalid call> substr () %!error substr ("foo", 2, 3, 4) %!error substr (ones (5, 1), 1, 1) %!error substr ("foo", ones (2,2))
--- a/scripts/testfun/fail.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/testfun/fail.m Fri Oct 09 13:28:53 2020 -0700 @@ -157,6 +157,5 @@ %!error <warning failure> fail ("warning ('warning failure')", "warning", "success") ## Test input validation -%!error fail () -%!error fail (1,2,3,4) +%!error <Invalid call> fail () %!error fail (1, "nowarning", "foo")
--- a/scripts/time/addtodate.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/time/addtodate.m Fri Oct 09 13:28:53 2020 -0700 @@ -121,10 +121,9 @@ %!assert (addtodate ([d d+1], 1, "month"), [d+31 d+1+31]) ## Test input validation -%!error addtodate () -%!error addtodate (1) -%!error addtodate (1,2) -%!error addtodate (1,2,3,4) +%!error <Invalid call> addtodate () +%!error <Invalid call> addtodate (1) +%!error <Invalid call> addtodate (1,2) %!error <F must be a single character string> addtodate (1,2,3) %!error <F must be a single character string> addtodate (1,2,"month"') %!error <Invalid time unit> addtodate (1,2,"abc")
--- a/scripts/time/asctime.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/time/asctime.m Fri Oct 09 13:28:53 2020 -0700 @@ -58,5 +58,4 @@ %!assert (asctime (localtime (time ()))(end), "\n") -%!error asctime () -%!error asctime (1, 2) +%!error <Invalid call> asctime ()
--- a/scripts/time/ctime.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/time/ctime.m Fri Oct 09 13:28:53 2020 -0700 @@ -58,5 +58,4 @@ %!assert (ctime (time ())(end), "\n") -%!error ctime () -%!error ctime (1, 2) +%!error <Invalid call> ctime ()
--- a/scripts/time/date.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/time/date.m Fri Oct 09 13:28:53 2020 -0700 @@ -46,6 +46,3 @@ %!assert (strcmp (date (), strftime ("%d-%b-%Y", localtime (time ())))) - -## Test input validation -%!error date (1)
--- a/scripts/time/datestr.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/time/datestr.m Fri Oct 09 13:28:53 2020 -0700 @@ -368,5 +368,4 @@ %! "00:05:00.000") ## Test input validation -%!error datestr () -%!error datestr (1, 2, 3, 4) +%!error <Invalid call> datestr ()
--- a/scripts/time/eomday.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/time/eomday.m Fri Oct 09 13:28:53 2020 -0700 @@ -61,6 +61,5 @@ %!assert (eomday ([2004;2005], [2;2]), [29;28]) ## Test input validation -%!error eomday () -%!error eomday (1) -%!error eomday (1,2,3) +%!error <Invalid call> eomday () +%!error <Invalid call> eomday (1)
--- a/scripts/time/etime.m Fri Oct 09 18:25:25 2020 +0200 +++ b/scripts/time/etime.m Fri Oct 09 13:28:53 2020 -0700 @@ -80,6 +80,5 @@ %! assert (etime (t5, t1), 13); ## Test input validation -%!error etime () -%!error etime (1) -%!error etime (1, 2, 3) +%!error <Invalid call> etime () +%!error <Invalid call> etime (1)