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

Unified Diff: compiler/javatests/com/google/dart/compiler/parser/DartParserRunner.java

Issue 8395013: DartC User Warning Framework (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use new ErrorCode enums in single onError() method. Created 9 years, 2 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
Index: compiler/javatests/com/google/dart/compiler/parser/DartParserRunner.java
diff --git a/compiler/javatests/com/google/dart/compiler/parser/DartParserRunner.java b/compiler/javatests/com/google/dart/compiler/parser/DartParserRunner.java
index e3687df48fae444e9bc9f4fe1e14cf5e306b39d6..cb39a640ba005900e920cf60d4da293ab155bc8b 100644
--- a/compiler/javatests/com/google/dart/compiler/parser/DartParserRunner.java
+++ b/compiler/javatests/com/google/dart/compiler/parser/DartParserRunner.java
@@ -7,6 +7,7 @@ package com.google.dart.compiler.parser;
import com.google.dart.compiler.DartCompilationError;
import com.google.dart.compiler.DartCompilerListener;
import com.google.dart.compiler.DartSourceTest;
+import com.google.dart.compiler.ErrorSeverity;
import com.google.dart.compiler.ast.DartUnit;
import junit.framework.TestCase;
@@ -138,15 +139,11 @@ public class DartParserRunner extends DartCompilerListener implements Runnable {
}
@Override
- public void compilationError(DartCompilationError event) {
- errors.add(event);
- }
-
- @Override
- public void compilationWarning(DartCompilationError event) {
- if (wantWarnings) {
- errors.add(event);
+ public void onError(DartCompilationError event) {
+ if (event.getErrorCode().getErrorSeverity() == ErrorSeverity.WARNING && !wantWarnings) {
+ return;
}
+ errors.add(event);
}
public int getErrorCount() {
@@ -182,11 +179,6 @@ public class DartParserRunner extends DartCompilerListener implements Runnable {
return this;
}
- @Override
- public void typeError(DartCompilationError event) {
- errors.add(event);
- }
-
private void doWork() throws InterruptedException {
parserWorker.start();
parserWorker.join(timeoutInMillis);

Powered by Google App Engine
This is Rietveld 408576698