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

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.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/resolver/NegativeResolverTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
index 39819b452198f054184ad6c74ca40ec2d245dc19..0ee106ea4ea9c6f6eed5707ce5e4e7bd26480226 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
@@ -6,6 +6,8 @@ package com.google.dart.compiler.resolver;
import com.google.dart.compiler.CompilerTestCase;
import com.google.dart.compiler.DartCompilationError;
+import com.google.dart.compiler.ErrorSeverity;
+import com.google.dart.compiler.SubSystem;
import com.google.dart.compiler.ast.DartUnit;
import com.google.dart.compiler.testing.TestCompilerContext;
@@ -172,13 +174,13 @@ public class NegativeResolverTest extends CompilerTestCase {
private TestCompilerContext getContext() {
return new TestCompilerContext() {
@Override
- public void compilationError(DartCompilationError event) {
- errors.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);
+ }
+ if (event.getErrorCode().getErrorSeverity() == ErrorSeverity.ERROR) {
+ errors.add(event);
+ }
}
};
}

Powered by Google App Engine
This is Rietveld 408576698