Tests rewritten to new version, just the Writer version 2.0 does not yet implement Appendable
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project name="Build Script" default="test" basedir=".">
7 <target name="build" depends="-libraries">
8 <antcall target="-build-one">
9 <param name="version" value="api1.0"/>
11 <antcall target="-build-one">
12 <param name="version" value="api2.0"/>
15 <antcall target="-build-one">
16 <param name="version" value="test1.0"/>
17 <param name="cp" value="build/api1.0/classes:${junit.jar}"/>
20 <antcall target="-build-one">
21 <param name="version" value="test2.0"/>
22 <param name="cp" value="build/api2.0/classes:${junit.jar}"/>
26 <target name="test" depends="build">
27 <echo level="info" message="Running the Old Implementation against Version 1.0 of the API. This should succeed."/>
28 <antcall target="-run-one">
29 <param name="version" value="api1.0"/>
31 <echo level="info" message="Running the Old Implementation against Version 2.0 of the API. This should succeed."/>
32 <antcall target="-run-one">
33 <param name="version" value="api2.0"/>
35 <echo level="info" message="Running the New Implementation against Version 2.0 of the API. This should succeed."/>
36 <antcall target="-run-two">
37 <param name="version" value="api2.0"/>
41 <!-- support methods -->
43 <target name="-libraries">
46 <property name="junit.jar" location="../libs/dist/junit-4.4.jar"/>
49 <target name="-run-one">
50 <fail message="You need to specify API version number" unless="version"/>
51 <mkdir dir="build/testresults"/>
52 <junit dir="build/test1.0/classes" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
53 <batchtest todir="build/testresults">
54 <fileset dir="build/test1.0/classes">
55 <filename name="**/*Test.class"/>
59 <path location="build/${version}/classes"/>
60 <path location="build/test1.0/classes"/>
61 <path location="${junit.jar}"/>
63 <formatter type="brief" usefile="false"/>
64 <formatter type="xml"/>
68 <target name="-run-two">
69 <fail message="You need to specify API version number" unless="version"/>
70 <mkdir dir="build/testresults"/>
71 <junit dir="build/test2.0/classes" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
72 <batchtest todir="build/testresults">
73 <fileset dir="build/test2.0/classes">
74 <filename name="**/*Test.class"/>
78 <path location="build/${version}/classes"/>
79 <path location="build/test2.0/classes"/>
80 <path location="${junit.jar}"/>
82 <formatter type="brief" usefile="false"/>
83 <formatter type="xml"/>
87 <target name="-build-one">
88 <fail message="You need to specify version number" unless="version"/>
90 <mkdir dir="build/${version}/classes"/>
91 <property name="cp" value=""/>
93 srcdir="src-${version}"
94 destdir="build/${version}/classes"
95 source="1.5" target="1.5"