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 MessageKind; | 9 import 'package:compiler/src/diagnostics/messages.dart' show MessageKind; |
10 import 'package:compiler/src/elements/elements.dart'; | 10 import 'package:compiler/src/elements/elements.dart'; |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 } | 966 } |
967 """, | 967 """, |
968 main: """ | 968 main: """ |
969 main () { | 969 main () { |
970 new A(); // ensure A and B are instantiated | 970 new A(); // ensure A and B are instantiated |
971 new B(); | 971 new B(); |
972 } | 972 } |
973 """, | 973 """, |
974 runCompiler: true, | 974 runCompiler: true, |
975 analyzeOnly: true); | 975 analyzeOnly: true); |
976 ClosedWorld world = compiler.openWorld.closeWorld(compiler.reporter); | 976 compiler.closeResolution(); |
| 977 ClosedWorld world = compiler.closedWorld; |
977 | 978 |
978 ClassElement cls = ensure( | 979 ClassElement cls = ensure( |
979 compiler, "A", compiler.commonElements.coreLibrary.find, | 980 compiler, "A", compiler.commonElements.coreLibrary.find, |
980 expectIsPatched: true); | 981 expectIsPatched: true); |
981 cls.ensureResolved(compiler.resolution); | 982 cls.ensureResolved(compiler.resolution); |
982 | 983 |
983 ensure(compiler, "method", cls.patch.lookupLocalMember, | 984 ensure(compiler, "method", cls.patch.lookupLocalMember, |
984 checkHasBody: true, expectIsRegular: true); | 985 checkHasBody: true, expectIsRegular: true); |
985 | 986 |
986 ensure(compiler, "clear", cls.lookupLocalMember, | 987 ensure(compiler, "clear", cls.lookupLocalMember, |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 await testPatchNonFunction(); | 1173 await testPatchNonFunction(); |
1173 | 1174 |
1174 await testPatchAndSelector(); | 1175 await testPatchAndSelector(); |
1175 | 1176 |
1176 await testEffectiveTarget(); | 1177 await testEffectiveTarget(); |
1177 | 1178 |
1178 await testAnalyzeAllInjectedMembers(); | 1179 await testAnalyzeAllInjectedMembers(); |
1179 await testTypecheckPatchedMembers(); | 1180 await testTypecheckPatchedMembers(); |
1180 }); | 1181 }); |
1181 } | 1182 } |
OLD | NEW |