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

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

Issue 1235563003: Add interfaces for a new compiler API. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Rebased Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/docgen/lib/src/generator.dart ('k') | tests/compiler/dart2js/bad_loop_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/analyze_helper.dart
diff --git a/tests/compiler/dart2js/analyze_helper.dart b/tests/compiler/dart2js/analyze_helper.dart
index b901595cccf5bda555b13a903db8262a0a7554c1..7636eb2d8dcc2ec52c2d8320d2eb10fed6c9a12a 100644
--- a/tests/compiler/dart2js/analyze_helper.dart
+++ b/tests/compiler/dart2js/analyze_helper.dart
@@ -95,8 +95,9 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
return false;
}
- void diagnosticHandler(Uri uri, int begin, int end, String message,
- api.Diagnostic kind) {
+ @override
+ void report(Uri uri, int begin, int end, String message,
+ api.Diagnostic kind) {
if (kind == api.Diagnostic.WARNING) {
if (checkWhiteList(uri, message)) {
// Suppress whitelisted warnings.
@@ -125,7 +126,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
return;
}
lastWasWhitelisted = false;
- super.diagnosticHandler(uri, begin, end, message, kind);
+ super.report(uri, begin, end, message, kind);
}
}
@@ -158,10 +159,11 @@ Future analyze(List<Uri> uriList,
'--show-package-warnings'];
if (analyzeAll) options.add('--analyze-all');
var compiler = new Compiler(
- provider.readStringFromUri,
+ provider,
null,
- handler.diagnosticHandler,
- libraryRoot, packageRoot,
+ handler,
+ libraryRoot,
+ packageRoot,
options,
{});
String MESSAGE = """
« no previous file with comments | « pkg/docgen/lib/src/generator.dart ('k') | tests/compiler/dart2js/bad_loop_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698