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

Unified Diff: compiler/javatests/com/google/dart/compiler/CompilerTestCase.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/CompilerTestCase.java
diff --git a/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java b/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
index 0ab0e5b79c2cce2d6d325b309f5212ffdf28bf61..7fd05b80f5bdaf5cde5d15fb4a9fe2079e0bd6f5 100644
--- a/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
+++ b/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
@@ -88,18 +88,14 @@ public abstract class CompilerTestCase extends TestCase {
}
@Override
- public void compilationError(DartCompilationError event) {
- compilationErrors.add(event);
- }
-
- @Override
- public void compilationWarning(DartCompilationError event) {
- compilationWarnings.add(event);
- }
-
- @Override
- public void typeError(DartCompilationError event) {
- typeErrors.add(event);
+ public void onError(DartCompilationError event) {
+ if (event.getErrorCode().getSubSystem() == SubSystem.STATIC_TYPE) {
+ typeErrors.add(event);
+ } else if (event.getErrorCode().getErrorSeverity() == ErrorSeverity.ERROR) {
+ compilationErrors.add(event);
+ } else if (event.getErrorCode().getErrorSeverity() == ErrorSeverity.WARNING) {
+ compilationWarnings.add(event);
+ }
}
/**

Powered by Google App Engine
This is Rietveld 408576698