Update test files
This commit is contained in:
parent
1a7383278d
commit
8d9575cc57
@ -13,17 +13,17 @@ public class MergeInject extends MergeTest implements Runnable {
|
||||
public int number;
|
||||
|
||||
// Dummy field
|
||||
String s;
|
||||
@Inject
|
||||
private String s;
|
||||
|
||||
|
||||
/*
|
||||
@Inject
|
||||
MergeInject() {
|
||||
Directives.callSuper();
|
||||
s = "Hello";
|
||||
number = 10;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@Inject(value = BEFORE, target = "stackTest()I")
|
||||
public int beforeStackTest() {
|
||||
@ -33,12 +33,16 @@ public class MergeInject extends MergeTest implements Runnable {
|
||||
return 69420;
|
||||
}
|
||||
|
||||
this.number = ThreadLocalRandom.current().nextInt();
|
||||
|
||||
System.out.println(number);
|
||||
|
||||
Directives.callOriginal();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@Inject(value = AFTER, target = "stackTest()I", acceptOriginalReturn = true)
|
||||
@Inject(value = AFTER, acceptOriginalReturn = true)
|
||||
public int stackTest(int arg) {
|
||||
Runnable r = () -> {
|
||||
System.out.println(arg / 15);
|
||||
@ -49,7 +53,7 @@ public class MergeInject extends MergeTest implements Runnable {
|
||||
}
|
||||
|
||||
|
||||
@Inject(value = AFTER, target = "test()Ljava/lang/String;", acceptOriginalReturn = true)
|
||||
@Inject(value = AFTER, acceptOriginalReturn = true)
|
||||
public String test(String retVal){
|
||||
|
||||
System.out.println(retVal + "Cringe");
|
||||
@ -57,23 +61,6 @@ public class MergeInject extends MergeTest implements Runnable {
|
||||
return "Modified";
|
||||
}
|
||||
|
||||
/*
|
||||
@Inject(value = AFTER, target = "test()Ljava/lang/String;", acceptOriginalReturn = true)
|
||||
public String test_inject$1(String retVal) {
|
||||
System.out.println("Another injection: "+retVal);
|
||||
return retVal;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@Inject
|
||||
@ -83,6 +70,4 @@ public class MergeInject extends MergeTest implements Runnable {
|
||||
System.out.println(test()+'\n');
|
||||
}
|
||||
}
|
||||
|
||||
public String test1(){ return null; }
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import dev.w1zzrd.asm.Combine;
|
||||
|
||||
public class MergeTest {
|
||||
|
||||
String s;
|
||||
private final String s;
|
||||
|
||||
|
||||
public MergeTest(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user