Update tests for method weaving

This commit is contained in:
Gabriel Tofvesson 2020-04-19 16:13:28 +02:00
parent c2aa3202ba
commit 5c43d02357
2 changed files with 17 additions and 3 deletions

View File

@ -17,8 +17,22 @@ public class MergeInject extends MergeTest implements Runnable {
number = 10; number = 10;
} }
@Inject(REPLACE) @Inject(value = AFTER, target = "test()Ljava/lang/String;", acceptOriginalReturn = true)
public String test(){ public String test(String retVal){
System.out.println("Got retval: "+retVal);
if (retVal.equals("Test")) {
System.out.println("Test");
}
retVal = "ASDF";
String a = "retVal";
System.out.println(a);
a = "Test";
System.out.println(a);
System.out.println(s); System.out.println(s);
if(s.endsWith("e!!")) { if(s.endsWith("e!!")) {

View File

@ -12,7 +12,7 @@ public class MergeTest {
} }
public String test(){ public String test(){
return s; return s + "Test";
} }
public String test1(){ public String test1(){