@@ -0,0 +1,25 @@ | |||
aspect Tester { | |||
before(): call(* Foo.*(..)) { | |||
System.out.println(thisEnclosingJoinPointStaticPart); | |||
} | |||
public static void main(String[] args) { | |||
new Foo().run(); | |||
} | |||
} | |||
class Foo { | |||
int i = 5; | |||
public void run() { | |||
bar("abc"); | |||
} | |||
public void bar(String s) { | |||
System.out.println("hello"); | |||
i = 4; | |||
} | |||
} | |||
class MyException extends Exception { | |||
} |
@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase; | |||
*/ | |||
public class Ajc1611Tests extends org.aspectj.testing.XMLBasedAjcTestCase { | |||
public void testESJP_336471() { | |||
runTest("esjp"); | |||
} | |||
public void testITIT_336136() { | |||
runTest("itit"); | |||
} |
@@ -2,6 +2,17 @@ | |||
<suite> | |||
<ajc-test dir="bugs1611/pr336471" title="esjp"> | |||
<compile files="Tester.aj" options="-1.5 -Xset:targetRuntime1_6_10=true"/> | |||
<run class="Tester"> | |||
<stdout> | |||
<line text="execution(void Tester.main(String[]))"/> | |||
<line text="execution(void Foo.run())"/> | |||
<line text="hello"/> | |||
</stdout> | |||
</run> | |||
</ajc-test> | |||
<ajc-test dir="bugs1611/pr336136" title="itit"> | |||
<compile files="Country_Roo_Op4j.java"> | |||
<message kind="error" text="The import com.foo cannot be resolved" line="1"/> |