annotate test/for.tst @ 27919:1891570abac8

update Octave Project Developers copyright for the new year In files that have the "Octave Project Developers" copyright notice, update for 2020.
author John W. Eaton <jwe@octave.org>
date Mon, 06 Jan 2020 22:29:51 -0500
parents b442ec6dda5c
children bd51beb6205e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27919
1891570abac8 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 27918
diff changeset
1 ## Copyright (C) 2006-2020 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26946
diff changeset
2 ##
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26946
diff changeset
3 ## See the file COPYRIGHT.md in the top-level directory of this distribution
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26946
diff changeset
4 ## or <https://octave.org/COPYRIGHT.html/>.
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26946
diff changeset
5 ##
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6602
diff changeset
6 ##
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6602
diff changeset
7 ## This file is part of Octave.
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6602
diff changeset
8 ##
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23925
diff changeset
9 ## Octave is free software: you can redistribute it and/or modify it
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6602
diff changeset
10 ## under the terms of the GNU General Public License as published by
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23925
diff changeset
11 ## the Free Software Foundation, either version 3 of the License, or
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
12 ## (at your option) any later version.
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6602
diff changeset
13 ##
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6602
diff changeset
14 ## Octave is distributed in the hope that it will be useful, but
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6602
diff changeset
15 ## WITHOUT ANY WARRANTY; without even the implied warranty of
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
17 ## GNU General Public License for more details.
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6602
diff changeset
18 ##
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6602
diff changeset
19 ## You should have received a copy of the GNU General Public License
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6602
diff changeset
20 ## along with Octave; see the file COPYING. If not, see
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23925
diff changeset
21 ## <https://www.gnu.org/licenses/>.
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6602
diff changeset
22
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
23 %!test
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
24 %! for i = 1
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
25 %! __printf_assert__ ("%d", i);
17309
5a65b2cc9508 test: Add tests for 'end' form of 'endfor', 'endif', etc.
Rik <rik@octave.org>
parents: 16937
diff changeset
26 %! end # "end" is part of test, check not using "endfor"
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
27 %! __printf_assert__ ("\n");
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
28 %! assert (__prog_output_assert__ ("1"));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
29
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
30 %!test
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
31 %! for i = 1:4
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
32 %! __printf_assert__ ("%d", i);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
33 %! endfor
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
34 %! __printf_assert__ ("\n");
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
35 %! assert (__prog_output_assert__ ("1234"));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
36
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
37 %!test
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
38 %! for i = [1,2,3,4]
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
39 %! __printf_assert__ ("%d", i);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
40 %! endfor
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
41 %! __printf_assert__ ("\n");
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
42 %! assert (__prog_output_assert__ ("1234"));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
43
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
44 %!test
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
45 %! for i = [1,2;3,4]
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
46 %! __printf_assert__ ("%d", i(1,1));
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
47 %! __printf_assert__ ("%d", i(2,1));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
48 %! endfor
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
49 %! __printf_assert__ ("\n");
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
50 %! assert (__prog_output_assert__ ("1324"));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
51
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
52 %!test
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
53 %! for i = I
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
54 %! __printf_assert__ ("%d", imag (i));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
55 %! endfor
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
56 %! __printf_assert__ ("\n");
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
57 %! assert (__prog_output_assert__ ("1"));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
58
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
59 %!test
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
60 %! for i = [1,2,3,4]*I
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
61 %! __printf_assert__ ("%d", imag (i));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
62 %! endfor
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
63 %! __printf_assert__ ("\n");
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
64 %! assert (__prog_output_assert__ ("1234"));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
65
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
66 %!test
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
67 %! for i = [1,2;3,4]*I
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
68 %! __printf_assert__ ("%d", imag (i(1,1)));
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
69 %! __printf_assert__ ("%d", imag (i(2,1)));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
70 %! endfor
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
71 %! __printf_assert__ ("\n");
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
72 %! assert (__prog_output_assert__ ("1324"));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
73
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
74 %!test
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
75 %! for i = [1,2,3,4]
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
76 %! if (i > 2)
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
77 %! break;
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
78 %! endif
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
79 %! __printf_assert__ ("%d", i);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
80 %! endfor
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
81 %! __printf_assert__ ("\n");
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
82 %! assert (__prog_output_assert__ ("12"));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
83
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
84 %!test
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
85 %! for i = [1,2,3,4]
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
86 %! if (i < 3)
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
87 %! continue;
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
88 %! endif
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
89 %! __printf_assert__ ("%d", i);
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
90 %! endfor
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
91 %! __printf_assert__ ("\n");
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
92 %! assert (__prog_output_assert__ ("34"));
5590
1ad66ea35fe5 [project @ 2006-01-06 00:24:05 by jwe]
jwe
parents:
diff changeset
93
6587
00fad3bad2a5 [project @ 2007-04-26 20:23:31 by dbateman]
dbateman
parents: 5590
diff changeset
94 %!test
00fad3bad2a5 [project @ 2007-04-26 20:23:31 by dbateman]
dbateman
parents: 5590
diff changeset
95 %! a = [1,3;2,4];
00fad3bad2a5 [project @ 2007-04-26 20:23:31 by dbateman]
dbateman
parents: 5590
diff changeset
96 %! j = 0;
00fad3bad2a5 [project @ 2007-04-26 20:23:31 by dbateman]
dbateman
parents: 5590
diff changeset
97 %! for i = cat (3, a, 4 + a)
21580
ecce63c99c3f maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents: 19697
diff changeset
98 %! assert (i, [1;2] + 2*j++);
6587
00fad3bad2a5 [project @ 2007-04-26 20:23:31 by dbateman]
dbateman
parents: 5590
diff changeset
99 %! endfor
00fad3bad2a5 [project @ 2007-04-26 20:23:31 by dbateman]
dbateman
parents: 5590
diff changeset
100
00fad3bad2a5 [project @ 2007-04-26 20:23:31 by dbateman]
dbateman
parents: 5590
diff changeset
101 %!test
00fad3bad2a5 [project @ 2007-04-26 20:23:31 by dbateman]
dbateman
parents: 5590
diff changeset
102 %! a = {1,3;2,4};
6602
8ebd4f842715 [project @ 2007-04-30 17:12:45 by jwe]
jwe
parents: 6587
diff changeset
103 %! j = 0;
16213
b1283d4c06c2 test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents: 16030
diff changeset
104 %! for i = cat (3, a, cellfun (@(x) 4 + x, a, "UniformOutput", 0))
21580
ecce63c99c3f maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents: 19697
diff changeset
105 %! assert (i, {1 + 2*j; 2 + 2*j++});
6587
00fad3bad2a5 [project @ 2007-04-26 20:23:31 by dbateman]
dbateman
parents: 5590
diff changeset
106 %! endfor
16681
d3619d4d267c recognize character string at beginning of statement (bug #38926, #38958)
John W. Eaton <jwe@octave.org>
parents: 16213
diff changeset
107
17309
5a65b2cc9508 test: Add tests for 'end' form of 'endfor', 'endif', etc.
Rik <rik@octave.org>
parents: 16937
diff changeset
108 ## test parsing of single-quoted character string appearing at the
5a65b2cc9508 test: Add tests for 'end' form of 'endfor', 'endif', etc.
Rik <rik@octave.org>
parents: 16937
diff changeset
109 ## beginning of a for loop
16681
d3619d4d267c recognize character string at beginning of statement (bug #38926, #38958)
John W. Eaton <jwe@octave.org>
parents: 16213
diff changeset
110 %!test
d3619d4d267c recognize character string at beginning of statement (bug #38926, #38958)
John W. Eaton <jwe@octave.org>
parents: 16213
diff changeset
111 %! for i = 1:5
d3619d4d267c recognize character string at beginning of statement (bug #38926, #38958)
John W. Eaton <jwe@octave.org>
parents: 16213
diff changeset
112 %! 'foo';
d3619d4d267c recognize character string at beginning of statement (bug #38926, #38958)
John W. Eaton <jwe@octave.org>
parents: 16213
diff changeset
113 %! endfor
d3619d4d267c recognize character string at beginning of statement (bug #38926, #38958)
John W. Eaton <jwe@octave.org>
parents: 16213
diff changeset
114 %! assert (i, 5);
17311
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
115
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
116 %!test
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
117 %! parfor i = 1
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
118 %! __printf_assert__ ("%d", i);
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
119 %! end # "end" is part of test, check not using "endparfor"
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
120 %! __printf_assert__ ("\n");
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
121 %! assert (__prog_output_assert__ ("1"));
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
122
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
123 %!test
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
124 %! parfor i = 1:4
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
125 %! __printf_assert__ ("%d", i);
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
126 %! endparfor
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
127 %! __printf_assert__ ("\n");
56404cdcb723 Correct parfor keyword documentation and add some %!tests.
Rik <rik@octave.org>
parents: 17309
diff changeset
128 %! assert (__prog_output_assert__ ("1234"));
23514
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
129
26946
04e5cb5e2cb3 update bug status in tests
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
130 %!test <*50893>
23563
614d71cdf614 maint: Strip trailing whitespace from files.
John W. Eaton <jwe@octave.org>
parents: 23514
diff changeset
131 %! cnt = 0;
23514
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
132 %! for k = zeros (0,3);
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
133 %! cnt++;
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
134 %! endfor
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
135 %! assert (cnt, 0);
23925
d64985eaf56d Change failing BIST tests to pass with Octave-expected values.
Rik <rik@octave.org>
parents: 23573
diff changeset
136 %! assert (k, zeros (0,3));
23514
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
137
26946
04e5cb5e2cb3 update bug status in tests
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
138 %!test <*50893>
23563
614d71cdf614 maint: Strip trailing whitespace from files.
John W. Eaton <jwe@octave.org>
parents: 23514
diff changeset
139 %! cnt = 0;
23514
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
140 %! for k = zeros (3,0);
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
141 %! cnt++;
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
142 %! endfor
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
143 %! assert (cnt, 0);
23925
d64985eaf56d Change failing BIST tests to pass with Octave-expected values.
Rik <rik@octave.org>
parents: 23573
diff changeset
144 %! assert (k, zeros (3,0));
23514
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
145
26946
04e5cb5e2cb3 update bug status in tests
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
146 %!test <*50893>
23563
614d71cdf614 maint: Strip trailing whitespace from files.
John W. Eaton <jwe@octave.org>
parents: 23514
diff changeset
147 %! cnt = 0;
23514
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
148 %! for k = zeros (3,0, "uint32");
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
149 %! cnt++;
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
150 %! endfor
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
151 %! assert (cnt, 0);
23925
d64985eaf56d Change failing BIST tests to pass with Octave-expected values.
Rik <rik@octave.org>
parents: 23573
diff changeset
152 %! assert (k, zeros (3,0, "uint32"));
23514
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
153
26946
04e5cb5e2cb3 update bug status in tests
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
154 %!test <*50893>
23563
614d71cdf614 maint: Strip trailing whitespace from files.
John W. Eaton <jwe@octave.org>
parents: 23514
diff changeset
155 %! cnt = 0;
23514
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
156 %! for k = cell (0,3);
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
157 %! cnt++;
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
158 %! endfor
fd7a16594614 Don't iterate over empty for loop expressions (bug #50893).
Rik <rik@octave.org>
parents: 23220
diff changeset
159 %! assert (cnt, 0);
23925
d64985eaf56d Change failing BIST tests to pass with Octave-expected values.
Rik <rik@octave.org>
parents: 23573
diff changeset
160 %! assert (k, cell (0,3));