Mercurial > octave-nkf
diff test/switch.tst @ 17174:c3c1ebfaa7dc
maint: Use common indentation for switch statement.
* scripts/general/interp1.m, scripts/geometry/delaunay.m,
scripts/help/__unimplemented__.m, scripts/image/cmunique.m,
scripts/miscellaneous/edit.m, scripts/optimization/fzero.m,
scripts/optimization/sqp.m, scripts/plot/__gnuplot_drawnow__.m,
scripts/plot/hidden.m, scripts/plot/legend.m, scripts/plot/print.m,
scripts/plot/printd.m, scripts/plot/private/__contour__.m,
scripts/plot/private/__fltk_print__.m,
scripts/plot/private/__gnuplot_print__.m,
scripts/plot/private/__go_draw_axes__.m,
scripts/plot/private/__print_parse_opts__.m, scripts/signal/periodogram.m,
scripts/sparse/bicg.m, test/slice.tst, test/switch.tst:
Use common indentation for switch statement.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 04 Aug 2013 15:11:34 -0700 |
parents | 57fad64de019 |
children | 5a65b2cc9508 |
line wrap: on
line diff
--- a/test/switch.tst Sun Aug 04 17:27:40 2013 -0400 +++ b/test/switch.tst Sun Aug 04 15:11:34 2013 -0700 @@ -21,10 +21,10 @@ %! b = 2; %! c = 3; %! -%! switch 0 case 1 x = a; case 2 x = b; otherwise x = c; endswitch -%! switch 1 case 1 y = a; case 2 y = b; otherwise y = c; endswitch -%! switch 2 case 1 z = a; case 2 z = b; otherwise z = c; endswitch -%! switch 3 case 1 p = a; case 2 p = b; otherwise p = c; endswitch +%! switch (0) case 1 x = a; case 2 x = b; otherwise x = c; endswitch +%! switch (1) case 1 y = a; case 2 y = b; otherwise y = c; endswitch +%! switch (2) case 1 z = a; case 2 z = b; otherwise z = c; endswitch +%! switch (3) case 1 p = a; case 2 p = b; otherwise p = c; endswitch %! %! assert (x == c && y == a && z == b && p == c); @@ -40,11 +40,11 @@ %! for i = 0:3 %! switch (i) %! case a -%! x(k) = a; +%! x(k) = a; %! case b -%! x(k) = b; +%! x(k) = b; %! otherwise -%! x(k) = c; +%! x(k) = c; %! endswitch %! k++; %! endfor @@ -62,8 +62,8 @@ %! %! for i = 0:3 %! switch (i) -%! case a -%! x(k) = a; +%! case a +%! x(k) = a; %! endswitch %! k++; %! endfor @@ -73,9 +73,9 @@ %!test %! a = 1; %! -%! switch 1 -%! otherwise -%! a = 2; +%! switch (1) +%! otherwise +%! a = 2; %! endswitch %! %! assert (a == 2);