comparison test/for.tst @ 31564:332a6ccac881 stable

maint: cleanup code in BIST tests to use Octave coding conventions. * data.cc: Use keyword "endfor" rather than bare "end". * file-io.cc, graphics.cc: Remove semicolon ';' at end of "end_try_catch" keyword. * variables.cc, bug-35448.tst, bug-53027.tst, bug-53579.tst, bug-53599.tst, bug-53956.tst, bug-55758.tst, global.tst: Use semicolon ';' after "global" variable declaration. * for.tst, io.tst: Delete semicolon ';' at end of "for" loop declaration. * struct.tst: Delete semicolon ';' at end of "function" declaration.
author Rik <rik@octave.org>
date Sun, 27 Nov 2022 17:01:00 -0800
parents 796f54d4ddbf
children 597f3ee61a48
comparison
equal deleted inserted replaced
31562:8029e9b88950 31564:332a6ccac881
130 %! __printf_assert__ ("\n"); 130 %! __printf_assert__ ("\n");
131 %! assert (__prog_output_assert__ ("1234")); 131 %! assert (__prog_output_assert__ ("1234"));
132 132
133 %!test <*50893> 133 %!test <*50893>
134 %! cnt = 0; 134 %! cnt = 0;
135 %! for k = zeros (0,3); 135 %! for k = zeros (0,3)
136 %! cnt++; 136 %! cnt++;
137 %! endfor 137 %! endfor
138 %! assert (cnt, 0); 138 %! assert (cnt, 0);
139 %! assert (k, zeros (0,3)); 139 %! assert (k, zeros (0,3));
140 140
141 %!test <*50893> 141 %!test <*50893>
142 %! cnt = 0; 142 %! cnt = 0;
143 %! for k = zeros (3,0); 143 %! for k = zeros (3,0)
144 %! cnt++; 144 %! cnt++;
145 %! endfor 145 %! endfor
146 %! assert (cnt, 0); 146 %! assert (cnt, 0);
147 %! assert (k, zeros (3,0)); 147 %! assert (k, zeros (3,0));
148 148
149 %!test <*50893> 149 %!test <*50893>
150 %! cnt = 0; 150 %! cnt = 0;
151 %! for k = zeros (3,0, "uint32"); 151 %! for k = zeros (3,0, "uint32")
152 %! cnt++; 152 %! cnt++;
153 %! endfor 153 %! endfor
154 %! assert (cnt, 0); 154 %! assert (cnt, 0);
155 %! assert (k, zeros (3,0, "uint32")); 155 %! assert (k, zeros (3,0, "uint32"));
156 156
157 %!test <*50893> 157 %!test <*50893>
158 %! cnt = 0; 158 %! cnt = 0;
159 %! for k = cell (0,3); 159 %! for k = cell (0,3)
160 %! cnt++; 160 %! cnt++;
161 %! endfor 161 %! endfor
162 %! assert (cnt, 0); 162 %! assert (cnt, 0);
163 %! assert (k, cell (0,3)); 163 %! assert (k, cell (0,3));
164 164