| 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 9550465c7a2033038946be1ea16a6e51c1090b5e..a1426a146e7816b3da3cba13bdae8b352863df31 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/CompilerTestCase.java
|
| @@ -326,13 +326,15 @@ public abstract class CompilerTestCase extends TestCase {
|
| */
|
| protected static void assertErrors(List<DartCompilationError> errors,
|
| ErrorExpectation... expectedErrors) {
|
| + StringBuffer errorMessage = new StringBuffer();
|
| // count of errors
|
| if (errors.size() != expectedErrors.length) {
|
| - fail(String.format(
|
| + String out = String.format(
|
| "Expected %s errors, but got %s: %s",
|
| expectedErrors.length,
|
| errors.size(),
|
| - errors));
|
| + errors);
|
| + errorMessage.append(out + "\n");
|
| }
|
| // content of errors
|
| for (int i = 0; i < expectedErrors.length; i++) {
|
| @@ -342,7 +344,7 @@ public abstract class CompilerTestCase extends TestCase {
|
| || actualError.getLineNumber() != expectedError.line
|
| || actualError.getColumnNumber() != expectedError.column
|
| || actualError.getLength() != expectedError.length) {
|
| - fail(String.format(
|
| + String out = String.format(
|
| "Expected %s:%d:%d/%d, but got %s:%d:%d/%d",
|
| expectedError.errorCode,
|
| expectedError.line,
|
| @@ -351,9 +353,14 @@ public abstract class CompilerTestCase extends TestCase {
|
| actualError.getErrorCode(),
|
| actualError.getLineNumber(),
|
| actualError.getColumnNumber(),
|
| - actualError.getLength()));
|
| + actualError.getLength());
|
| + errorMessage.append(out + "\n");
|
| }
|
| }
|
| + if (errorMessage.length() > 0) {
|
| + System.err.println(errorMessage);
|
| + fail(errorMessage.toString());
|
| + }
|
| }
|
|
|
| /**
|
|
|