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 assignement is executed only once. |
5 | 5 |
6 | 6 |
7 class Indexed { | 7 class Indexed { |
8 Indexed() : _f = new List(10), count = 0 { | 8 Indexed() : _f = new List(10), count = 0 { |
9 _f[0] = 100; | 9 _f[0] = 100; |
10 _f[1] = 200; | 10 _f[1] = 200; |
(...skipping 27 matching lines...) Expand all Loading... |
38 Expect.equals(1, i); | 38 Expect.equals(1, i); |
39 } | 39 } |
40 | 40 |
41 static void testMain() { | 41 static void testMain() { |
42 testIndexed(); | 42 testIndexed(); |
43 } | 43 } |
44 } | 44 } |
45 main() { | 45 main() { |
46 CompoundAssignmentOperatorTest.testMain(); | 46 CompoundAssignmentOperatorTest.testMain(); |
47 } | 47 } |
OLD | NEW |