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); |
+ } |
} |
}; |
} |