diff options
author | aclement <aclement> | 2008-12-05 22:00:38 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-12-05 22:00:38 +0000 |
commit | de4e0f04be33c3465fb8834558320d12d06b1128 (patch) | |
tree | 74b9aa8bd5b583494701d64325d740a5af9e5ea9 /tests | |
parent | 490789c6a2e0c1d3993e0540bb5c9dbd02b608a8 (diff) | |
download | aspectj-de4e0f04be33c3465fb8834558320d12d06b1128.tar.gz aspectj-de4e0f04be33c3465fb8834558320d12d06b1128.zip |
219419: test and fix
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java | 43 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc163/ajc163.xml | 55 |
2 files changed, 90 insertions, 8 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java index a461b9263..1f33e5792 100644 --- a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java @@ -32,6 +32,32 @@ public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // runTest("ataspectj decp"); // } + public void testIncorrectArgOrdering_pr219419() { + runTest("incorrect arg ordering anno style"); + } + + public void testIncorrectArgOrdering_pr219419_2() { + runTest("incorrect arg ordering anno style - 2"); + } + + public void testIncorrectArgOrdering_pr219419_3() { + runTest("incorrect arg ordering anno style - 3"); + } + + // similar to 3 but parameters other way round + public void testIncorrectArgOrdering_pr219419_4() { + runTest("incorrect arg ordering anno style - 4"); + } + + // similar to 3 but also JoinPoint passed into advice + public void testIncorrectArgOrdering_pr219419_5() { + runTest("incorrect arg ordering anno style - 5"); + } + + // public void testDecpAnnoStyle_pr257754() { + // runTest("decp anno style"); + // } + public void testPoorAtAjIfMessage_pr256458() { runTest("poor ataj if message - 1"); } @@ -39,15 +65,12 @@ public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testPoorAtAjIfMessage_pr256458_2() { runTest("poor ataj if message - 2"); } -/* - public void testInheritedAnnotations_pr128664() { - runTest("inherited annotations"); - } - public void testInheritedAnnotations_pr128664_2() { - runTest("inherited annotations - 2"); - } -*/ + /* + * public void testInheritedAnnotations_pr128664() { runTest("inherited annotations"); } + * + * public void testInheritedAnnotations_pr128664_2() { runTest("inherited annotations - 2"); } + */ public void testGetMethodNull_pr154427() { runTest("getMethod returning null"); } @@ -98,6 +121,10 @@ public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase { IProgramElement itd = findElementAtLine(top.getRoot(), 10); String type = itd.getCorrespondingType(true); assertEquals("java.util.List<java.lang.String>", type); + + itd = findElementAtLine(top.getRoot(), 16); + type = itd.getCorrespondingType(true); + assertEquals("java.util.List<java.lang.String>", type); } private IProgramElement findElementAtLine(IProgramElement whereToLook, int line) { diff --git a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml index 11c89c64f..7a07dff4a 100644 --- a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml +++ b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml @@ -33,6 +33,61 @@ <run class="Bug2"/> </ajc-test> + <ajc-test dir="bugs163/pr257754" title="decp anno style"> + <compile files="Main.java" options="-1.5"/> + <run class="example.Main"/> + </ajc-test> + + <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style"> + <compile files="Code.java" options="-1.5"/> + <run class="Code"> + <stdout> + <line text="Catching mess. Argument was ewwww"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style - 2"> + <compile files="Code2.java" options="-1.5"/> + <run class="Code2"> + <stdout> + <line text="Catching mess. Argument was ewwww"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style - 3"> + <compile files="Code3.java" options="-1.5"/> + <run class="Code3"> + <stdout> + <line text="afterReturningCreateBean advice input='s' ret=37"/> + <line text="Code3.main returned from call to createBean 37"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style - 4"> + <compile files="Code4.java" options="-1.5"/> + <run class="Code4"> + <stdout> + <line text="afterReturningCreateBean advice input='s' ret=37"/> + <line text="Code4.main returned from call to createBean 37"/> + </stdout> + </run> + </ajc-test> + + <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style - 5"> + <compile files="Code5.java" options="-1.5"/> + <run class="Code5"> + <stdout> + <line text="afterReturningCreateBean advice input='s' ret=37"/> + <line text="Code5.main returned from call to createBean 37"/> + </stdout> + </run> + </ajc-test> + + + <ajc-test dir="bugs163/pr256458" title="poor ataj if message - 1"> <compile files="Code.java" options="-1.5"> <message kind="error" text="in annotation style, if(...) pointcuts cannot contain code"/> |