5590
|
1 %% Automatically generated from DejaGNU files |
|
2 |
|
3 %% test/octave.test/for/for-1.m |
|
4 %!test |
|
5 %! for i = 1 |
|
6 %! printf_assert ("%d", i); |
|
7 %! end |
|
8 %! printf_assert ("\n"); |
|
9 %! assert(prog_output_assert("1")); |
|
10 |
|
11 %% test/octave.test/for/for-2.m |
|
12 %!test |
|
13 %! for i = 1:4 |
|
14 %! printf_assert ("%d", i); |
|
15 %! endfor |
|
16 %! printf_assert ("\n"); |
|
17 %! assert(prog_output_assert("1234")); |
|
18 |
|
19 %% test/octave.test/for/for-3.m |
|
20 %!test |
|
21 %! for i = [1,2,3,4] |
|
22 %! printf_assert ("%d", i); |
|
23 %! endfor |
|
24 %! printf_assert ("\n"); |
|
25 %! assert(prog_output_assert("1234")); |
|
26 |
|
27 %% test/octave.test/for/for-4.m |
|
28 %!test |
|
29 %! for i = [1,2;3,4] |
|
30 %! printf_assert ("%d", i(1,1)); |
|
31 %! printf_assert ("%d", i(2,1)); |
|
32 %! endfor |
|
33 %! printf_assert ("\n"); |
|
34 %! assert(prog_output_assert("1324")); |
|
35 |
|
36 %% test/octave.test/for/for-5.m |
|
37 %!test |
|
38 %! for i = I |
|
39 %! printf_assert ("%d", imag (i)); |
|
40 %! endfor |
|
41 %! printf_assert ("\n"); |
|
42 %! assert(prog_output_assert("1")); |
|
43 |
|
44 %% test/octave.test/for/for-6.m |
|
45 %!test |
|
46 %! for i = [1,2,3,4]*I |
|
47 %! printf_assert ("%d", imag (i)); |
|
48 %! endfor |
|
49 %! printf_assert ("\n"); |
|
50 %! assert(prog_output_assert("1234")); |
|
51 |
|
52 %% test/octave.test/for/for-7.m |
|
53 %!test |
|
54 %! for i = [1,2;3,4]*I |
|
55 %! printf_assert ("%d", imag (i(1,1))); |
|
56 %! printf_assert ("%d", imag (i(2,1))); |
|
57 %! endfor |
|
58 %! printf_assert ("\n"); |
|
59 %! assert(prog_output_assert("1324")); |
|
60 |
|
61 %% test/octave.test/for/for-8.m |
|
62 %!test |
|
63 %! for i = [1,2,3,4] |
|
64 %! if (i > 2) |
|
65 %! break; |
|
66 %! endif |
|
67 %! printf_assert ("%d", i); |
|
68 %! endfor |
|
69 %! printf_assert ("\n"); |
|
70 %! assert(prog_output_assert("12")); |
|
71 |
|
72 %% test/octave.test/for/for-9.m |
|
73 %!test |
|
74 %! for i = [1,2,3,4] |
|
75 %! if (i < 3) |
|
76 %! continue; |
|
77 %! endif |
|
78 %! printf_assert ("%d", i); |
|
79 %! endfor |
|
80 %! printf_assert ("\n"); |
|
81 %! assert(prog_output_assert("34")); |
|
82 |