--- /dev/null
+package p;
+
+aspect Checker {
+ declare warning: execution(* A.m(..)): "joinpoint location is {joinpoint.sourcelocation.sourcefile}:{joinpoint.sourcelocation.line}";
+ declare warning: execution(* A.m(..)): "joinpoint is {joinpoint}";
+ declare warning: execution(* A.m(..)): "joinpoint kind is {joinpoint.kind}";
+ declare warning: execution(* A.m(..)): "joinpoint kind is '{joinpoint.kind}'";
+ declare warning: execution(* A.m(..)): "joinpoint line is '{joinpoint.sourcelocation.line}'";
+ declare warning: execution(* A.m(..)): "joinpoint signature is {joinpoint.signature}";
+ declare warning: get(int *) && within(A): "joinpoint signature is {joinpoint.signature}";
+ declare warning: execution(* A.m(..)): "joinpoint declaring type is {joinpoint.signature.declaringType}";
+ declare warning: execution(* A.m(..)): "advice sourcelocation is {advice.sourcelocation.sourcefile}:{advice.sourcelocation.line}";
+ declare warning: get(int *): "aspect is {advice.aspecttype}";
+ declare warning: get(int *): "signature name for field is {joinpoint.signature.name}";
+ declare warning: execution(* A.m(..)): "signature name for method is {joinpoint.signature.name}";
+ declare warning: execution(* A.m(..)): "\\{}wibble";
+ declare warning: execution(* A.m(..)): "{}foobar";
+ declare warning: execution(* A.m(..)): "test {advice.sourcelocation.line}\\{}{joinpoint.sourcelocation.line}";
+}
+
+class A {
+ int i;
+ public void m() {
+ System.out.println(i);
+ }
+}
public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ /*public void testAmbiguousMethod() {
+ runTest("ambiguous method");
+ }*/
+
+ public void testChecker() {
+ runTest("inserts in messages");
+ }
+/*
+ public void testVerifyError() {
+ runTest("verifyerror on atAj");
+ }
+
+ public void testDeclareTypeWarning1() {
+ runTest("declare type warning - 1");
+ }
+
+ public void testDeclareTypeWarning2() {
+ runTest("declare type warning - 2");
+ }
+
+ public void testDeclareTypeWarning3() {
+ runTest("declare type warning - 3");
+ }
+
+ public void testDeclareTypeError1() {
+ runTest("declare type error - 1");
+ }*/
+
public void testPr298388() {
runTest("declare mixin and generics");
}
<suite>
+ <ajc-test dir="bugs169/pr48080" title="inserts in messages">
+ <compile files="Warnings.java" options="-1.5">
+ <message kind="warning" text="UNKNOWN_KEY{}foobar"/>
+ <message kind="warning" text="{}wibble"/>
+ <message kind="warning" text="signature name for method is m"/>
+ <message kind="warning" text="joinpoint declaring type is p.A"/>
+ <message kind="warning" text="joinpoint signature is void p.A.m()"/>
+ <message kind="warning" text="joinpoint line is '23'"/>
+ <message kind="warning" text="joinpoint kind is method-execution"/>
+ <message kind="warning" text="joinpoint kind is 'method-execution'"/>
+ <message kind="warning" text="joinpoint is method-execution(void p.A.m())"/>
+ <message kind="warning" text="joinpoint location is"/>
+ <message kind="warning" text="signature name for field is i"/>
+ <message kind="warning" text="joinpoint signature is int p.A.i"/>
+ <message kind="warning" text="aspect is p.Checker"/>
+ <message kind="warning" text="advice sourcelocation is"/>
+ <message kind="warning" text="test 18{}23"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs169/pr299062" title="verifyerror on atAj">
+ <compile files="Test.java Work.java SmartAspect.java Idempotent.java" options="-1.5"/>
+ <run class="Test">
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs169/pr298665" title="ambiguous method">
+ <compile files="Main.java" options="-1.5"/>
+ <run class="Main">
+ </run>
+ </ajc-test>
+
<ajc-test dir="bugs169/pr298388" title="declare mixin and generics">
<compile files="PR298388.java" options="-1.5"/>
<run class="PR298388">
</run>
</ajc-test>
+ <!-- declare type warning -->
+
+ <ajc-test dir="bugs169/pr291206" title="declare type warning - 1">
+ <compile files="One.java" options="-1.5">
+ <message kind="warning" line="8" text="Nothing should be"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs169/pr291206" title="declare type warning - 2">
+ <compile files="Two.java" options="-1.5 -XhasMember">
+ <message kind="warning" line="7" text="Missing foo()"/>
+ <message kind="warning" line="13" text="Missing foo()"/>
+ </compile>
+ </ajc-test>
+
+ <!-- testing build of model with one of these in -->
+ <ajc-test dir="bugs169/pr291206" title="declare type warning - 3">
+ <compile files="Two.java" options="-1.5 -XhasMember -emacssym">
+ <message kind="warning" line="7" text="Missing foo()"/>
+ <message kind="warning" line="13" text="Missing foo()"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs169/pr291206" title="declare type error - 1">
+ <compile files="Three.java" options="-1.5 -XhasMember">
+ <message kind="error" line="7" text="Missing foo()"/>
+ <message kind="error" line="13" text="Missing foo()"/>
+ </compile>
+ </ajc-test>
+
</suite>
\ No newline at end of file