@@ -0,0 +1,5 @@ | |||
class A { | |||
private | |||
int foo; | |||
int goo; | |||
} |
@@ -0,0 +1,14 @@ | |||
privileged aspect Test { | |||
before(): get(* foo) {} | |||
before(): get(* goo) {} | |||
public int A.getFoo() { | |||
return foo; | |||
} | |||
public int A.getGoo() { | |||
return goo; | |||
} | |||
} |
@@ -18,10 +18,22 @@ import org.aspectj.testing.XMLBasedAjcTestCase; | |||
public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase { | |||
// public void testAmbiguousMethod_298665() { | |||
// runTest("ambiguous method"); | |||
// } | |||
// public void testStaticallyAnalyzableIf_292262_1() { | |||
// runTest("if with statically recognizable code"); | |||
// } | |||
public void testAdvisingPrivilegedAccessMember_307120() { | |||
runTest("advising privileged access member"); | |||
} | |||
public void testAdvisingPrivilegedAccessMember_307120_2() { | |||
runTest("advising privileged access member - 2"); | |||
} | |||
public void testTypePatternCategories_44365_Class() { | |||
runTest("type category type patterns - class"); | |||
} | |||
@@ -70,9 +82,6 @@ public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase { | |||
runTest("type category type patterns - e2"); | |||
} | |||
// public void testAmbiguousMethod_298665() { | |||
// runTest("ambiguous method"); | |||
// } | |||
public void testChecker() { | |||
runTest("inserts in messages"); |
@@ -2,6 +2,22 @@ | |||
<suite> | |||
<ajc-test dir="bugs169/pr307120" title="advising privileged access member"> | |||
<compile files="A.java Test.java" options="-showWeaveInfo"> | |||
<message kind="weave" text="Type 'A' (A.java) has intertyped method from 'Test'"/> <!-- getFoo and getGoo --> | |||
<message kind="weave" text="Join point 'field-get(int A.goo)' in Type 'Test'"/> | |||
<message kind="weave" text="Join point 'field-get(int A.foo)' in Type 'Test'"/> | |||
</compile> | |||
</ajc-test> | |||
<ajc-test dir="bugs169/pr307120" title="advising privileged access member - 2"> | |||
<compile files="Test.java A.java" options="-showWeaveInfo"> | |||
<message kind="weave" text="Type 'A' (A.java) has intertyped method from 'Test'"/> <!-- getFoo and getGoo --> | |||
<message kind="weave" text="Join point 'field-get(int A.goo)' in Type 'Test'"/> | |||
<message kind="weave" text="Join point 'field-get(int A.foo)' in Type 'Test'"/> | |||
</compile> | |||
</ajc-test> | |||
<ajc-test dir="bugs169/pr292262" title="if with statically recognizable code"> | |||
<compile files="A.java"> | |||
<message kind="weave" text="Join point 'staticinitialization(void SimpleClass.<clinit>())' in Type 'SimpleClass'"/> |