]> source.dussan.org Git - javassist.git/commitdiff
fixes a minor bug in a test case.
authorchibash <chiba@javassist.org>
Tue, 8 May 2018 00:24:19 +0000 (09:24 +0900)
committerchibash <chiba@javassist.org>
Tue, 8 May 2018 00:24:19 +0000 (09:24 +0900)
build.xml
javassist.jar
src/test/javassist/JvstTest.java
src/test/resources/empty.jar [changed mode: 0755->0644]

index 5273c49494ed01b5877ac905d1bd84a283185802..4300d7ac9e6a1d73c073a7375fc07d5664648365 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -16,6 +16,7 @@
   <property name="build.dir" value="${basedir}/target"/>
   <property name="build.classes.dir" value="${build.dir}/classes"/>
   <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.run.dir" value="${build.dir}/runtest"/>
   <property name="test.reports.dir" value = "${build.dir}/test-output"/>
@@ -39,6 +40,7 @@
 
   <path id="test.classpath">
     <pathelement location="${test.build.dir}"/>
+    <pathelement location="${test.lib.dir}"/>
     <pathelement location="${lib.dir}/junit.jar"/>
     <pathelement location="${lib.dir}/hamcrest.jar"/>
     <pathelement location="${build.classes.dir}"/>
   </target>
 
   <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}">
       <jvmarg value="-XX:-FailOverToOldVerifier"/>
       <classpath refid="test.classpath"/>
       <formatter type="xml" extension=".xml"/>
       <test name="javassist.JvstTest" outfile="TestLog" />
     </junit>
+    <move file="${test.lib.dir}/emptyorig.jar"
+          tofile="${test.lib.dir}/empty.jar" />
   </target>
 
   <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}">
       <jvmarg line="--add-opens java.base/java.lang=ALL-UNNAMED" />
       <jvmarg value="-XX:-FailOverToOldVerifier"/>
       <formatter type="xml" extension=".xml"/>
       <test name="javassist.JvstTest" outfile="TestLog" />
     </junit>
+    <move file="${test.lib.dir}/emptyorig.jar"
+          tofile="${test.lib.dir}/empty.jar" />
   </target>
 
   <target name="sample" depends="compile">
index 232bb340746efd217029ecaea41a59dbf0f82f19..e009d8e6ccb8f8b6dad81b8b101538c59a2b9610 100644 (file)
Binary files a/javassist.jar and b/javassist.jar differ
index ff58106a17a6ef1926cc20b47a08333623f98e87..e2f9211fb5ff9e39f96db3e68114260d096d52a0 100644 (file)
@@ -79,7 +79,7 @@ public class JvstTest extends JvstTestRoot {
 
         // 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.
-        // 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());
     }
 
old mode 100755 (executable)
new mode 100644 (file)