# HG changeset patch # User Rik # Date 1476640305 25200 # Node ID 7b190a2f11cba5f1eb6f516747d1bff1779d21a7 # Parent 869c02fde46c3c22d408f3926ef2f71424862014 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. diff -r 869c02fde46c -r 7b190a2f11cb scripts/general/randi.m --- 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"); diff -r 869c02fde46c -r 7b190a2f11cb scripts/general/structfun.m --- 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 diff -r 869c02fde46c -r 7b190a2f11cb scripts/linear-algebra/normest1.m --- 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 diff -r 869c02fde46c -r 7b190a2f11cb scripts/plot/util/frame2im.m --- 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 diff -r 869c02fde46c -r 7b190a2f11cb scripts/plot/util/im2frame.m --- 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 diff -r 869c02fde46c -r 7b190a2f11cb scripts/testfun/test.m --- 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