From 0d6fb38c0e32052fb2f3b6ff3d9738e749299a3a Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 9 Nov 2005 14:54:09 +0000 Subject: [PATCH] produce better diagnostics on failure. --- .../testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java index 258ff96dc..e65181303 100644 --- a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java +++ b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java @@ -347,6 +347,8 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase { fr = new BufferedReader(new FileReader(f)); String line = null; while ((line=fr.readLine())!=null) fileContents.add(line); + List originalFileContents = new ArrayList(); + originalFileContents.addAll(fileContents); // See if the messages match int msgCount = 0; @@ -356,8 +358,8 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase { if (debugTests) System.out.println("Looking at ["+msg+"]"); if (msg.getKind().equals(IMessage.WEAVEINFO)) { if (!fileContents.contains(msg.getMessage())) { - fail("Could not find message '"+msg.getMessage()+"' in the expected results\n"+ - stringify(fileContents)); + fail("Could not find message '"+msg.getMessage()+"' in the expected results. Expected results are:\n"+ + stringify(originalFileContents)); } else { fileContents.remove(msg.getMessage()); } -- 2.39.5