Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 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. | |
| 4 | |
| 5 var sum = 0; | |
| 6 var foo = 0; | |
| 7 var bar = 1; | |
| 8 | |
| 9 test() { | |
| 10 while (true) { | |
| 11 if (0 === foo) { | |
| 12 sum += 2; | |
| 13 if (1 === bar) { | |
| 14 sum += 3; | |
| 15 break; | |
| 16 } | |
| 17 break; | |
| 18 } | |
| 19 } | |
| 20 } | |
| 21 | |
| 22 main() { | |
| 23 test(); | |
| 24 Expect.equals(5, sum); | |
| 25 } | |
| OLD | NEW |