changeset 28930:2883b3d08b7e

maint: Remove unnecessary parentheses bracketing %!error BIST tests. * bsxfun.cc, call-stack.cc, data.cc, environment.cc, fcn-info.cc, fft.cc, filter.cc, quadcc.cc, sighandlers.cc, sysdep.cc, ov.cc, pt-eval.cc, accumarray.m, repmat.m, beep.m, pchip.m, movfun.m, rosser.m: Remove unnecessary parentheses bracketing %!error BIST tests.
author Rik <rik@octave.org>
date Wed, 14 Oct 2020 13:14:02 -0700
parents 9e43deb9bfc3
children c5b1bbb95a66
files libinterp/corefcn/bsxfun.cc libinterp/corefcn/call-stack.cc libinterp/corefcn/data.cc libinterp/corefcn/environment.cc libinterp/corefcn/fcn-info.cc libinterp/corefcn/fft.cc libinterp/corefcn/filter.cc libinterp/corefcn/quadcc.cc libinterp/corefcn/sighandlers.cc libinterp/corefcn/sysdep.cc libinterp/octave-value/ov.cc libinterp/parse-tree/pt-eval.cc scripts/general/accumarray.m scripts/general/repmat.m scripts/io/beep.m scripts/polynomial/pchip.m scripts/signal/movfun.m scripts/special-matrix/rosser.m
diffstat 18 files changed, 63 insertions(+), 63 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/bsxfun.cc	Wed Oct 14 11:46:55 2020 -0700
+++ b/libinterp/corefcn/bsxfun.cc	Wed Oct 14 13:14:02 2020 -0700
@@ -637,12 +637,12 @@
 %! b = mean (a, 1);
 %! c = mean (a, 2);
 %! f = @minus;
-%!error (bsxfun (f))
-%!error (bsxfun (f, a))
-%!error (bsxfun (a, b))
-%!error (bsxfun (a, b, c))
-%!error (bsxfun (f, a, b, c))
-%!error (bsxfun (f, ones (4, 0), ones (4, 4)))
+%!error bsxfun (f)
+%!error bsxfun (f, a)
+%!error bsxfun (a, b)
+%!error bsxfun (a, b, c)
+%!error bsxfun (f, a, b, c)
+%!error bsxfun (f, ones (4, 0), ones (4, 4))
 %!assert (bsxfun (f, ones (4, 0), ones (4, 1)), zeros (4, 0))
 %!assert (bsxfun (f, ones (1, 4), ones (4, 1)), zeros (4, 4))
 %!assert (bsxfun (f, a, b), a - repmat (b, 4, 1))
@@ -655,12 +655,12 @@
 %! b = mean (a, 1);
 %! c = mean (a, 2);
 %! f = @minus;
-%!error (bsxfun (f))
-%!error (bsxfun (f, a))
-%!error (bsxfun (a, b))
-%!error (bsxfun (a, b, c))
-%!error (bsxfun (f, a, b, c))
-%!error (bsxfun (f, ones (4, 0), ones (4, 4)))
+%!error bsxfun (f)
+%!error bsxfun (f, a)
+%!error bsxfun (a, b)
+%!error bsxfun (a, b, c)
+%!error bsxfun (f, a, b, c)
+%!error bsxfun (f, ones (4, 0), ones (4, 4))
 %!assert (bsxfun (f, ones (4, 0), ones (4, 1)), zeros (4, 0))
 %!assert (bsxfun (f, ones (1, 4), ones (4, 1)), zeros (4, 4))
 %!assert (bsxfun (f, a, b), a - repmat (b, 4, 1))
@@ -673,12 +673,12 @@
 %! b = mean (a, 1);
 %! c = mean (a, 2);
 %! f = @minus;
