| 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(); |
| 917 | 918 |
| 918 ClassElement cls = ensure(compiler, "A", compiler.coreLibrary.find, | 919 ClassElement cls = ensure(compiler, "A", compiler.coreLibrary.find, |
| 919 expectIsPatched: true); | 920 expectIsPatched: true); |
| 920 cls.ensureResolved(compiler.resolution); | 921 cls.ensureResolved(compiler.resolution); |
| 921 | 922 |
| 922 ensure(compiler, "method", cls.patch.lookupLocalMember, | 923 ensure(compiler, "method", cls.patch.lookupLocalMember, |
| 923 checkHasBody: true, expectIsRegular: true); | 924 checkHasBody: true, expectIsRegular: true); |
| 924 | 925 |
| 925 ensure(compiler, "clear", cls.lookupLocalMember, | 926 ensure(compiler, "clear", cls.lookupLocalMember, |
| 926 checkHasBody: true, expectIsPatched: true); | 927 checkHasBody: true, expectIsPatched: true); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 await testPatchNonFunction(); | 1080 await testPatchNonFunction(); |
| 1080 | 1081 |
| 1081 await testPatchAndSelector(); | 1082 await testPatchAndSelector(); |
| 1082 | 1083 |
| 1083 await testEffectiveTarget(); | 1084 await testEffectiveTarget(); |
| 1084 | 1085 |
| 1085 await testAnalyzeAllInjectedMembers(); | 1086 await testAnalyzeAllInjectedMembers(); |
| 1086 await testTypecheckPatchedMembers(); | 1087 await testTypecheckPatchedMembers(); |
| 1087 }); | 1088 }); |
| 1088 } | 1089 } |
| OLD | NEW |