From b83891da5769442d335d8e61d52d16e215055975 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 30 Oct 2006 10:25:24 +0000 Subject: [PATCH] tests for 162135 (commented out) and 162657 (not commented out) --- tests/bugs153/pr162657/TestAspect.aj | 31 +++++++++++++++++++ .../systemtest/ajc153/Ajc153Tests.java | 6 ++++ .../org/aspectj/systemtest/ajc153/ajc153.xml | 29 +++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 tests/bugs153/pr162657/TestAspect.aj diff --git a/tests/bugs153/pr162657/TestAspect.aj b/tests/bugs153/pr162657/TestAspect.aj new file mode 100644 index 000000000..3b58ec895 --- /dev/null +++ b/tests/bugs153/pr162657/TestAspect.aj @@ -0,0 +1,31 @@ +import java.util.List; + +public aspect TestAspect { + private pointcut inTest(): within(TestComp); + + private pointcut inAdd(BaseModel m): inTest() && + execution(public BaseModel+ BaseComp+.add*(BaseModel+)) && + args(m); + + private pointcut inGetSearchByObj(BaseModel m): inTest() && + (execution(public * BaseComp+.get*(BaseModel+)) || + execution(public * BaseComp+.search*(BaseModel+))) && + args(m); + + private pointcut inGrate(): + (execution(public * BaseComp+.get*(BaseModel+)) || + execution(public * BaseComp+.search*(BaseModel+))); + + private pointcut inUpdate(BaseModel m): inTest() && + execution(public * BaseComp+.*(BaseModel+)) && + args(m) && !inAdd(BaseModel) && !inGrate(); + + before(BaseModel m): inUpdate(m) { } +} + + +abstract class BaseComp { } +abstract class BaseModel {} +class TestComp {} + + diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java index 3790fcad6..cb515089e 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java @@ -28,6 +28,12 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // public void testCFlowXMLAspectLTW_pr149096() { runTest("cflow xml concrete aspect"); } // public void testAmbiguousBinding_pr121805() { runTest("ambiguous binding");} // public void testNegatedAnnotationMatchingProblem_pr153464() { runTest("negated annotation matching problem");} +// public void testAnnotationStyleBcException_pr162135() { runTest("bcexception in annotation style around advice");} +// public void testAnnotationStyleBcException_pr162135_2() { runTest("bcexception in annotation style around advice - 2");} +// public void testAnnotationStyleBcException_pr162135_3() { runTest("bcexception in annotation style around advice - 3");} +// public void testAnnotationStyleBcException_pr162135_4() { runTest("bcexception in annotation style around advice - 4");} +// public void testAnnotationStyleBcException_pr162135_5() { runTest("bcexception in annotation style around advice - 5");} + public void testComplexPointcut_pr162657() { runTest("complex pointcut");} public void testGenericsInPointcuts_pr161502() { runTest("generics in pointcuts");} public void testGenericsInPointcuts_pr161502_2() { runTest("generics in pointcuts - 2");} public void testNoNPEDueToMissingType_pr149908() { runTest("ensure no npe due to missing type");} diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml index ee379452d..85219fc09 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml +++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml @@ -14,6 +14,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.39.5