-%!error (bsxfun (f))
-%!error (bsxfun (f, a))
-%!error (bsxfun (a, b))
-%!error (bsxfun (a, b, c))
-%!error (bsxfun (f, a, b, c))
-%!error (bsxfun (f, ones (4, 0), ones (4, 4)))
+%!error bsxfun (f)
+%!error bsxfun (f, a)
+%!error bsxfun (a, b)
+%!error bsxfun (a, b, c)
+%!error bsxfun (f, a, b, c)
+%!error bsxfun (f, ones (4, 0), ones (4, 4))
 %!assert (bsxfun (f, ones (4, 0), ones (4, 1)), zeros (4, 0))
 %!assert (bsxfun (f, ones (1, 4), ones (4, 1)), zeros (4, 4))
 %!assert (bsxfun (f, a, b), a - repmat (b, 4, 1))
@@ -690,12 +690,12 @@
 %! b = a (1, :);
 %! c = a (:, 1);
 %! f = @(x, y) x == y;
-%!error (bsxfun (f))
-%!error (bsxfun (f, a))
-%!error (bsxfun (a, b))
-%!error (bsxfun (a, b, c))
-%!error (bsxfun (f, a, b, c))
-%!error (bsxfun (f, ones (4, 0), ones (4, 4)))
+%!error bsxfun (f)
+%!error bsxfun (f, a)
+%!error bsxfun (a, b)
+%!error bsxfun (a, b, c)
+%!error bsxfun (f, a, b, c)
+%!error bsxfun (f, ones (4, 0), ones (4, 4))
 %!assert (bsxfun (f, ones (4, 0), ones (4, 1)), zeros (4, 0, "logical"))
 %!assert (bsxfun (f, ones (1, 4), ones (4, 1)), ones (4, 4, "logical"))
 %!assert (bsxfun (f, a, b), a == repmat (b, 4, 1))
@@ -707,7 +707,7 @@
 %! c = mean (a, 2);
 %! d = mean (a, 3);
 %! f = @minus;
-%!error (bsxfun (f, ones ([4, 0, 4]), ones ([4, 4, 4])))
+%!error bsxfun (f, ones ([4, 0, 4]), ones ([4, 4, 4]))
 %!assert (bsxfun (f, ones ([4, 0, 4]), ones ([4, 1, 4])), zeros ([4, 0, 4]))
 %!assert (bsxfun (f, ones ([4, 4, 0]), ones ([4, 1, 1])), zeros ([4, 4, 0]))
 %!assert (bsxfun (f, ones ([1, 4, 4]), ones ([4, 1, 4])), zeros ([4, 4, 4]))
--- a/libinterp/corefcn/call-stack.cc	Wed Oct 14 11:46:55 2020 -0700
+++ b/libinterp/corefcn/call-stack.cc	Wed Oct 14 13:14:02 2020 -0700
@@ -1166,7 +1166,7 @@
 %! max_stack_depth (orig_val);
 %! assert (max_stack_depth (), orig_val);
 
