| 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 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'package:expect/expect.dart'; | 6 import 'package:expect/expect.dart'; |
| 7 import 'package:async_helper/async_helper.dart'; | 7 import 'package:async_helper/async_helper.dart'; |
| 8 import 'package:compiler/src/compiler.dart'; | 8 import 'package:compiler/src/compiler.dart'; |
| 9 import 'package:compiler/src/diagnostics/messages.dart' show | 9 import 'package:compiler/src/diagnostics/messages.dart' show |
| 10 MessageKind; | 10 MessageKind; |
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 @patch void clear() {} | 937 @patch void clear() {} |
| 938 } | 938 } |
| 939 """, | 939 """, |
| 940 main: """ | 940 main: """ |
| 941 main () { | 941 main () { |
| 942 new A(); // ensure A and B are instantiated | 942 new A(); // ensure A and B are instantiated |
| 943 new B(); | 943 new B(); |
| 944 } | 944 } |
| 945 """, | 945 """, |
| 946 runCompiler: true, analyzeOnly: true); | 946 runCompiler: true, analyzeOnly: true); |
| 947 ClosedWorld world = compiler.openWorld.populate(); | 947 ClosedWorld world = compiler.openWorld.closeWorld(); |
| 948 | 948 |
| 949 ClassElement cls = ensure(compiler, "A", | 949 ClassElement cls = ensure(compiler, "A", |
| 950 compiler.commonElements.coreLibrary.find, expectIsPatched: true); | 950 compiler.commonElements.coreLibrary.find, expectIsPatched: true); |
| 951 cls.ensureResolved(compiler.resolution); | 951 cls.ensureResolved(compiler.resolution); |
| 952 | 952 |
| 953 ensure(compiler, "method", cls.patch.lookupLocalMember, | 953 ensure(compiler, "method", cls.patch.lookupLocalMember, |
| 954 checkHasBody: true, expectIsRegular: true); | 954 checkHasBody: true, expectIsRegular: true); |
| 955 | 955 |
| 956 ensure(compiler, "clear", cls.lookupLocalMember, | 956 ensure(compiler, "clear", cls.lookupLocalMember, |
| 957 checkHasBody: true, expectIsPatched: true); | 957 checkHasBody: true, expectIsPatched: true); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 await testPatchNonFunction(); | 1137 await testPatchNonFunction(); |
| 1138 | 1138 |
| 1139 await testPatchAndSelector(); | 1139 await testPatchAndSelector(); |
| 1140 | 1140 |
| 1141 await testEffectiveTarget(); | 1141 await testEffectiveTarget(); |
| 1142 | 1142 |
| 1143 await testAnalyzeAllInjectedMembers(); | 1143 await testAnalyzeAllInjectedMembers(); |
| 1144 await testTypecheckPatchedMembers(); | 1144 await testTypecheckPatchedMembers(); |
| 1145 }); | 1145 }); |
| 1146 } | 1146 } |
| OLD | NEW |