ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r698979 - /ant/core/trunk/src/tests/antunit/taskdefs/optional/junit/junit-test.xml
Date Thu, 25 Sep 2008 14:15:48 GMT
Author: bodewig
Date: Thu Sep 25 07:15:48 2008
New Revision: 698979

URL: http://svn.apache.org/viewvc?rev=698979&view=rev
Log:
Passing tests for PR 40457

Modified:
    ant/core/trunk/src/tests/antunit/taskdefs/optional/junit/junit-test.xml

Modified: ant/core/trunk/src/tests/antunit/taskdefs/optional/junit/junit-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/optional/junit/junit-test.xml?rev=698979&r1=698978&r2=698979&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/optional/junit/junit-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/optional/junit/junit-test.xml Thu Sep 25 07:15:48
2008
@@ -69,4 +69,64 @@
     <au:assertLogDoesntContain text="CTest"/>
     <au:assertLogDoesntContain text="DTest"/>
   </target>
+
+  <target name="testFailurePropertyOnTestCase">
+    <mkdir dir="${input}"/>
+    <mkdir dir="${output}"/>
+    <echo file="${input}/ATest.java"><![CDATA[
+package test;
+import junit.framework.TestCase;
+
+public class ATest extends TestCase {
+    public void testFail() {
+        assertTrue(false);
+    }
+}
+]]>  </echo>
+    <javac srcdir="${input}" destdir="${output}">
+      <classpath refid="junit"/>
+    </javac>
+    <junit failureProperty="testcase.failed" haltonfailure="false">
+      <classpath refid="junit"/>
+      <classpath location="${output}"/>
+      <batchtest>
+        <fileset dir="${output}">
+          <include name="**/*Test.class" />
+        </fileset>
+      </batchtest>
+    </junit>
+    <au:assertPropertySet name="testcase.failed"/>
+  </target>
+
+  <target name="testFailurePropertyOnTestSuite">
+    <mkdir dir="${input}"/>
+    <mkdir dir="${output}"/>
+    <echo file="${input}/ATest.java"><![CDATA[
+package test;
+import junit.framework.Assert;
+import junit.framework.TestSuite;
+
+public class ATest extends TestSuite {
+    public ATest() {
+        super(test.ATest.class);
+    }
+    public void testFail() {
+        Assert.assertTrue(false);
+    }
+}
+]]>  </echo>
+    <javac srcdir="${input}" destdir="${output}">
+      <classpath refid="junit"/>
+    </javac>
+    <junit failureProperty="testsuite.failed" haltonfailure="false">
+      <classpath refid="junit"/>
+      <classpath location="${output}"/>
+      <batchtest>
+        <fileset dir="${output}">
+          <include name="**/*Test.class" />
+        </fileset>
+      </batchtest>
+    </junit>
+    <au:assertPropertySet name="testsuite.failed"/>
+  </target>
 </project>



Mime
View raw message