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 | 4 |
5 // Test for the evaluation order of getters and setters. | 5 // Test for the evaluation order of getters and setters. |
6 | 6 |
7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
8 | 8 |
9 var trace; | 9 var trace; |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 trace = []; | 92 trace = []; |
93 x.b.c = x.d[42] *= '$x'.hashCode; | 93 x.b.c = x.d[42] *= '$x'.hashCode; |
94 Expect.listEquals( | 94 Expect.listEquals( |
95 ['get b', 'get d', 'index', 'toString', 'indexSet', 'set c'], trace); | 95 ['get b', 'get d', 'index', 'toString', 'indexSet', 'set c'], trace); |
96 | 96 |
97 trace = []; | 97 trace = []; |
98 x.b.c = ++x.d.c; | 98 x.b.c = ++x.d.c; |
99 Expect.listEquals(['get b', 'get d', 'get c', 'set c', 'set c'], trace); | 99 Expect.listEquals(['get b', 'get d', 'get c', 'set c', 'set c'], trace); |
100 } | 100 } |
OLD | NEW |