mirror of
https://github.com/fangyidong/json-simple.git
synced 2025-12-09 00:28:49 +03:00
add test target
This commit is contained in:
25
build.xml
25
build.xml
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
<target name="mkdir">
|
<target name="mkdir">
|
||||||
<mkdir dir="build/main"/>
|
<mkdir dir="build/main"/>
|
||||||
|
<mkdir dir="build/test"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="compile" depends="mkdir">
|
<target name="compile" depends="mkdir">
|
||||||
@@ -24,6 +25,30 @@
|
|||||||
source="1.2"/>
|
source="1.2"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="compile-test" depends="compile">
|
||||||
|
<javac srcdir="test"
|
||||||
|
destdir="build/test"
|
||||||
|
includes="**/*.java"
|
||||||
|
target="1.2"
|
||||||
|
source="1.2">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="build/main"/>
|
||||||
|
</classpath>
|
||||||
|
</javac>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="test" depends="compile-test">
|
||||||
|
<junit haltonfailure="yes" printsummary="yes">
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="build/main"/>
|
||||||
|
<pathelement location="build/test"/>
|
||||||
|
</classpath>
|
||||||
|
<batchtest>
|
||||||
|
<fileset dir="test" includes="**/*Test.java,**/Test.java"/>
|
||||||
|
</batchtest>
|
||||||
|
</junit>
|
||||||
|
</target>
|
||||||
|
|
||||||
<target name="jar" depends="compile">
|
<target name="jar" depends="compile">
|
||||||
<jar destfile="lib/${jar-name}"
|
<jar destfile="lib/${jar-name}"
|
||||||
basedir="build/main"
|
basedir="build/main"
|
||||||
|
|||||||
Reference in New Issue
Block a user