<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#copied {background-color:#ccccff;}
tr.alt #copied {background-color:#bbbbf7;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="5">Commit in <b><tt>metaas/trunk/src/test/java/uk/co/badgersinfoil/metaas</tt></b></td></tr>
<tr><td><tt><a href="#file1">CodeMirror.java</a></tt> </td><td></td><td align="right" id="added">+12</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">497 -> 498</td></tr>
</table>
<pre class="comment">
Checks to show up synthesised ASTs which don't match the ASTs built by the parser for the same code.
This actually causes a load of unit tests to fail now.
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">metaas/trunk/src/test/java/uk/co/badgersinfoil/metaas</span><br />
<div class="fileheader"><big><b>CodeMirror.java</b></big> <small id="info">497 -> 498</small></div>
<pre class="diff"><small id="info">--- trunk/src/test/java/uk/co/badgersinfoil/metaas/CodeMirror.java        2007-07-30 23:22:22 UTC (rev 497)
+++ trunk/src/test/java/uk/co/badgersinfoil/metaas/CodeMirror.java        2007-07-30 23:36:11 UTC (rev 498)
@@ -3,7 +3,6 @@
</small></pre><pre class="diff" id="context"> import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.ASCompilationUnit;
import uk.co.badgersinfoil.metaas.impl.ASTASCompilationUnit;
import uk.co.badgersinfoil.metaas.impl.ASTIterator;
</pre><pre class="diff"><small id="info">@@ -29,6 +28,7 @@
</small></pre><pre class="diff" id="context">                 writer.write(out, unit);
                try {
                        ASCompilationUnit unit2 = fact.newParser().parse(new StringReader(out.toString()));
</pre><pre class="diff" id="added">+                        assertASTMatch(ast, ((ASTASCompilationUnit)unit2).getAST());
</pre><pre class="diff" id="context">                         StringWriter out2 = new StringWriter();
                        writer.write(out2, unit2);
                        Assert.assertEquals(out.toString(), out2.toString());
</pre><pre class="diff"><small id="info">@@ -39,6 +39,17 @@
</small></pre><pre class="diff" id="context">                 }
        }
</pre><pre class="diff" id="added">+        private static void assertASTMatch(LinkedListTree ast1, LinkedListTree ast2) {
+                Assert.assertEquals(ast1.getType(), ast2.getType());
+                Assert.assertEquals(ast1.getText(), ast2.getText());
+                Assert.assertEquals("Child count mismatch at node "+ast1+": "+ast1.toStringTree()+" vs. "+ast2.toStringTree(),
+                 ast1.getChildCount(), ast2.getChildCount());
+                for (int i=0; i<ast1.getChildCount(); i++) {
+                        assertASTMatch((LinkedListTree)ast1.getChild(i),
+                         (LinkedListTree)ast2.getChild(i));
+                }
+        }
+
</pre><pre class="diff" id="context">         /**
         * Search through the stream for tokens who's 'prev' property doesn't
         * match the token who's 'last' property we just dereferenced in
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.12</small></center>
</body></html>