| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // Tests that lhs of a compound assignement is executed only once. | 4 // Tests that lhs of a compound assignment is executed only once. |
| 5 // VMOptions=--optimization-counter-threshold=10 --no-background-compilation | 5 // VMOptions=--optimization-counter-threshold=10 --no-background-compilation |
| 6 | 6 |
| 7 import "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
| 8 | 8 |
| 9 class Indexed { | 9 class Indexed { |
| 10 Indexed() | 10 Indexed() |
| 11 : _f = new List(10), | 11 : _f = new List(10), |
| 12 count = 0 { | 12 count = 0 { |
| 13 _f[0] = 100; | 13 _f[0] = 100; |
| 14 _f[1] = 200; | 14 _f[1] = 200; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 testIndexed(); | 114 testIndexed(); |
| 115 testIndexedMore(); | 115 testIndexedMore(); |
| 116 testIndexedMoreMore(); | 116 testIndexedMoreMore(); |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 } | 119 } |
| 120 | 120 |
| 121 main() { | 121 main() { |
| 122 CompoundAssignmentOperatorTest.testMain(); | 122 CompoundAssignmentOperatorTest.testMain(); |
| 123 } | 123 } |
| OLD | NEW |