Skip to content

Commit

Permalink
Merge pull request #2036 from MarcMil/fix-asm-tests
Browse files Browse the repository at this point in the history
Fixing asm tests for newer java versions
  • Loading branch information
StevenArzt authored Dec 22, 2023
2 parents 59ea1d9 + 4c82499 commit 58042b3
Show file tree
Hide file tree
Showing 38 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/test/java/soot/asm/backend/AbstractASMBackendTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void runTestAndCompareOutput() throws IOException {
* @return The location of the process-dir folder
*/
protected String getTargetFolder() {
File f = new File("./target/test-classes");
File f = new File("./test-classes-asm");
return f.getAbsolutePath();
}

Expand All @@ -173,7 +173,7 @@ protected String getTargetFolder() {
* @return The location of the folder containing the test files
*/
protected String getClassPathFolder() {
File f = new File("./target/test-classes");
File f = new File("./test-classes-asm");
return f.getAbsolutePath();
}

Expand Down
5 changes: 3 additions & 2 deletions src/test/java/soot/asm/backend/InstanceOfCastsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ protected void generate(TraceClassVisitor cw) {
mv.visitVarInsn(ALOAD, 1);
mv.visitTypeInsn(CHECKCAST, "[Lsoot/asm/backend/targets/Measurable;");
// the eclipse compiler and javac >= version 1.9 produce different bytecode @see https://github.com/soot-oss/soot/pull/1155
if (targetCompiler != TargetCompiler.eclipse && targetCompiler != TargetCompiler.javac9)
mv.visitTypeInsn(CHECKCAST, "[Lsoot/asm/backend/targets/Measurable;");
//if (targetCompiler != TargetCompiler.eclipse && targetCompiler != TargetCompiler.javac9)
// mv.visitTypeInsn(CHECKCAST, "[Lsoot/asm/backend/targets/Measurable;");
// Not applicable now, since we use fixed classes in test-classes-asm, which were compiled by Java 1.8
mv.visitInsn(ARETURN);
mv.visitLabel(l0);
mv.visitInsn(ACONST_NULL);
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added test-classes-asm/soot/asm/backend/targets/Bean.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added test-classes-asm/soot/asm/backend/targets/Dups.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 58042b3

Please sign in to comment.