| 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 2be9940d8367a018d1068d425aae755946f1faab..a3198399b629848f70d3fc351387d6bfd0e06c7d 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
|
| @@ -85,19 +85,15 @@ public abstract class CompilerTestCase extends TestCase {
|
| * Collects the results of running analyzeLibrary.
|
| */
|
| protected static class AnalyzeLibraryResult extends DartCompilerListener.Empty {
|
| - private final List<DartCompilationError> compilationErrors;
|
| - private final List<DartCompilationError> compilationWarnings;
|
| - private final List<DartCompilationError> typeErrors;
|
| + private final List<DartCompilationError> errors = Lists.newArrayList();
|
| + private final List<DartCompilationError> compilationErrors = Lists.newArrayList();
|
| + private final List<DartCompilationError> compilationWarnings = Lists.newArrayList();
|
| + private final List<DartCompilationError> typeErrors = Lists.newArrayList();
|
| private LibraryUnit result;
|
|
|
| - public AnalyzeLibraryResult() {
|
| - compilationErrors = Lists.newArrayList();
|
| - compilationWarnings = Lists.newArrayList();
|
| - typeErrors = Lists.newArrayList();
|
| - }
|
| -
|
| @Override
|
| public void onError(DartCompilationError event) {
|
| + errors.add(event);
|
| if (event.getErrorCode().getSubSystem() == SubSystem.STATIC_TYPE) {
|
| typeErrors.add(event);
|
| } else if (event.getErrorCode().getErrorSeverity() == ErrorSeverity.ERROR) {
|
| @@ -107,6 +103,10 @@ public abstract class CompilerTestCase extends TestCase {
|
| }
|
| }
|
|
|
| + public List<DartCompilationError> getErrors() {
|
| + return errors;
|
| + }
|
| +
|
| public List<DartCompilationError> getTypeErrors() {
|
| return typeErrors;
|
| }
|
|
|