From 182a728ab782b94f5c0f8efb1536fb4f5b913e9c Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 3 Mar 2008 17:23:18 +0000 Subject: [PATCH] annotation value matching in decp --- tests/bugs160/various/A.java | 16 ++++++++++++++++ tests/bugs160/various/Z.java | 16 ++++++++++++++++ .../aspectj/systemtest/ajc160/Ajc160Tests.java | 5 +++++ .../src/org/aspectj/systemtest/ajc160/ajc160.xml | 12 ++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 tests/bugs160/various/A.java create mode 100644 tests/bugs160/various/Z.java diff --git a/tests/bugs160/various/A.java b/tests/bugs160/various/A.java new file mode 100644 index 000000000..d09cdcf8e --- /dev/null +++ b/tests/bugs160/various/A.java @@ -0,0 +1,16 @@ +// HasMethod with anno value matching + +@interface I { + int i(); +} +aspect A { + declare parents: hasmethod(@I(i=5) * *(..)) implements java.io.Serializable; +} + +class B { +@I(i=5) public void m() {} +} +class C { +@I(i=6) public void m() {} +} + diff --git a/tests/bugs160/various/Z.java b/tests/bugs160/various/Z.java new file mode 100644 index 000000000..4fb0cb1f2 --- /dev/null +++ b/tests/bugs160/various/Z.java @@ -0,0 +1,16 @@ +// HasMethod with anno value matching + +@interface I { + boolean b(); +} +aspect A { + declare parents: hasmethod(@I(b=true) * *(..)) implements java.io.Serializable; +} + +class B { +@I(b=true) public void m() {} +} +class C { +@I(b=false) public void m() {} +} + diff --git a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java index d3bd8e1b6..cf88304c2 100644 --- a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java @@ -20,6 +20,11 @@ import junit.framework.Test; */ public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + // AspectH1.6.0rc1 + public void testHasMethodAnnoValueInt_various() { runTest("hasmethod anno value - I");} + public void testHasMethodAnnoValueBoolean_various() { runTest("hasmethod anno value - Z");} + + // AspectJ1.6.0m2 and earlier public void testBoundsCheckShouldFail_pr219298() { runTest("bounds check failure");} public void testBoundsCheckShouldFail_pr219298_2() { runTest("bounds check failure - 2");} public void testGenericMethodMatching_pr204505_1() { runTest("generics method matching - 1");} diff --git a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml index 09da1df88..35bc56a79 100644 --- a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml +++ b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml @@ -3,6 +3,18 @@ + + + + + + + + + + + + -- 2.39.5