| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 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 | 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 import "package:expect/expect.dart"; | |
| 6 | |
| 7 // Testing InvocationMirror.invokeOn method; test of issue 7227. | 5 // Testing InvocationMirror.invokeOn method; test of issue 7227. |
| 8 | 6 |
| 9 var reachedSetX = 0; | 7 var reachedSetX = 0; |
| 10 var reachedGetX = 0; | 8 var reachedGetX = 0; |
| 11 var reachedM = 0; | 9 var reachedM = 0; |
| 12 | 10 |
| 13 class A { | 11 class A { |
| 14 | 12 |
| 15 set x(val) { | 13 set x(val) { |
| 16 reachedSetX = val; | 14 reachedSetX = val; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 30 | 28 |
| 31 main () { | 29 main () { |
| 32 var b = new B(); | 30 var b = new B(); |
| 33 b.x = 10; | 31 b.x = 10; |
| 34 Expect.equals(10, reachedSetX); | 32 Expect.equals(10, reachedSetX); |
| 35 b.x; | 33 b.x; |
| 36 Expect.equals(1, reachedGetX); | 34 Expect.equals(1, reachedGetX); |
| 37 b.m(); | 35 b.m(); |
| 38 Expect.equals(1, reachedM); | 36 Expect.equals(1, reachedM); |
| 39 } | 37 } |
| OLD | NEW |