diff options
author | aclement <aclement> | 2010-03-13 01:02:47 +0000 |
---|---|---|
committer | aclement <aclement> | 2010-03-13 01:02:47 +0000 |
commit | e49b375f3b0d5d65b8a86d14298d0056fc289804 (patch) | |
tree | 1f52ca0237630f2ba33be1b3c769d22869420c0d /tests | |
parent | 90de1cd02fa216dd6cfe47ab06bab30087836652 (diff) | |
download | aspectj-e49b375f3b0d5d65b8a86d14298d0056fc289804.tar.gz aspectj-e49b375f3b0d5d65b8a86d14298d0056fc289804.zip |
48080: inserts in messages
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs169/pr48080/A.class | bin | 0 -> 352 bytes | |||
-rw-r--r-- | tests/bugs169/pr48080/A.java | 8 | ||||
-rw-r--r-- | tests/bugs169/pr48080/Warnings.java | 26 | ||||
-rw-r--r-- | tests/bugs169/pr48080/X.class | bin | 0 -> 2162 bytes | |||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java | 28 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc169/ajc169.xml | 62 |
6 files changed, 124 insertions, 0 deletions
diff --git a/tests/bugs169/pr48080/A.class b/tests/bugs169/pr48080/A.class Binary files differnew file mode 100644 index 000000000..1c777108e --- /dev/null +++ b/tests/bugs169/pr48080/A.class diff --git a/tests/bugs169/pr48080/A.java b/tests/bugs169/pr48080/A.java new file mode 100644 index 000000000..c8576ca79 --- /dev/null +++ b/tests/bugs169/pr48080/A.java @@ -0,0 +1,8 @@ +public class A { + public void m() { + } +} + +aspect X { + declare warning: execution(* A.m(..)): "method found"; +} diff --git a/tests/bugs169/pr48080/Warnings.java b/tests/bugs169/pr48080/Warnings.java new file mode 100644 index 000000000..805bc4129 --- /dev/null +++ b/tests/bugs169/pr48080/Warnings.java @@ -0,0 +1,26 @@ +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); + } +} diff --git a/tests/bugs169/pr48080/X.class b/tests/bugs169/pr48080/X.class Binary files differnew file mode 100644 index 000000000..1f95cc99c --- /dev/null +++ b/tests/bugs169/pr48080/X.class diff --git a/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java b/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java index 54872e40d..2d04b660a 100644 --- a/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java @@ -18,6 +18,34 @@ import org.aspectj.testing.XMLBasedAjcTestCase; 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"); } diff --git a/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml b/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml index 9f2408c2a..c3e79969e 100644 --- a/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml +++ b/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml @@ -2,6 +2,38 @@ <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"> @@ -25,4 +57,34 @@ </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 |