| 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 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 } | 907 } |
| 908 """, | 908 """, |
| 909 main: """ | 909 main: """ |
| 910 main () { | 910 main () { |
| 911 new A(); // ensure A and B are instantiated | 911 new A(); // ensure A and B are instantiated |
| 912 new B(); | 912 new B(); |
| 913 } | 913 } |
| 914 """, | 914 """, |
| 915 runCompiler: true, analyzeOnly: true); | 915 runCompiler: true, analyzeOnly: true); |
| 916 World world = compiler.world; | 916 World world = compiler.world; |
| 917 world.populate(); | |
| 918 | 917 |
| 919 ClassElement cls = ensure(compiler, "A", compiler.coreLibrary.find, | 918 ClassElement cls = ensure(compiler, "A", compiler.coreLibrary.find, |
| 920 expectIsPatched: true); | 919 expectIsPatched: true); |
| 921 cls.ensureResolved(compiler.resolution); | 920 cls.ensureResolved(compiler.resolution); |
| 922 | 921 |
| 923 ensure(compiler, "method", cls.patch.lookupLocalMember, | 922 ensure(compiler, "method", cls.patch.lookupLocalMember, |
| 924 checkHasBody: true, expectIsRegular: true); | 923 checkHasBody: true, expectIsRegular: true); |
| 925 | 924 |
| 926 ensure(compiler, "clear", cls.lookupLocalMember, | 925 ensure(compiler, "clear", cls.lookupLocalMember, |
| 927 checkHasBody: true, expectIsPatched: true); | 926 checkHasBody: true, expectIsPatched: true); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 await testPatchNonFunction(); | 1079 await testPatchNonFunction(); |
| 1081 | 1080 |
| 1082 await testPatchAndSelector(); | 1081 await testPatchAndSelector(); |
| 1083 | 1082 |
| 1084 await testEffectiveTarget(); | 1083 await testEffectiveTarget(); |
| 1085 | 1084 |
| 1086 await testAnalyzeAllInjectedMembers(); | 1085 await testAnalyzeAllInjectedMembers(); |
| 1087 await testTypecheckPatchedMembers(); | 1086 await testTypecheckPatchedMembers(); |
| 1088 }); | 1087 }); |
| 1089 } | 1088 } |
| OLD | NEW |