瀏覽代碼

fixes a minor bug in a test case.

tags/rel_3_23_0_ga
chibash 6 年之前
父節點
當前提交
040a9cfc26
共有 4 個檔案被更改,包括 13 行新增1 行删除
  1. 12
    0
      build.xml
  2. 二進制
      javassist.jar
  3. 1
    1
      src/test/javassist/JvstTest.java
  4. 0
    0
      src/test/resources/empty.jar

+ 12
- 0
build.xml 查看文件

<property name="build.dir" value="${basedir}/target"/> <property name="build.dir" value="${basedir}/target"/>
<property name="build.classes.dir" value="${build.dir}/classes"/> <property name="build.classes.dir" value="${build.dir}/classes"/>
<property name="test.src.dir" value="${basedir}/src/test"/> <property name="test.src.dir" value="${basedir}/src/test"/>
<property name="test.lib.dir" value="${test.src.dir}/resources"/>
<property name="test.build.dir" value="${build.dir}/test-classes"/> <property name="test.build.dir" value="${build.dir}/test-classes"/>
<property name="test.run.dir" value="${build.dir}/runtest"/> <property name="test.run.dir" value="${build.dir}/runtest"/>
<property name="test.reports.dir" value = "${build.dir}/test-output"/> <property name="test.reports.dir" value = "${build.dir}/test-output"/>


<path id="test.classpath"> <path id="test.classpath">
<pathelement location="${test.build.dir}"/> <pathelement location="${test.build.dir}"/>
<pathelement location="${test.lib.dir}"/>
<pathelement location="${lib.dir}/junit.jar"/> <pathelement location="${lib.dir}/junit.jar"/>
<pathelement location="${lib.dir}/hamcrest.jar"/> <pathelement location="${lib.dir}/hamcrest.jar"/>
<pathelement location="${build.classes.dir}"/> <pathelement location="${build.classes.dir}"/>
</target> </target>


<target name="runtest" depends="jar,test-compile"> <target name="runtest" depends="jar,test-compile">
<copy file="${test.lib.dir}/empty.jar"
tofile="${test.lib.dir}/emptyorig.jar"
preservelastmodified="true" />
<junit fork="true" printsummary="true" dir="${test.run.dir}"> <junit fork="true" printsummary="true" dir="${test.run.dir}">
<jvmarg value="-XX:-FailOverToOldVerifier"/> <jvmarg value="-XX:-FailOverToOldVerifier"/>
<classpath refid="test.classpath"/> <classpath refid="test.classpath"/>
<formatter type="xml" extension=".xml"/> <formatter type="xml" extension=".xml"/>
<test name="javassist.JvstTest" outfile="TestLog" /> <test name="javassist.JvstTest" outfile="TestLog" />
</junit> </junit>
<move file="${test.lib.dir}/emptyorig.jar"
tofile="${test.lib.dir}/empty.jar" />
</target> </target>


<target name="runtest9" depends="jar,test-compile"> <target name="runtest9" depends="jar,test-compile">
<copy file="${test.lib.dir}/empty.jar"
tofile="${test.lib.dir}/emptyorig.jar"
preservelastmodified="true" />
<junit fork="true" printsummary="true" dir="${test.run.dir}"> <junit fork="true" printsummary="true" dir="${test.run.dir}">
<jvmarg line="--add-opens java.base/java.lang=ALL-UNNAMED" /> <jvmarg line="--add-opens java.base/java.lang=ALL-UNNAMED" />
<jvmarg value="-XX:-FailOverToOldVerifier"/> <jvmarg value="-XX:-FailOverToOldVerifier"/>
<formatter type="xml" extension=".xml"/> <formatter type="xml" extension=".xml"/>
<test name="javassist.JvstTest" outfile="TestLog" /> <test name="javassist.JvstTest" outfile="TestLog" />
</junit> </junit>
<move file="${test.lib.dir}/emptyorig.jar"
tofile="${test.lib.dir}/empty.jar" />
</target> </target>


<target name="sample" depends="compile"> <target name="sample" depends="compile">

二進制
javassist.jar 查看文件


+ 1
- 1
src/test/javassist/JvstTest.java 查看文件



// Assert that it is possible to delete the jar file. // Assert that it is possible to delete the jar file.
// On Windows deleting an open file will fail, while on on Mac/Linux this is always possible. // On Windows deleting an open file will fail, while on on Mac/Linux this is always possible.
// This check will thus only fail on Windos if the file is still open.
// This check will thus only fail on Windows if the file is still open.
assertTrue(jarFile.delete()); assertTrue(jarFile.delete());
} }



+ 0
- 0
src/test/resources/empty.jar 查看文件


Loading…
取消
儲存