diff options
Diffstat (limited to 'testing/newsrc/org/aspectj')
-rw-r--r-- | testing/newsrc/org/aspectj/testing/OutputSpec.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testing/newsrc/org/aspectj/testing/OutputSpec.java b/testing/newsrc/org/aspectj/testing/OutputSpec.java index abeae90d2..be869bfbb 100644 --- a/testing/newsrc/org/aspectj/testing/OutputSpec.java +++ b/testing/newsrc/org/aspectj/testing/OutputSpec.java @@ -27,11 +27,13 @@ public class OutputSpec { public void matchAgainst(String output) { boolean matches = false; + int lineNo = 0; StringTokenizer strTok = new StringTokenizer(output,"\n"); if (strTok.countTokens() == expectedOutputLines.size()) { matches = true; for (Iterator iter = expectedOutputLines.iterator(); iter.hasNext();) { String line = (String) iter.next(); + lineNo++; String outputLine = strTok.nextToken().trim(); if (!line.equals(outputLine)) { matches = false; @@ -50,6 +52,8 @@ public class OutputSpec { failMessage.append("But found output:\n"); failMessage.append(output); failMessage.append("\n"); + failMessage.append("First difference is on line " + lineNo); + failMessage.append("\n"); AjcTestCase.fail(failMessage.toString()); } } |