]> source.dussan.org Git - aspectj.git/commitdiff
produce better diagnostics on failure.
authoraclement <aclement>
Wed, 9 Nov 2005 14:54:09 +0000 (14:54 +0000)
committeraclement <aclement>
Wed, 9 Nov 2005 14:54:09 +0000 (14:54 +0000)
ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java

index 258ff96dc056fce13f2d3d036ef2a56be2b28a41..e651813034726d6ec603e1fc1c0d1da15a454c51 100644 (file)
@@ -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());
                                        }