ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r371555 - in /ant/core/trunk/src: etc/testcases/taskdefs/optional/antlr/antlr.xml testcases/org/apache/tools/ant/taskdefs/optional/ANTLRTest.java
Date Mon, 23 Jan 2006 15:31:54 GMT
Author: mbenson
Date: Mon Jan 23 07:31:38 2006
New Revision: 371555

URL: http://svn.apache.org/viewcvs?rev=371555&view=rev
Log:
fix ANTLRTest in Gump (extra output files created by version 2.7.6 invalidate
assertions made in JUnit.  Made assertions more explicit and moved into the
test buildfile.

Modified:
    ant/core/trunk/src/etc/testcases/taskdefs/optional/antlr/antlr.xml
    ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/ANTLRTest.java

Modified: ant/core/trunk/src/etc/testcases/taskdefs/optional/antlr/antlr.xml
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/etc/testcases/taskdefs/optional/antlr/antlr.xml?rev=371555&r1=371554&r2=371555&view=diff
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/optional/antlr/antlr.xml (original)
+++ ant/core/trunk/src/etc/testcases/taskdefs/optional/antlr/antlr.xml Mon Jan 23 07:31:38
2006
@@ -19,6 +19,21 @@
 
   <target name="test3" depends="setup">
     <antlr target="antlr.g" outputdirectory="${tmp.dir}"/>
+    <fail>
+      <condition>
+        <!-- to prove each of these files exists;
+             ANTLR >= 2.7.6 leaves behind new (.smap) files as well. -->
+        <resourcecount when="ne" count="5">
+          <fileset dir="${tmp.dir}">
+            <include name="CalcParserTokenTypes.txt" />
+            <include name="CalcParserTokenTypes.java" />
+            <include name="CalcLexer.java" />
+            <include name="CalcParser.java" />
+            <include name="CalcTreeWalker.java" />
+          </fileset>
+        </resourcecount>
+      </condition>
+    </fail>
   </target>
 
   <target name="test4" depends="setup">

Modified: ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/ANTLRTest.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/ANTLRTest.java?rev=371555&r1=371554&r2=371555&view=diff
==============================================================================
--- ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/ANTLRTest.java (original)
+++ ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/ANTLRTest.java Mon
Jan 23 07:31:38 2006
@@ -57,9 +57,6 @@
 
     public void test3() {
         executeTarget("test3");
-        File outputDirectory = new File(System.getProperty("root"), TASKDEFS_DIR + "antlr.tmp");
-        String[] calcFiles = outputDirectory.list(new CalcFileFilter());
-        assertEquals(5, calcFiles.length);
     }
 
     public void test4() {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message