OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // Dart test program for testing for statement. | 4 // Dart test program for testing for statement. |
5 | 5 |
6 import "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
7 | 7 |
8 // Test several variations of for loops: | 8 // Test several variations of for loops: |
9 // * With or without an initializer. | 9 // * With or without an initializer. |
10 // * With or without a test. | 10 // * With or without a test. |
(...skipping 16 matching lines...) Expand all Loading... |
27 const int TEST = 2; | 27 const int TEST = 2; |
28 const int UPDATE = 4; | 28 const int UPDATE = 4; |
29 const int CONTINUE = 8; | 29 const int CONTINUE = 8; |
30 const int FALL = 16; | 30 const int FALL = 16; |
31 const int BREAK = 32; | 31 const int BREAK = 32; |
32 | 32 |
33 var status; | 33 var status; |
34 | 34 |
35 void loop0() { | 35 void loop0() { |
36 status = 0; | 36 status = 0; |
37 for(;;) { | 37 for (;;) { |
38 return; | 38 return; |
39 } | 39 } |
40 } | 40 } |
41 | 41 |
42 void loop1() { | 42 void loop1() { |
43 status = INIT; | 43 status = INIT; |
44 for(status &= ~INIT;;) { | 44 for (status &= ~INIT;;) { |
45 return; | 45 return; |
46 } | 46 } |
47 } | 47 } |
48 | 48 |
49 void loop2() { | 49 void loop2() { |
50 status = TEST; | 50 status = TEST; |
51 for(; (status &= ~TEST) != 0;) { | 51 for (; (status &= ~TEST) != 0;) { |
52 return; | 52 return; |
53 } | 53 } |
54 } | 54 } |
55 | 55 |
56 void loop3() { | 56 void loop3() { |
57 status = INIT | TEST; | 57 status = INIT | TEST; |
58 for(status &= ~INIT; (status &= ~TEST) != 0;) { | 58 for (status &= ~INIT; (status &= ~TEST) != 0;) { |
59 return; | 59 return; |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 void loop4() { | 63 void loop4() { |
64 status = UPDATE; | 64 status = UPDATE; |
65 for(;; status &= ~UPDATE) { | 65 for (;; status &= ~UPDATE) { |
66 return; | 66 return; |
67 } | 67 } |
68 } | 68 } |
69 | 69 |
70 void loop5() { | 70 void loop5() { |
71 status = INIT | UPDATE; | 71 status = INIT | UPDATE; |
72 for(status &= ~INIT;; status &= ~UPDATE) { | 72 for (status &= ~INIT;; status &= ~UPDATE) { |
73 return; | 73 return; |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 void loop6() { | 77 void loop6() { |
78 status = TEST | UPDATE; | 78 status = TEST | UPDATE; |
79 for(; (status &= ~TEST) != 0; status &= ~UPDATE) { | 79 for (; (status &= ~TEST) != 0; status &= ~UPDATE) { |
80 return; | 80 return; |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 void loop7() { | 84 void loop7() { |
85 status = INIT | TEST | UPDATE; | 85 status = INIT | TEST | UPDATE; |
86 for(status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { | 86 for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { |
87 return; | 87 return; |
88 } | 88 } |
89 } | 89 } |
90 | 90 |
91 // Infinite loop not tested. | 91 // Infinite loop not tested. |
92 void loop8() { | 92 void loop8() { |
93 status = CONTINUE; | 93 status = CONTINUE; |
94 for(;;) { | 94 for (;;) { |
95 status &= ~CONTINUE; | 95 status &= ~CONTINUE; |
96 continue; | 96 continue; |
97 } | 97 } |
98 } | 98 } |
99 | 99 |
100 // Infinite loop not tested. | 100 // Infinite loop not tested. |
101 void loop9() { | 101 void loop9() { |
102 status = INIT | CONTINUE; | 102 status = INIT | CONTINUE; |
103 for(status &= ~INIT;;) { | 103 for (status &= ~INIT;;) { |
104 status &= ~CONTINUE; | 104 status &= ~CONTINUE; |
105 continue; | 105 continue; |
106 } | 106 } |
107 } | 107 } |
108 | 108 |
109 void loop10() { | 109 void loop10() { |
110 status = TEST | CONTINUE; | 110 status = TEST | CONTINUE; |
111 for(; (status &= ~TEST) != 0;) { | 111 for (; (status &= ~TEST) != 0;) { |
112 status &= ~CONTINUE; | 112 status &= ~CONTINUE; |
113 continue; | 113 continue; |
114 } | 114 } |
115 } | 115 } |
116 | 116 |
117 void loop11() { | 117 void loop11() { |
118 status = INIT | TEST | CONTINUE; | 118 status = INIT | TEST | CONTINUE; |
119 for(status &= ~INIT; (status &= ~TEST) != 0;) { | 119 for (status &= ~INIT; (status &= ~TEST) != 0;) { |
120 status &= ~CONTINUE; | 120 status &= ~CONTINUE; |
121 continue; | 121 continue; |
122 } | 122 } |
123 } | 123 } |
124 | 124 |
125 // Infinite loop. | 125 // Infinite loop. |
126 void loop12() { | 126 void loop12() { |
127 status = UPDATE | CONTINUE; | 127 status = UPDATE | CONTINUE; |
128 for(;; status &= ~UPDATE) { | 128 for (;; status &= ~UPDATE) { |
129 status &= ~CONTINUE; | 129 status &= ~CONTINUE; |
130 continue; | 130 continue; |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 // Infinite loop. | 134 // Infinite loop. |
135 void loop13() { | 135 void loop13() { |
136 status = INIT | UPDATE | CONTINUE; | 136 status = INIT | UPDATE | CONTINUE; |
137 for(status &= ~INIT;; status &= ~UPDATE) { | 137 for (status &= ~INIT;; status &= ~UPDATE) { |
138 status &= ~CONTINUE; | 138 status &= ~CONTINUE; |
139 continue; | 139 continue; |
140 } | 140 } |
141 } | 141 } |
142 | 142 |
143 void loop14() { | 143 void loop14() { |
144 status = TEST | UPDATE | CONTINUE; | 144 status = TEST | UPDATE | CONTINUE; |
145 for(; (status &= ~TEST) != 0; status &= ~UPDATE) { | 145 for (; (status &= ~TEST) != 0; status &= ~UPDATE) { |
146 status &= ~CONTINUE; | 146 status &= ~CONTINUE; |
147 continue; | 147 continue; |
148 } | 148 } |
149 } | 149 } |
150 | 150 |
151 void loop15() { | 151 void loop15() { |
152 status = INIT | TEST | UPDATE | CONTINUE; | 152 status = INIT | TEST | UPDATE | CONTINUE; |
153 for(status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { | 153 for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { |
154 status &= ~CONTINUE; | 154 status &= ~CONTINUE; |
155 continue; | 155 continue; |
156 } | 156 } |
157 } | 157 } |
158 | 158 |
159 // Infinite loop. | 159 // Infinite loop. |
160 void loop16() { | 160 void loop16() { |
161 status = FALL; | 161 status = FALL; |
162 for(;;) { | 162 for (;;) { |
163 status &= ~FALL; | 163 status &= ~FALL; |
164 } | 164 } |
165 } | 165 } |
166 | 166 |
167 // Infinite loop. | 167 // Infinite loop. |
168 void loop17() { | 168 void loop17() { |
169 status = INIT | FALL; | 169 status = INIT | FALL; |
170 for(status &= ~INIT;;) { | 170 for (status &= ~INIT;;) { |
171 status &= ~FALL; | 171 status &= ~FALL; |
172 } | 172 } |
173 } | 173 } |
174 | 174 |
175 void loop18() { | 175 void loop18() { |
176 status = TEST | FALL; | 176 status = TEST | FALL; |
177 for(; (status &= ~TEST) != 0;) { | 177 for (; (status &= ~TEST) != 0;) { |
178 status &= ~FALL; | 178 status &= ~FALL; |
179 } | 179 } |
180 } | 180 } |
181 | 181 |
182 void loop19() { | 182 void loop19() { |
183 status = INIT | TEST | FALL; | 183 status = INIT | TEST | FALL; |
184 for(status &= ~INIT; (status &= ~TEST) != 0;) { | 184 for (status &= ~INIT; (status &= ~TEST) != 0;) { |
185 status &= ~FALL; | 185 status &= ~FALL; |
186 } | 186 } |
187 } | 187 } |
188 | 188 |
189 // Infinite loop. | 189 // Infinite loop. |
190 void loop20() { | 190 void loop20() { |
191 status = UPDATE | FALL; | 191 status = UPDATE | FALL; |
192 for(;; status &= ~UPDATE) { | 192 for (;; status &= ~UPDATE) { |
193 status &= ~FALL; | 193 status &= ~FALL; |
194 } | 194 } |
195 } | 195 } |
196 | 196 |
197 // Infinite loop. | 197 // Infinite loop. |
198 void loop21() { | 198 void loop21() { |
199 status = INIT | UPDATE | FALL; | 199 status = INIT | UPDATE | FALL; |
200 for(status &= ~INIT;; status &= ~UPDATE) { | 200 for (status &= ~INIT;; status &= ~UPDATE) { |
201 status &= ~FALL; | 201 status &= ~FALL; |
202 } | 202 } |
203 } | 203 } |
204 | 204 |
205 void loop22() { | 205 void loop22() { |
206 status = TEST | UPDATE | FALL; | 206 status = TEST | UPDATE | FALL; |
207 for(; (status &= ~TEST) != 0; status &= ~UPDATE) { | 207 for (; (status &= ~TEST) != 0; status &= ~UPDATE) { |
208 status &= ~FALL; | 208 status &= ~FALL; |
209 } | 209 } |
210 } | 210 } |
211 | 211 |
212 void loop23() { | 212 void loop23() { |
213 status = INIT | TEST | UPDATE | FALL; | 213 status = INIT | TEST | UPDATE | FALL; |
214 for(status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { | 214 for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { |
215 status &= ~FALL; | 215 status &= ~FALL; |
216 } | 216 } |
217 } | 217 } |
218 | 218 |
219 // Infinite loop. | 219 // Infinite loop. |
220 void loop24() { | 220 void loop24() { |
221 status = CONTINUE | FALL; | 221 status = CONTINUE | FALL; |
222 for(;;) { | 222 for (;;) { |
223 if ((status & CONTINUE) == CONTINUE) { | 223 if ((status & CONTINUE) == CONTINUE) { |
224 status &= ~CONTINUE; | 224 status &= ~CONTINUE; |
225 continue; | 225 continue; |
226 } | 226 } |
227 status &= ~FALL; | 227 status &= ~FALL; |
228 } | 228 } |
229 } | 229 } |
230 | 230 |
231 // Infinite loop. | 231 // Infinite loop. |
232 void loop25() { | 232 void loop25() { |
233 status = INIT | CONTINUE | FALL; | 233 status = INIT | CONTINUE | FALL; |
234 for(status &= ~INIT;;) { | 234 for (status &= ~INIT;;) { |
235 if ((status & CONTINUE) == CONTINUE) { | 235 if ((status & CONTINUE) == CONTINUE) { |
236 status &= ~CONTINUE; | 236 status &= ~CONTINUE; |
237 continue; | 237 continue; |
238 } | 238 } |
239 status &= ~FALL; | 239 status &= ~FALL; |
240 } | 240 } |
241 } | 241 } |
242 | 242 |
243 void loop26() { | 243 void loop26() { |
244 status = TEST | CONTINUE | FALL; | 244 status = TEST | CONTINUE | FALL; |
245 for(; (status &= ~TEST) != 0;) { | 245 for (; (status &= ~TEST) != 0;) { |
246 if ((status & CONTINUE) == CONTINUE) { | 246 if ((status & CONTINUE) == CONTINUE) { |
247 status &= ~CONTINUE; | 247 status &= ~CONTINUE; |
248 continue; | 248 continue; |
249 } | 249 } |
250 status &= ~FALL; | 250 status &= ~FALL; |
251 } | 251 } |
252 } | 252 } |
253 | 253 |
254 void loop27() { | 254 void loop27() { |
255 status = INIT | TEST | CONTINUE | FALL; | 255 status = INIT | TEST | CONTINUE | FALL; |
256 for(status &= ~INIT; (status &= ~TEST) != 0;) { | 256 for (status &= ~INIT; (status &= ~TEST) != 0;) { |
257 if ((status & CONTINUE) == CONTINUE) { | 257 if ((status & CONTINUE) == CONTINUE) { |
258 status &= ~CONTINUE; | 258 status &= ~CONTINUE; |
259 continue; | 259 continue; |
260 } | 260 } |
261 status &= ~FALL; | 261 status &= ~FALL; |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
265 // Infinite loop. | 265 // Infinite loop. |
266 void loop28() { | 266 void loop28() { |
267 status = UPDATE | CONTINUE | FALL; | 267 status = UPDATE | CONTINUE | FALL; |
268 for(;; status &= ~UPDATE) { | 268 for (;; status &= ~UPDATE) { |
269 if ((status & CONTINUE) == CONTINUE) { | 269 if ((status & CONTINUE) == CONTINUE) { |
270 status &= ~CONTINUE; | 270 status &= ~CONTINUE; |
271 continue; | 271 continue; |
272 } | 272 } |
273 status &= ~FALL; | 273 status &= ~FALL; |
274 } | 274 } |
275 } | 275 } |
276 | 276 |
277 // Infinite loop. | 277 // Infinite loop. |
278 void loop29() { | 278 void loop29() { |
279 status = INIT | UPDATE | CONTINUE | FALL; | 279 status = INIT | UPDATE | CONTINUE | FALL; |
280 for(status &= ~INIT;; status &= ~UPDATE) { | 280 for (status &= ~INIT;; status &= ~UPDATE) { |
281 if ((status & CONTINUE) == CONTINUE) { | 281 if ((status & CONTINUE) == CONTINUE) { |
282 status &= ~CONTINUE; | 282 status &= ~CONTINUE; |
283 continue; | 283 continue; |
284 } | 284 } |
285 status &= ~FALL; | 285 status &= ~FALL; |
286 } | 286 } |
287 } | 287 } |
288 | 288 |
289 void loop30() { | 289 void loop30() { |
290 status = TEST | UPDATE | CONTINUE | FALL; | 290 status = TEST | UPDATE | CONTINUE | FALL; |
291 for(; (status &= ~TEST) != 0; status &= ~UPDATE) { | 291 for (; (status &= ~TEST) != 0; status &= ~UPDATE) { |
292 if ((status & CONTINUE) == CONTINUE) { | 292 if ((status & CONTINUE) == CONTINUE) { |
293 status &= ~CONTINUE; | 293 status &= ~CONTINUE; |
294 continue; | 294 continue; |
295 } | 295 } |
296 status &= ~FALL; | 296 status &= ~FALL; |
297 } | 297 } |
298 } | 298 } |
299 | 299 |
300 void loop31() { | 300 void loop31() { |
301 status = INIT | TEST | UPDATE | CONTINUE | FALL; | 301 status = INIT | TEST | UPDATE | CONTINUE | FALL; |
302 for(status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { | 302 for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { |
303 if ((status & CONTINUE) == CONTINUE) { | 303 if ((status & CONTINUE) == CONTINUE) { |
304 status &= ~CONTINUE; | 304 status &= ~CONTINUE; |
305 continue; | 305 continue; |
306 } | 306 } |
307 status &= ~FALL; | 307 status &= ~FALL; |
308 } | 308 } |
309 } | 309 } |
310 | 310 |
311 void loop32() { | 311 void loop32() { |
312 status = BREAK; | 312 status = BREAK; |
313 for(;;) { | 313 for (;;) { |
314 status &= ~BREAK; | 314 status &= ~BREAK; |
315 break; | 315 break; |
316 } | 316 } |
317 } | 317 } |
318 | 318 |
319 void loop33() { | 319 void loop33() { |
320 status = INIT | BREAK; | 320 status = INIT | BREAK; |
321 for(status &= ~INIT;;) { | 321 for (status &= ~INIT;;) { |
322 status &= ~BREAK; | 322 status &= ~BREAK; |
323 break; | 323 break; |
324 } | 324 } |
325 } | 325 } |
326 | 326 |
327 void loop34() { | 327 void loop34() { |
328 status = TEST | BREAK; | 328 status = TEST | BREAK; |
329 for(; (status &= ~TEST) != 0;) { | 329 for (; (status &= ~TEST) != 0;) { |
330 status &= ~BREAK; | 330 status &= ~BREAK; |
331 break; | 331 break; |
332 } | 332 } |
333 } | 333 } |
334 | 334 |
335 void loop35() { | 335 void loop35() { |
336 status = INIT | TEST | BREAK; | 336 status = INIT | TEST | BREAK; |
337 for(status &= ~INIT; (status &= ~TEST) != 0;) { | 337 for (status &= ~INIT; (status &= ~TEST) != 0;) { |
338 status &= ~BREAK; | 338 status &= ~BREAK; |
339 break; | 339 break; |
340 } | 340 } |
341 } | 341 } |
342 | 342 |
343 void loop36() { | 343 void loop36() { |
344 status = UPDATE | BREAK; | 344 status = UPDATE | BREAK; |
345 for(;; status &= ~UPDATE) { | 345 for (;; status &= ~UPDATE) { |
346 status &= ~BREAK; | 346 status &= ~BREAK; |
347 break; | 347 break; |
348 } | 348 } |
349 } | 349 } |
350 | 350 |
351 void loop37() { | 351 void loop37() { |
352 status = INIT | UPDATE | BREAK; | 352 status = INIT | UPDATE | BREAK; |
353 for(status &= ~INIT;; status &= ~UPDATE) { | 353 for (status &= ~INIT;; status &= ~UPDATE) { |
354 status &= ~BREAK; | 354 status &= ~BREAK; |
355 break; | 355 break; |
356 } | 356 } |
357 } | 357 } |
358 | 358 |
359 void loop38() { | 359 void loop38() { |
360 status = TEST | UPDATE | BREAK; | 360 status = TEST | UPDATE | BREAK; |
361 for(; (status &= ~TEST) != 0; status &= ~UPDATE) { | 361 for (; (status &= ~TEST) != 0; status &= ~UPDATE) { |
362 status &= ~BREAK; | 362 status &= ~BREAK; |
363 break; | 363 break; |
364 } | 364 } |
365 } | 365 } |
366 | 366 |
367 void loop39() { | 367 void loop39() { |
368 status = INIT | TEST | UPDATE | BREAK; | 368 status = INIT | TEST | UPDATE | BREAK; |
369 for(status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { | 369 for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { |
370 status &= ~BREAK; | 370 status &= ~BREAK; |
371 break; | 371 break; |
372 } | 372 } |
373 } | 373 } |
374 | 374 |
375 void loop40() { | 375 void loop40() { |
376 status = CONTINUE | BREAK; | 376 status = CONTINUE | BREAK; |
377 for(;;) { | 377 for (;;) { |
378 if ((status & CONTINUE) == CONTINUE) { | 378 if ((status & CONTINUE) == CONTINUE) { |
379 status &= ~CONTINUE; | 379 status &= ~CONTINUE; |
380 continue; | 380 continue; |
381 } | 381 } |
382 status &= ~BREAK; | 382 status &= ~BREAK; |
383 break; | 383 break; |
384 } | 384 } |
385 } | 385 } |
386 | 386 |
387 void loop41() { | 387 void loop41() { |
388 status = INIT | CONTINUE | BREAK; | 388 status = INIT | CONTINUE | BREAK; |
389 for(status &= ~INIT;;) { | 389 for (status &= ~INIT;;) { |
390 if ((status & CONTINUE) == CONTINUE) { | 390 if ((status & CONTINUE) == CONTINUE) { |
391 status &= ~CONTINUE; | 391 status &= ~CONTINUE; |
392 continue; | 392 continue; |
393 } | 393 } |
394 status &= ~BREAK; | 394 status &= ~BREAK; |
395 break; | 395 break; |
396 } | 396 } |
397 } | 397 } |
398 | 398 |
399 void loop42() { | 399 void loop42() { |
400 status = TEST | CONTINUE | BREAK; | 400 status = TEST | CONTINUE | BREAK; |
401 for(; (status &= ~TEST) != 0;) { | 401 for (; (status &= ~TEST) != 0;) { |
402 if ((status & CONTINUE) == CONTINUE) { | 402 if ((status & CONTINUE) == CONTINUE) { |
403 status &= ~CONTINUE; | 403 status &= ~CONTINUE; |
404 continue; | 404 continue; |
405 } | 405 } |
406 status &= ~BREAK; | 406 status &= ~BREAK; |
407 break; | 407 break; |
408 } | 408 } |
409 } | 409 } |
410 | 410 |
411 void loop43() { | 411 void loop43() { |
412 status = INIT | TEST | CONTINUE | BREAK; | 412 status = INIT | TEST | CONTINUE | BREAK; |
413 for(status &= ~INIT; (status &= ~TEST) != 0;) { | 413 for (status &= ~INIT; (status &= ~TEST) != 0;) { |
414 if ((status & CONTINUE) == CONTINUE) { | 414 if ((status & CONTINUE) == CONTINUE) { |
415 status &= ~CONTINUE; | 415 status &= ~CONTINUE; |
416 continue; | 416 continue; |
417 } | 417 } |
418 status &= ~BREAK; | 418 status &= ~BREAK; |
419 break; | 419 break; |
420 } | 420 } |
421 } | 421 } |
422 | 422 |
423 void loop44() { | 423 void loop44() { |
424 status = UPDATE | CONTINUE | BREAK; | 424 status = UPDATE | CONTINUE | BREAK; |
425 for(;; status &= ~UPDATE) { | 425 for (;; status &= ~UPDATE) { |
426 if ((status & CONTINUE) == CONTINUE) { | 426 if ((status & CONTINUE) == CONTINUE) { |
427 status &= ~CONTINUE; | 427 status &= ~CONTINUE; |
428 continue; | 428 continue; |
429 } | 429 } |
430 status &= ~BREAK; | 430 status &= ~BREAK; |
431 break; | 431 break; |
432 } | 432 } |
433 } | 433 } |
434 | 434 |
435 void loop45() { | 435 void loop45() { |
436 status = INIT | UPDATE | CONTINUE | BREAK; | 436 status = INIT | UPDATE | CONTINUE | BREAK; |
437 for(status &= ~INIT;; status &= ~UPDATE) { | 437 for (status &= ~INIT;; status &= ~UPDATE) { |
438 if ((status & CONTINUE) == CONTINUE) { | 438 if ((status & CONTINUE) == CONTINUE) { |
439 status &= ~CONTINUE; | 439 status &= ~CONTINUE; |
440 continue; | 440 continue; |
441 } | 441 } |
442 status &= ~BREAK; | 442 status &= ~BREAK; |
443 break; | 443 break; |
444 } | 444 } |
445 } | 445 } |
446 | 446 |
447 void loop46() { | 447 void loop46() { |
448 status = TEST | UPDATE | CONTINUE | BREAK; | 448 status = TEST | UPDATE | CONTINUE | BREAK; |
449 for(; (status &= ~TEST) != 0; status &= ~UPDATE) { | 449 for (; (status &= ~TEST) != 0; status &= ~UPDATE) { |
450 if ((status & CONTINUE) == CONTINUE) { | 450 if ((status & CONTINUE) == CONTINUE) { |
451 status &= ~CONTINUE; | 451 status &= ~CONTINUE; |
452 continue; | 452 continue; |
453 } | 453 } |
454 status &= ~BREAK; | 454 status &= ~BREAK; |
455 break; | 455 break; |
456 } | 456 } |
457 } | 457 } |
458 | 458 |
459 void loop47() { | 459 void loop47() { |
460 status = INIT | TEST | UPDATE | CONTINUE | BREAK; | 460 status = INIT | TEST | UPDATE | CONTINUE | BREAK; |
461 for(status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { | 461 for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { |
462 if ((status & CONTINUE) == CONTINUE) { | 462 if ((status & CONTINUE) == CONTINUE) { |
463 status &= ~CONTINUE; | 463 status &= ~CONTINUE; |
464 continue; | 464 continue; |
465 } | 465 } |
466 status &= ~BREAK; | 466 status &= ~BREAK; |
467 break; | 467 break; |
468 } | 468 } |
469 } | 469 } |
470 | 470 |
471 void loop48() { | 471 void loop48() { |
472 status = FALL | BREAK; | 472 status = FALL | BREAK; |
473 for(;;) { | 473 for (;;) { |
474 if ((status & FALL) == FALL) { | 474 if ((status & FALL) == FALL) { |
475 status &= ~FALL; | 475 status &= ~FALL; |
476 } else { | 476 } else { |
477 status &= ~BREAK; | 477 status &= ~BREAK; |
478 break; | 478 break; |
479 } | 479 } |
480 } | 480 } |
481 } | 481 } |
482 | 482 |
483 void loop49() { | 483 void loop49() { |
484 status = INIT | FALL | BREAK; | 484 status = INIT | FALL | BREAK; |
485 for(status &= ~INIT;;) { | 485 for (status &= ~INIT;;) { |
486 if ((status & FALL) == FALL) { | 486 if ((status & FALL) == FALL) { |
487 status &= ~FALL; | 487 status &= ~FALL; |
488 } else { | 488 } else { |
489 status &= ~BREAK; | 489 status &= ~BREAK; |
490 break; | 490 break; |
491 } | 491 } |
492 } | 492 } |
493 } | 493 } |
494 | 494 |
495 void loop50() { | 495 void loop50() { |
496 status = TEST | FALL | BREAK; | 496 status = TEST | FALL | BREAK; |
497 for(; (status &= ~TEST) != 0;) { | 497 for (; (status &= ~TEST) != 0;) { |
498 if ((status & FALL) == FALL) { | 498 if ((status & FALL) == FALL) { |
499 status &= ~FALL; | 499 status &= ~FALL; |
500 } else { | 500 } else { |
501 status &= ~BREAK; | 501 status &= ~BREAK; |
502 break; | 502 break; |
503 } | 503 } |
504 } | 504 } |
505 } | 505 } |
506 | 506 |
507 void loop51() { | 507 void loop51() { |
508 status = INIT | TEST | FALL | BREAK; | 508 status = INIT | TEST | FALL | BREAK; |
509 for(status &= ~INIT; (status &= ~TEST) != 0;) { | 509 for (status &= ~INIT; (status &= ~TEST) != 0;) { |
510 if ((status & FALL) == FALL) { | 510 if ((status & FALL) == FALL) { |
511 status &= ~FALL; | 511 status &= ~FALL; |
512 } else { | 512 } else { |
513 status &= ~BREAK; | 513 status &= ~BREAK; |
514 break; | 514 break; |
515 } | 515 } |
516 } | 516 } |
517 } | 517 } |
518 | 518 |
519 void loop52() { | 519 void loop52() { |
520 status = UPDATE | FALL | BREAK; | 520 status = UPDATE | FALL | BREAK; |
521 for(;; status &= ~UPDATE) { | 521 for (;; status &= ~UPDATE) { |
522 if ((status & FALL) == FALL) { | 522 if ((status & FALL) == FALL) { |
523 status &= ~FALL; | 523 status &= ~FALL; |
524 } else { | 524 } else { |
525 status &= ~BREAK; | 525 status &= ~BREAK; |
526 break; | 526 break; |
527 } | 527 } |
528 } | 528 } |
529 } | 529 } |
530 | 530 |
531 void loop53() { | 531 void loop53() { |
532 status = INIT | UPDATE | FALL | BREAK; | 532 status = INIT | UPDATE | FALL | BREAK; |
533 for(status &= ~INIT;; status &= ~UPDATE) { | 533 for (status &= ~INIT;; status &= ~UPDATE) { |
534 if ((status & FALL) == FALL) { | 534 if ((status & FALL) == FALL) { |
535 status &= ~FALL; | 535 status &= ~FALL; |
536 } else { | 536 } else { |
537 status &= ~BREAK; | 537 status &= ~BREAK; |
538 break; | 538 break; |
539 } | 539 } |
540 } | 540 } |
541 } | 541 } |
542 | 542 |
543 void loop54() { | 543 void loop54() { |
544 status = TEST | UPDATE | FALL | BREAK; | 544 status = TEST | UPDATE | FALL | BREAK; |
545 for(; (status &= ~TEST) != 0; status &= ~UPDATE) { | 545 for (; (status &= ~TEST) != 0; status &= ~UPDATE) { |
546 if ((status & FALL) == FALL) { | 546 if ((status & FALL) == FALL) { |
547 status &= ~FALL; | 547 status &= ~FALL; |
548 } else { | 548 } else { |
549 status &= ~BREAK; | 549 status &= ~BREAK; |
550 break; | 550 break; |
551 } | 551 } |
552 } | 552 } |
553 } | 553 } |
554 | 554 |
555 void loop55() { | 555 void loop55() { |
556 status = INIT | TEST | UPDATE | FALL | BREAK; | 556 status = INIT | TEST | UPDATE | FALL | BREAK; |
557 for(status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { | 557 for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { |
558 if ((status & FALL) == FALL) { | 558 if ((status & FALL) == FALL) { |
559 status &= ~FALL; | 559 status &= ~FALL; |
560 } else { | 560 } else { |
561 status &= ~BREAK; | 561 status &= ~BREAK; |
562 break; | 562 break; |
563 } | 563 } |
564 } | 564 } |
565 } | 565 } |
566 | 566 |
567 void loop56() { | 567 void loop56() { |
568 status = CONTINUE | FALL | BREAK; | 568 status = CONTINUE | FALL | BREAK; |
569 for(;;) { | 569 for (;;) { |
570 if ((status & CONTINUE) == CONTINUE) { | 570 if ((status & CONTINUE) == CONTINUE) { |
571 status &= ~CONTINUE; | 571 status &= ~CONTINUE; |
572 continue; | 572 continue; |
573 } | 573 } |
574 if ((status & FALL) == FALL) { | 574 if ((status & FALL) == FALL) { |
575 status &= ~FALL; | 575 status &= ~FALL; |
576 } else { | 576 } else { |
577 status &= ~BREAK; | 577 status &= ~BREAK; |
578 break; | 578 break; |
579 } | 579 } |
580 } | 580 } |
581 } | 581 } |
582 | 582 |
583 void loop57() { | 583 void loop57() { |
584 status = INIT | CONTINUE | FALL | BREAK; | 584 status = INIT | CONTINUE | FALL | BREAK; |
585 for(status &= ~INIT;;) { | 585 for (status &= ~INIT;;) { |
586 if ((status & CONTINUE) == CONTINUE) { | 586 if ((status & CONTINUE) == CONTINUE) { |
587 status &= ~CONTINUE; | 587 status &= ~CONTINUE; |
588 continue; | 588 continue; |
589 } | 589 } |
590 if ((status & FALL) == FALL) { | 590 if ((status & FALL) == FALL) { |
591 status &= ~FALL; | 591 status &= ~FALL; |
592 } else { | 592 } else { |
593 status &= ~BREAK; | 593 status &= ~BREAK; |
594 break; | 594 break; |
595 } | 595 } |
596 } | 596 } |
597 } | 597 } |
598 | 598 |
599 void loop58() { | 599 void loop58() { |
600 status = TEST | CONTINUE | FALL | BREAK; | 600 status = TEST | CONTINUE | FALL | BREAK; |
601 for(; (status &= ~TEST) != 0;) { | 601 for (; (status &= ~TEST) != 0;) { |
602 if ((status & CONTINUE) == CONTINUE) { | 602 if ((status & CONTINUE) == CONTINUE) { |
603 status &= ~CONTINUE; | 603 status &= ~CONTINUE; |
604 continue; | 604 continue; |
605 } | 605 } |
606 if ((status & FALL) == FALL) { | 606 if ((status & FALL) == FALL) { |
607 status &= ~FALL; | 607 status &= ~FALL; |
608 } else { | 608 } else { |
609 status &= ~BREAK; | 609 status &= ~BREAK; |
610 break; | 610 break; |
611 } | 611 } |
612 } | 612 } |
613 } | 613 } |
614 | 614 |
615 void loop59() { | 615 void loop59() { |
616 status = INIT | TEST | CONTINUE | FALL | BREAK; | 616 status = INIT | TEST | CONTINUE | FALL | BREAK; |
617 for(status &= ~INIT; (status &= ~TEST) != 0;) { | 617 for (status &= ~INIT; (status &= ~TEST) != 0;) { |
618 if ((status & CONTINUE) == CONTINUE) { | 618 if ((status & CONTINUE) == CONTINUE) { |
619 status &= ~CONTINUE; | 619 status &= ~CONTINUE; |
620 continue; | 620 continue; |
621 } | 621 } |
622 if ((status & FALL) == FALL) { | 622 if ((status & FALL) == FALL) { |
623 status &= ~FALL; | 623 status &= ~FALL; |
624 } else { | 624 } else { |
625 status &= ~BREAK; | 625 status &= ~BREAK; |
626 break; | 626 break; |
627 } | 627 } |
628 } | 628 } |
629 } | 629 } |
630 | 630 |
631 void loop60() { | 631 void loop60() { |
632 status = UPDATE | CONTINUE | FALL | BREAK; | 632 status = UPDATE | CONTINUE | FALL | BREAK; |
633 for(;; status &= ~UPDATE) { | 633 for (;; status &= ~UPDATE) { |
634 if ((status & CONTINUE) == CONTINUE) { | 634 if ((status & CONTINUE) == CONTINUE) { |
635 status &= ~CONTINUE; | 635 status &= ~CONTINUE; |
636 continue; | 636 continue; |
637 } | 637 } |
638 if ((status & FALL) == FALL) { | 638 if ((status & FALL) == FALL) { |
639 status &= ~FALL; | 639 status &= ~FALL; |
640 } else { | 640 } else { |
641 status &= ~BREAK; | 641 status &= ~BREAK; |
642 break; | 642 break; |
643 } | 643 } |
644 } | 644 } |
645 } | 645 } |
646 | 646 |
647 void loop61() { | 647 void loop61() { |
648 status = INIT | UPDATE | CONTINUE | FALL | BREAK; | 648 status = INIT | UPDATE | CONTINUE | FALL | BREAK; |
649 for(status &= ~INIT;; status &= ~UPDATE) { | 649 for (status &= ~INIT;; status &= ~UPDATE) { |
650 if ((status & CONTINUE) == CONTINUE) { | 650 if ((status & CONTINUE) == CONTINUE) { |
651 status &= ~CONTINUE; | 651 status &= ~CONTINUE; |
652 continue; | 652 continue; |
653 } | 653 } |
654 if ((status & FALL) == FALL) { | 654 if ((status & FALL) == FALL) { |
655 status &= ~FALL; | 655 status &= ~FALL; |
656 } else { | 656 } else { |
657 status &= ~BREAK; | 657 status &= ~BREAK; |
658 break; | 658 break; |
659 } | 659 } |
660 } | 660 } |
661 } | 661 } |
662 | 662 |
663 void loop62() { | 663 void loop62() { |
664 status = TEST | UPDATE | CONTINUE | FALL | BREAK; | 664 status = TEST | UPDATE | CONTINUE | FALL | BREAK; |
665 for(; (status &= ~TEST) != 0; status &= ~UPDATE) { | 665 for (; (status &= ~TEST) != 0; status &= ~UPDATE) { |
666 if ((status & CONTINUE) == CONTINUE) { | 666 if ((status & CONTINUE) == CONTINUE) { |
667 status &= ~CONTINUE; | 667 status &= ~CONTINUE; |
668 continue; | 668 continue; |
669 } | 669 } |
670 if ((status & FALL) == FALL) { | 670 if ((status & FALL) == FALL) { |
671 status &= ~FALL; | 671 status &= ~FALL; |
672 } else { | 672 } else { |
673 status &= ~BREAK; | 673 status &= ~BREAK; |
674 break; | 674 break; |
675 } | 675 } |
676 } | 676 } |
677 } | 677 } |
678 | 678 |
679 void loop63() { | 679 void loop63() { |
680 status = INIT | TEST | UPDATE | CONTINUE | FALL | BREAK; | 680 status = INIT | TEST | UPDATE | CONTINUE | FALL | BREAK; |
681 for(status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { | 681 for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { |
682 if ((status & CONTINUE) == CONTINUE) { | 682 if ((status & CONTINUE) == CONTINUE) { |
683 status &= ~CONTINUE; | 683 status &= ~CONTINUE; |
684 continue; | 684 continue; |
685 } | 685 } |
686 if ((status & FALL) == FALL) { | 686 if ((status & FALL) == FALL) { |
687 status &= ~FALL; | 687 status &= ~FALL; |
688 } else { | 688 } else { |
689 status &= ~BREAK; | 689 status &= ~BREAK; |
690 break; | 690 break; |
691 } | 691 } |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 Expect.equals(0, status); | 799 Expect.equals(0, status); |
800 loop60(); | 800 loop60(); |
801 Expect.equals(0, status); | 801 Expect.equals(0, status); |
802 loop61(); | 802 loop61(); |
803 Expect.equals(0, status); | 803 Expect.equals(0, status); |
804 loop62(); | 804 loop62(); |
805 Expect.equals(0, status); | 805 Expect.equals(0, status); |
806 loop63(); | 806 loop63(); |
807 Expect.equals(0, status); | 807 Expect.equals(0, status); |
808 } | 808 } |
OLD | NEW |