-%!error (max_stack_depth (1, 2))
+%!error max_stack_depth (1, 2)
 */
 
 DEFMETHOD (who, interp, args, nargout,
--- a/libinterp/corefcn/data.cc	Wed Oct 14 11:46:55 2020 -0700
+++ b/libinterp/corefcn/data.cc	Wed Oct 14 13:14:02 2020 -0700
@@ -889,7 +889,7 @@
 %!assert (mod (uint8 (5), uint8 (4)), uint8 (1))
 %!assert (mod (uint8 ([1:5]), uint8 (4)), uint8 ([1,2,3,0,1]))
 %!assert (mod (uint8 ([1:5]), uint8 (0)), uint8 ([1:5]))
-%!error (mod (uint8 (5), int8 (4)))
+%!error mod (uint8 (5), int8 (4))
 
 ## mixed integer/real types
 %!assert (mod (uint8 (5), 4), uint8 (1))
@@ -4485,10 +4485,10 @@
 %!assert (inf (3, 2, "single"), single ([Inf, Inf; Inf, Inf; Inf, Inf]))
 %!assert (size (inf (3, 4, 5, "single")), [3, 4, 5])
 
-%!error (inf (3, "int8"))
-%!error (inf (2, 3, "int8"))
-%!error (inf (3, 2, "int8"))
-%!error (inf (3, 4, 5, "int8"))
+%!error inf (3, "int8")
+%!error inf (2, 3, "int8")
+%!error inf (3, 2, "int8")
+%!error inf (3, 4, 5, "int8")
 */
 
 DEFUN (NaN, args, ,
@@ -4550,10 +4550,10 @@
 %!assert (NaN (3, 2, "single"), single ([NaN, NaN; NaN, NaN; NaN, NaN]))
 %!assert (size (NaN (3, 4, 5, "single")), [3, 4, 5])
 
-%!error (NaN (3, "int8"))
-%!error (NaN (2, 3, "int8"))
-%!error (NaN (3, 2, "int8"))
-%!error (NaN (3, 4, 5, "int8"))
+%!error NaN (3, "int8")
+%!error NaN (2, 3, "int8")
+%!error NaN (3, 2, "int8")
+%!error NaN (3, 4, 5, "int8")
 */
 
 DEFUN (e, args, ,
--- a/libinterp/corefcn/environment.cc	Wed Oct 14 11:46:55 2020 -0700
+++ b/libinterp/corefcn/environment.cc	Wed Oct 14 13:14:02 2020 -0700
@@ -186,7 +186,7 @@
 %! EDITOR (orig_val);
 %! assert (EDITOR (), orig_val);
 
-%!error (EDITOR (1, 2))
+%!error EDITOR (1, 2)
 */
 
 DEFMETHOD (EXEC_PATH, interp, args, nargout,
@@ -223,7 +223,7 @@
 %! EXEC_PATH (orig_val);
 %! assert (EXEC_PATH (), orig_val);
 
-%!error (EXEC_PATH (1, 2))
+%!error EXEC_PATH (1, 2)
 */
 
 DEFMETHOD (IMAGE_PATH, interp, args, nargout,
@@ -255,5 +255,5 @@
 %! IMAGE_PATH (orig_val);
 %! assert (IMAGE_PATH (), orig_val);
 
-%!error (IMAGE_PATH (1, 2))
+%!error IMAGE_PATH (1, 2)
 */
--- a/libinterp/corefcn/fcn-info.cc	Wed Oct 14 11:46:55 2020 -0700
+++ b/libinterp/corefcn/fcn-info.cc	Wed Oct 14 13:14:02 2020 -0700
@@ -1223,7 +1223,7 @@
 %! ignore_function_time_stamp (old_state);
 
 ## Test input validation
-%!error (ignore_function_time_stamp ("all", "all"))
-%!error (ignore_function_time_stamp ("UNKNOWN_VALUE"))
-%!error (ignore_function_time_stamp (42))
+%!error ignore_function_time_stamp ("all", "all")
+%!error ignore_function_time_stamp ("UNKNOWN_VALUE")
+%!error ignore_function_time_stamp (42)
 */
--- a/libinterp/corefcn/fft.cc	Wed Oct 14 11:46:55 2020 -0700
+++ b/libinterp/corefcn/fft.cc	Wed Oct 14 13:14:02 2020 -0700
@@ -187,7 +187,7 @@
 %!testif HAVE_FFTW
 %! assert (fft (eye (2,2,"single")), single ([1,1; 1,-1]))
 
-%!error (fft ())
+%!error fft ()
 */
 
 
--- a/libinterp/corefcn/filter.cc	Wed Oct 14 11:46:55 2020 -0700
+++ b/libinterp/corefcn/filter.cc	Wed Oct 14 13:14:02 2020 -0700
@@ -605,7 +605,7 @@
 %!assert (filter ([1, 1, 1], [1, 1], [1 2], [1, 1]), [2 2])
 %!assert (filter ([1, 1, 1], [1, 1], [1 2], [1, 1]'), [2 2])
 %!assert (filter ([1, 3], [1], [1 2; 3 4; 5 6], [4, 5]), [5 7; 6 10; 14 18])
-%!error (filter ([1, 3], [1], [1 2; 3 4; 5 6], [4, 5]'))
+%!error filter ([1, 3], [1], [1 2; 3 4; 5 6], [4, 5]')
 %!assert (filter ([1, 3, 2], [1], [1 2; 3 4; 5 6], [1 0 0; 1 0 0], 2), [2 6; 3 13; 5 21])
 
 ## Test of DIM parameter
--- a/libinterp/corefcn/quadcc.cc	Wed Oct 14 11:46:55 2020 -0700
+++ b/libinterp/corefcn/quadcc.cc	Wed Oct 14 13:14:02 2020 -0700
@@ -2242,9 +2242,9 @@
 %! assert (class (quadcc (@sin, single (0), single (1))), "single");
 
 ## Test input validation
-%!error (quadcc ())
-%!error (quadcc (@sin))
-%!error (quadcc (@sin, 0))
+%!error quadcc ()
+%!error quadcc (@sin)
+%!error quadcc (@sin, 0)
 %!error <lower limit .* must be a .* scalar> (quadcc (@sin, ones (2), pi))
 %!error <lower limit .* must be a real scalar> (quadcc (@sin, -i, pi))
 %!error <upper limit .* must be a .* scalar> (quadcc (@sin, 0, ones (2)))
--- a/libinterp/corefcn/sighandlers.cc	Wed Oct 14 11:46:55 2020 -0700
+++ b/libinterp/corefcn/sighandlers.cc	Wed Oct 14 13:14:02 2020 -0700
@@ -540,7 +540,7 @@
 %! debug_on_interrupt (orig_val);
 %! assert (debug_on_interrupt (), orig_val);
 
-%!error (debug_on_interrupt (1, 2))
+%!error debug_on_interrupt (1, 2)
 */
 
 DEFUN (sighup_dumps_octave_core, args, nargout,
@@ -571,7 +571,7 @@
 %! sighup_dumps_octave_core (orig_val);
 %! assert (sighup_dumps_octave_core (), orig_val);
 
-%!error (sighup_dumps_octave_core (1, 2))
+%!error sighup_dumps_octave_core (1, 2)
 */
 
 DEFUN (sigquit_dumps_octave_core, args, nargout,
@@ -602,7 +602,7 @@
 %! sigquit_dumps_octave_core (orig_val);
 %! assert (sigquit_dumps_octave_core (), orig_val);
 
-%!error (sigquit_dumps_octave_core (1, 2))
+%!error sigquit_dumps_octave_core (1, 2)
 */
 
 DEFUN (sigterm_dumps_octave_core, args, nargout,
@@ -633,5 +633,5 @@
 %! sigterm_dumps_octave_core (orig_val);
 %! assert (sigterm_dumps_octave_core (), orig_val);
 
-%!error (sigterm_dumps_octave_core (1, 2))
+%!error sigterm_dumps_octave_core (1, 2)
 */
--- a/libinterp/corefcn/sysdep.cc	Wed Oct 14 11:46:55 2020 -0700
+++ b/libinterp/corefcn/sysdep.cc	Wed Oct 14 13:14:02 2020 -0700
@@ -1380,7 +1380,7 @@
 %!test
 %! pause (1);
 
-%!error (pause (1, 2))
+%!error pause (1, 2)
 */
 
 // FIXME: maybe this should only return 1 if IEEE floating
--- a/libinterp/octave-value/ov.cc	Wed Oct 14 11:46:55 2020 -0700
+++ b/libinterp/octave-value/ov.cc	Wed Oct 14 13:14:02 2020 -0700
@@ -1326,7 +1326,7 @@
 %!assert (class (single (uint64 (1))), "single")
 %!assert (class (single (true)), "single")
 %!assert (class (single ("A")), "single")
-%!error (single (sparse (1)))
+%!error single (sparse (1))
 %!test
 %! x = diag ([1 3 2]);
 %! y = single (x);
--- a/libinterp/parse-tree/pt-eval.cc	Wed Oct 14 11:46:55 2020 -0700
+++ b/libinterp/parse-tree/pt-eval.cc	Wed Oct 14 13:14:02 2020 -0700
@@ -4490,7 +4490,7 @@
 %! max_recursion_depth (orig_val);
 %! assert (max_recursion_depth (), orig_val);
 
-%!error (max_recursion_depth (1, 2))
+%!error max_recursion_depth (1, 2)
 */
 
 DEFMETHOD (whos_line_format, interp, args, nargout,
@@ -4602,7 +4602,7 @@
 %! silent_functions (orig_val);
 %! assert (silent_functions (), orig_val);
 
-%!error (silent_functions (1, 2))
+%!error silent_functions (1, 2)
 */
 
 DEFMETHOD (string_fill_char, interp, args, nargout,
@@ -4651,7 +4651,7 @@
 
 %!assert ( [ [], {1} ], {1} )
 
-%!error (string_fill_char (1, 2))
+%!error string_fill_char (1, 2)
 */
 
 DEFMETHOD (PS4, interp, args, nargout,
--- a/scripts/general/accumarray.m	Wed Oct 14 11:46:55 2020 -0700
+++ b/scripts/general/accumarray.m	Wed Oct 14 13:14:02 2020 -0700
@@ -442,8 +442,8 @@
 %! assert (accumarray (subsc, vals, [], @max),
 %!         accumarray (subs, vals, [], @max));
 
-%!error (accumarray (1:5))
-%!error (accumarray ([1,2,3],1:2))
+%!error accumarray (1:5)
+%!error accumarray ([1,2,3],1:2)
 
 ## Handle empty arrays
 %!test <*47287>
--- a/scripts/general/repmat.m	Wed Oct 14 11:46:55 2020 -0700
+++ b/scripts/general/repmat.m	Wed Oct 14 13:14:02 2020 -0700
@@ -221,4 +221,4 @@
 %!assert (size (repmat ({1}, [0, 1])), [0, 1])
 %!assert (size (repmat ({1}, [0, 5])), [0, 5])
 
-%!error (size (repmat (".", -1, -1)))
+%!error size (repmat (".", -1, -1))
--- a/scripts/io/beep.m	Wed Oct 14 11:46:55 2020 -0700
+++ b/scripts/io/beep.m	Wed Oct 14 13:14:02 2020 -0700
@@ -40,4 +40,4 @@
 endfunction
 
 
-%!error (beep (1))
+%!error beep (1)
--- a/scripts/polynomial/pchip.m	Wed Oct 14 11:46:55 2020 -0700
+++ b/scripts/polynomial/pchip.m	Wed Oct 14 13:14:02 2020 -0700
@@ -177,5 +177,5 @@
 %!assert (size (yi2), [3,2,5,4])
 %!assert (squeeze (yi2(1,2,3,:)), [1/sqrt(2); 0; -1/sqrt(2);-1], 1e-14)
 
-%!error (pchip (1,2))
-%!error (pchip (1,2,3))
+%!error pchip (1,2)
+%!error pchip (1,2,3)
--- a/scripts/signal/movfun.m	Wed Oct 14 11:46:55 2020 -0700
+++ b/scripts/signal/movfun.m	Wed Oct 14 13:14:02 2020 -0700
@@ -600,7 +600,7 @@
 %!assert (size( movfun (@(x) [min(x), max(x)], cumsum (ones (10,5),2), 3)),
 %!        [10 5 2])
 ## outdim > dim
-%!error (movfun (@(x) [min(x), max(x)], (1:10).', 3, "Outdim", 3))
+%!error movfun (@(x) [min(x), max(x)], (1:10).', 3, "Outdim", 3)
 
 ## Test input validation
 %!error <Invalid call> movfun ()
--- a/scripts/special-matrix/rosser.m	Wed Oct 14 11:46:55 2020 -0700
+++ b/scripts/special-matrix/rosser.m	Wed Oct 14 13:14:02 2020 -0700
@@ -48,4 +48,4 @@
 %!assert (size (rosser ()), [8,8])
 %!assert (rosser ()([1, end]), [611, 99])
 
-%!error (rosser (1))
+%!error rosser (1)