summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/java5/ataspectj/ataspectj/DeowTest.java41
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjSyntaxTests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ataspectj/syntax.xml7
3 files changed, 52 insertions, 0 deletions
diff --git a/tests/java5/ataspectj/ataspectj/DeowTest.java b/tests/java5/ataspectj/ataspectj/DeowTest.java
new file mode 100644
index 000000000..fc8a27015
--- /dev/null
+++ b/tests/java5/ataspectj/ataspectj/DeowTest.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2005 Contributors.
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexandre Vasseur initial implementation
+ *******************************************************************************/
+package ataspectj;
+
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.DeclareWarning;
+import org.aspectj.lang.annotation.DeclareError;
+
+/**
+ * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
+ */
+public class DeowTest {
+
+ public void hello() {}
+
+ public void hi() {}
+
+ public void target() {
+ hello();
+ hi();
+ }
+
+ @Aspect
+ public static class DeowAspect {
+
+ @DeclareWarning("call(* hello()) && within(ataspectj.DeowTest)")
+ final static String onHello = "call hello";
+
+ @DeclareError("call(* hi()) && within(ataspectj.DeowTest)")
+ final static String onHi = "call hi";
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjSyntaxTests.java b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjSyntaxTests.java
index 264c46930..6c936ef4f 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjSyntaxTests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjSyntaxTests.java
@@ -87,4 +87,8 @@ public class AtAjSyntaxTests extends XMLBasedAjcTestCase {
public void testAroundInlineMunger2() {
runTest("AroundInlineMunger2");
}
+
+ public void testDeow() {
+ runTest("Deow");
+ }
} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/syntax.xml b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/syntax.xml
index 055567d30..2a4024617 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/syntax.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/syntax.xml
@@ -100,4 +100,11 @@
<compile files="ataspectj/AroundInlineMungerTest2.aj,ataspectj/AroundInlineMungerTestAspects2.aj,ataspectj/TestHelper.java" options="-1.5 -Xlint:ignore"/>
<run class="ataspectj.AroundInlineMungerTest2"/>
</ajc-test>
+
+ <ajc-test dir="java5/ataspectj" title="Deow">
+ <compile files="ataspectj/DeowTest.java" options="-1.5">
+ <message kind="warning" line="28" text="call hello"/>
+ <message kind="error" line="29" text="call hi"/>
+ </compile>
+ </ajc-test>
</suite> \ No newline at end of file