changeset 22627:7b190a2f11cb stable

maint: Use 2-space indent in definition of BIST %!functions. * randi.m, structfun.m, normest1.m, frame2im.m, im2frame.m, test.m: Use 2-space indent in definition of BIST %!functions.
author Rik <rik@octave.org>
date Sun, 16 Oct 2016 10:51:45 -0700
parents 869c02fde46c
children a918e983a943
files scripts/general/randi.m scripts/general/structfun.m scripts/linear-algebra/normest1.m scripts/plot/util/frame2im.m scripts/plot/util/im2frame.m scripts/testfun/test.m
diffstat 6 files changed, 37 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/general/randi.m	Sat Oct 15 22:39:29 2016 -0700
+++ b/scripts/general/randi.m	Sun Oct 16 10:51:45 2016 -0700
@@ -163,13 +163,13 @@
 
 ## Test that no warning thrown if IMAX is exactly on the limits of the range
 %!function test_no_warning (func, varargin)
-%! state = warning ("query");
-%! unwind_protect
-%!   warning ("error", "all");
-%!   func (varargin{:});
-%! unwind_protect_cleanup
-%!   warning (state);
-%! end_unwind_protect
+%!  state = warning ("query");
+%!  unwind_protect
+%!    warning ("error", "all");
+%!    func (varargin{:});
+%!  unwind_protect_cleanup
+%!    warning (state);
+%!  end_unwind_protect
 %!endfunction
 %!test test_no_warning (@randi, max_int8, "int8");
 %!test test_no_warning (@randi, max_uint8, "uint8");
--- a/scripts/general/structfun.m	Sat Oct 15 22:39:29 2016 -0700
+++ b/scripts/general/structfun.m	Sun Oct 16 10:51:45 2016 -0700
@@ -121,8 +121,8 @@
 %! assert (o, l);
 
 %!function [a, b] = __twoouts (x)
-%! a = x + x;
-%! b = x * x;
+%!  a = x + x;
+%!  b = x * x;
 %!endfunction
 
 %!test
--- a/scripts/linear-algebra/normest1.m	Sat Oct 15 22:39:29 2016 -0700
+++ b/scripts/linear-algebra/normest1.m	Sun Oct 16 10:51:45 2016 -0700
@@ -248,28 +248,28 @@
 endfunction
 
 %!function z = afun_A (flag, x, A, n)
-%! switch flag
-%! case {"dim"}
-%!   z = n;
-%! case {"real"}
-%!   z = isreal (A);
-%! case {"transp"}
-%!   z = A' * x;
-%! case {"notransp"}
-%!   z = A * x;
-%! endswitch
+%!  switch flag
+%!  case {"dim"}
+%!    z = n;
+%!  case {"real"}
+%!    z = isreal (A);
+%!  case {"transp"}
+%!    z = A' * x;
+%!  case {"notransp"}
+%!    z = A * x;
+%!  endswitch
 %!endfunction
 %!function z = afun_A_P (flag, x, A, m)
-%! switch flag
-%! case "dim"
-%!   z = length (A);
-%! case "real"
-%!   z = isreal (A);
-%! case "transp"
-%!   z = x; for i = 1:m, z = A' * z;, endfor
-%! case "notransp"
-%!   z = x; for i = 1:m, z = A * z;, endfor
-%! endswitch
+%!  switch flag
+%!  case "dim"
+%!    z = length (A);
+%!  case "real"
+%!    z = isreal (A);
+%!  case "transp"
+%!    z = x; for i = 1:m, z = A' * z;, endfor
+%!  case "notransp"
+%!    z = x; for i = 1:m, z = A * z;, endfor
+%!  endswitch
 %!endfunction
 
 %!test
--- a/scripts/plot/util/frame2im.m	Sat Oct 15 22:39:29 2016 -0700
+++ b/scripts/plot/util/frame2im.m	Sun Oct 16 10:51:45 2016 -0700
@@ -59,11 +59,11 @@
 
 
 %!function f = make_rgb_f ()
-%! f = randi ([0 255], 10, 20, 3);
+%!  f = randi ([0 255], 10, 20, 3);
 %!endfunction
 
 %!function f = make_ind_f ()
-%! f = randi ([1 100], 10, 20, 3);
+%!  f = randi ([1 100], 10, 20, 3);
 %!endfunction
 
 %!test
--- a/scripts/plot/util/im2frame.m	Sat Oct 15 22:39:29 2016 -0700
+++ b/scripts/plot/util/im2frame.m	Sun Oct 16 10:51:45 2016 -0700
@@ -69,11 +69,11 @@
 
 
 %!function f = make_rgb_f ()
-%! f = randi ([0 255], 10, 20, 3);
+%!  f = randi ([0 255], 10, 20, 3);
 %!endfunction
 
 %!function f = make_ind_f ()
-%! f = randi ([1 100], 10, 20, 3);
+%!  f = randi ([1 100], 10, 20, 3);
 %!endfunction
 
 %!test
--- a/scripts/testfun/test.m	Sat Oct 15 22:39:29 2016 -0700
+++ b/scripts/testfun/test.m	Sun Oct 16 10:51:45 2016 -0700
@@ -885,19 +885,19 @@
 
 ## Test 'function' keyword
 %!function x = __test_a (y)
-%! x = 2*y;
+%!  x = 2*y;
 %!endfunction
 %!assert (__test_a (2), 4)  # Test a test function
 
 %!function __test_a (y)
-%! x = 2*y;
+%!  x = 2*y;
 %!endfunction
 %!test
 %! __test_a (2);            # Test a test function with no return value
 
 %!function [x,z] = __test_a (y)
-%! x = 2*y;
-%! z = 3*y;
+%!  x = 2*y;
+%!  z = 3*y;
 %!endfunction
 %!test
 %! [x,z] = __test_a (3);    # Test a test function with multiple returns