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

Unified Diff: dart/tests/compiler/dart2js/analyze_helper.dart

Issue 99303004: Remove unused API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: dart/tests/compiler/dart2js/analyze_helper.dart
diff --git a/dart/tests/compiler/dart2js/analyze_helper.dart b/dart/tests/compiler/dart2js/analyze_helper.dart
index adb0673afa254d7ccc951970d778eaf65726f86c..2c2c02d85e1981640dbe4785abfb78207282dd6e 100644
--- a/dart/tests/compiler/dart2js/analyze_helper.dart
+++ b/dart/tests/compiler/dart2js/analyze_helper.dart
@@ -123,20 +123,29 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
}
}
-Future analyze(List<Uri> uriList, Map<String, List<String>> whiteList) {
+Future analyze(List<Uri> uriList,
+ Map<String, List<String>> whiteList,
+ {bool analyzeAll: true}) {
var libraryRoot = currentDirectory.resolve('sdk/');
var provider = new CompilerSourceFileProvider();
var handler = new CollectingDiagnosticHandler(whiteList, provider);
+ var options = <String>['--analyze-only', '--categories=Client,Server'];
+ if (analyzeAll) options.add('--analyze-all');
var compiler = new Compiler(
provider.readStringFromUri,
null,
handler.diagnosticHandler,
libraryRoot, libraryRoot,
- <String>['--analyze-only', '--analyze-all',
- '--categories=Client,Server'],
+ options,
{});
- compiler.librariesToAnalyzeWhenRun = uriList;
- return compiler.run(null).then((_) {
- handler.checkResults();
- });
+ if (analyzeAll) {
+ compiler.librariesToAnalyzeWhenRun = uriList;
+ return compiler.run(null).then((_) {
+ handler.checkResults();
+ });
+ } else {
+ return compiler.run(uriList.single).then((_) {
+ handler.checkResults();
+ });
+ }
}

Powered by Google App Engine
This is Rietveld 408576698