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

Side by Side Diff: tests/compiler/dart2js/mock_compiler.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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library mock_compiler; 5 library mock_compiler;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:compiler/compiler_new.dart' as api; 10 import 'package:compiler/compiler_new.dart' as api;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 /// Expected number of errors. If `null`, the number of errors is not checked. 61 /// Expected number of errors. If `null`, the number of errors is not checked.
62 final int expectedErrors; 62 final int expectedErrors;
63 final Map<String, SourceFile> sourceFiles; 63 final Map<String, SourceFile> sourceFiles;
64 Node parsedTree; 64 Node parsedTree;
65 final LibrarySourceProvider librariesOverride; 65 final LibrarySourceProvider librariesOverride;
66 final DiagnosticCollector diagnosticCollector = new DiagnosticCollector(); 66 final DiagnosticCollector diagnosticCollector = new DiagnosticCollector();
67 final ResolvedUriTranslator resolvedUriTranslator = 67 final ResolvedUriTranslator resolvedUriTranslator =
68 new MockResolvedUriTranslator(); 68 new MockResolvedUriTranslator();
69 final Measurer measurer = new Measurer(); 69 final Measurer measurer = new Measurer();
70 LibraryElement mainApp;
70 71
71 MockCompiler.internal( 72 MockCompiler.internal(
72 {Map<String, String> coreSource, 73 {Map<String, String> coreSource,
73 bool enableTypeAssertions: false, 74 bool enableTypeAssertions: false,
74 bool enableUserAssertions: false, 75 bool enableUserAssertions: false,
75 bool enableMinification: false, 76 bool enableMinification: false,
76 bool disableTypeInference: false, 77 bool disableTypeInference: false,
77 bool analyzeAll: false, 78 bool analyzeAll: false,
78 bool analyzeOnly: false, 79 bool analyzeOnly: false,
79 bool preserveComments: false, 80 bool preserveComments: false,
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 trustTypeAnnotations: trustTypeAnnotations, 395 trustTypeAnnotations: trustTypeAnnotations,
395 enableTypeAssertions: enableTypeAssertions, 396 enableTypeAssertions: enableTypeAssertions,
396 enableUserAssertions: enableUserAssertions, 397 enableUserAssertions: enableUserAssertions,
397 expectedErrors: expectedErrors, 398 expectedErrors: expectedErrors,
398 expectedWarnings: expectedWarnings, 399 expectedWarnings: expectedWarnings,
399 outputProvider: outputProvider); 400 outputProvider: outputProvider);
400 compiler.registerSource(uri, code); 401 compiler.registerSource(uri, code);
401 compiler.diagnosticHandler = createHandler(compiler, code); 402 compiler.diagnosticHandler = createHandler(compiler, code);
402 return compiler; 403 return compiler;
403 } 404 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/mirrors_used_test.dart ('k') | tests/compiler/dart2js/no_such_method_enabled_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698