Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: tests/compiler/dart2js/patch_test.dart

Issue 2936233003: Remove Compiler.mainApp and Compiler.mainFunction (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/compiler/dart2js/parser_helper.dart ('k') | tests/compiler/dart2js/related_types.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 } 908 }
909 """, 909 """,
910 main: """ 910 main: """
911 main () { 911 main () {
912 new A(); // ensure A and B are instantiated 912 new A(); // ensure A and B are instantiated
913 new B(); 913 new B();
914 } 914 }
915 """, 915 """,
916 runCompiler: true, 916 runCompiler: true,
917 analyzeOnly: true); 917 analyzeOnly: true);
918 compiler.closeResolution(); 918 compiler.closeResolution(
919 compiler.frontendStrategy.elementEnvironment.mainFunction);
919 ClosedWorld world = compiler.resolutionWorldBuilder.closedWorldForTesting; 920 ClosedWorld world = compiler.resolutionWorldBuilder.closedWorldForTesting;
920 921
921 ClassElement cls = ensure( 922 ClassElement cls = ensure(
922 compiler, "A", compiler.resolution.commonElements.coreLibrary.find, 923 compiler, "A", compiler.resolution.commonElements.coreLibrary.find,
923 expectIsPatched: true); 924 expectIsPatched: true);
924 cls.ensureResolved(compiler.resolution); 925 cls.ensureResolved(compiler.resolution);
925 926
926 ensure(compiler, "method", cls.patch.lookupLocalMember, 927 ensure(compiler, "method", cls.patch.lookupLocalMember,
927 checkHasBody: true, expectIsRegular: true); 928 checkHasBody: true, expectIsRegular: true);
928 929
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 await testPatchNonFunction(); 1115 await testPatchNonFunction();
1115 1116
1116 await testPatchAndSelector(); 1117 await testPatchAndSelector();
1117 1118
1118 await testEffectiveTarget(); 1119 await testEffectiveTarget();
1119 1120
1120 await testAnalyzeAllInjectedMembers(); 1121 await testAnalyzeAllInjectedMembers();
1121 await testTypecheckPatchedMembers(); 1122 await testTypecheckPatchedMembers();
1122 }); 1123 });
1123 } 1124 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/parser_helper.dart ('k') | tests/compiler/dart2js/related_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698