5590
|
1 %% Automatically generated from DejaGNU files |
|
2 |
|
3 %% test/octave.test/while/while-1.m |
|
4 %!test |
|
5 %! i = 0; |
|
6 %! while (eye (2)) |
|
7 %! i++; |
|
8 %! printf_assert ("%d\n", i); |
|
9 %! endwhile; |
|
10 %! assert(prog_output_assert("")); |
|
11 |
|
12 %% test/octave.test/while/while-2.m |
|
13 %!test |
|
14 %! i = 5; |
|
15 %! while (--i) |
|
16 %! printf_assert ("%d", i); |
|
17 %! endwhile |
|
18 %! printf_assert ("\n"); |
|
19 %! assert(prog_output_assert("4321")); |
|
20 |
|
21 %% test/octave.test/while/while-3.m |
|
22 %!test |
|
23 %! i = 5; |
|
24 %! while (i) |
|
25 %! i--; |
|
26 %! printf_assert ("%d", i); |
|
27 %! endwhile |
|
28 %! printf_assert ("\n"); |
|
29 %! assert(prog_output_assert("43210")); |
|
30 |
|
31 %% test/octave.test/while/while-4.m |
|
32 %!test |
|
33 %! i = 0; |
|
34 %! while (i++ < 20) |
|
35 %! if (i > 2) |
|
36 %! break; |
|
37 %! endif |
|
38 %! printf_assert ("%d", i); |
|
39 %! endwhile; |
|
40 %! printf_assert ("\n"); |
|
41 %! assert(prog_output_assert("12")); |
|
42 |
|
43 %% test/octave.test/while/while-5.m |
|
44 %!test |
|
45 %! i = 0; |
|
46 %! while (++i < 5) |
|
47 %! if (i < 3) |
|
48 %! continue; |
|
49 %! endif |
|
50 %! printf_assert ("%d", i); |
|
51 %! endwhile |
|
52 %! printf_assert ("\n"); |
|
53 %! assert(prog_output_assert("34")); |
|
54 |