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 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 } | 913 } |
914 """, | 914 """, |
915 main: """ | 915 main: """ |
916 main () { | 916 main () { |
917 new A(); // ensure A and B are instantiated | 917 new A(); // ensure A and B are instantiated |
918 new B(); | 918 new B(); |
919 } | 919 } |
920 """, | 920 """, |
921 runCompiler: true, | 921 runCompiler: true, |
922 analyzeOnly: true); | 922 analyzeOnly: true); |
923 ClosedWorld world = compiler.openWorld.populate(); | 923 ClosedWorld world = compiler.openWorld.closeWorld(); |
924 | 924 |
925 ClassElement cls = ensure( | 925 ClassElement cls = ensure( |
926 compiler, "A", compiler.commonElements.coreLibrary.find, | 926 compiler, "A", compiler.commonElements.coreLibrary.find, |
927 expectIsPatched: true); | 927 expectIsPatched: true); |
928 cls.ensureResolved(compiler.resolution); | 928 cls.ensureResolved(compiler.resolution); |
929 | 929 |
930 ensure(compiler, "method", cls.patch.lookupLocalMember, | 930 ensure(compiler, "method", cls.patch.lookupLocalMember, |
931 checkHasBody: true, expectIsRegular: true); | 931 checkHasBody: true, expectIsRegular: true); |
932 | 932 |
933 ensure(compiler, "clear", cls.lookupLocalMember, | 933 ensure(compiler, "clear", cls.lookupLocalMember, |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 await testPatchNonFunction(); | 1116 await testPatchNonFunction(); |
1117 | 1117 |
1118 await testPatchAndSelector(); | 1118 await testPatchAndSelector(); |
1119 | 1119 |
1120 await testEffectiveTarget(); | 1120 await testEffectiveTarget(); |
1121 | 1121 |
1122 await testAnalyzeAllInjectedMembers(); | 1122 await testAnalyzeAllInjectedMembers(); |
1123 await testTypecheckPatchedMembers(); | 1123 await testTypecheckPatchedMembers(); |
1124 }); | 1124 }); |
1125 } | 1125 } |
OLD | NEW |