Skip to content

Commit

Permalink
Fix a broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
jbachorik committed Dec 26, 2021
1 parent cd650f9 commit 76e4396
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3140,7 +3140,7 @@ public void methodEntryArgsReturnTypeMatch() throws Exception {
loadTargetClass("OnMethodTest");
transform("onmethod/ArgsReturnTypeMatch");
checkTransformation(
"DUP2\nLSTORE 6\nALOAD 0\nLLOAD 6\nALOAD 1\nLLOAD 2\nALOAD 4\nALOAD 5\nINVOKESTATIC resources/OnMethodTest.$btrace$org$openjdk$btrace$runtime$auxiliary$ArgsReturnTypeMatch$args (Ljava/lang/Object;JLjava/lang/String;J[Ljava/lang/String;[I)V");
"DUP2\nLSTORE 6\nALOAD 0\nLLOAD 6\nALOAD 1\nLLOAD 2\nALOAD 4\nALOAD 5\nINVOKESTATIC resources/OnMethodTest.$btrace$org$openjdk$btrace$runtime$auxiliary$ArgsReturnTypeMatch$args (Ljava/lang/Object;JLjava/lang/String;J[Ljava/lang/String;[I)V");
}

@Test
Expand Down Expand Up @@ -4257,7 +4257,14 @@ public void methodEntryStaticArgsSelf() throws Exception {
loadTargetClass("OnMethodTest");
transform("onmethod/StaticArgsSelf");

checkTransformation("");
checkTransformation(
"ACONST_NULL\n"
+ "ALOAD 0\n"
+ "LLOAD 1\n"
+ "ALOAD 3\n"
+ "ALOAD 4\n"
+ "INVOKESTATIC resources/OnMethodTest.$btrace$org$openjdk$btrace$runtime$auxiliary$StaticArgsSelf$args (Ljava/lang/Object;Ljava/lang/String;J[Ljava/lang/String;[I)V\n"
+ "MAXSTACK = 6");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

package org.openjdk.btrace.instr;

import static org.junit.jupiter.api.Assertions.*;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
Expand Down Expand Up @@ -55,8 +57,6 @@
import org.openjdk.btrace.runtime.auxiliary.Auxiliary;
import sun.misc.Unsafe;

import static org.junit.jupiter.api.Assertions.*;

/** @author Jaroslav Bachorik */
public abstract class InstrumentorTestBase {
private static final boolean DEBUG = true;
Expand Down

0 comments on commit 76e4396

Please sign in to comment.