summaryrefslogtreecommitdiffstats
path: root/testing/newsrc/org/aspectj
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-03-09 11:17:15 +0000
committeracolyer <acolyer>2005-03-09 11:17:15 +0000
commitcf0ed05d72754b5f620982552ab514acb66677e8 (patch)
treecc756cfd824602532331d305e8e544194b7ca4ae /testing/newsrc/org/aspectj
parent89ef2959b73dad42d0640d91964005cbf654b247 (diff)
downloadaspectj-cf0ed05d72754b5f620982552ab514acb66677e8.tar.gz
aspectj-cf0ed05d72754b5f620982552ab514acb66677e8.zip
output line numbers in stdout/err comparisons from test harness
Diffstat (limited to 'testing/newsrc/org/aspectj')
-rw-r--r--testing/newsrc/org/aspectj/testing/OutputSpec.java4
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());
}
}