summaryrefslogtreecommitdiffstats
path: root/tests/src/org
diff options
context:
space:
mode:
authoraclement <aclement>2005-07-18 08:34:11 +0000
committeraclement <aclement>2005-07-18 08:34:11 +0000
commite15794a2aa3c981571d54ff370c6e4f1d9ee97b1 (patch)
treee5fa3872d447ad70566746b0a0e697a40eac59f5 /tests/src/org
parentbba9c50768a1db72fc8606a80762333d4b12d140 (diff)
downloadaspectj-e15794a2aa3c981571d54ff370c6e4f1d9ee97b1.tar.gz
aspectj-e15794a2aa3c981571d54ff370c6e4f1d9ee97b1.zip
testcases for pr98901 (annotations copied to targets of decannotation). Not yet wired into the full 150 suite.
Diffstat (limited to 'tests/src/org')
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/RuntimeAnnotations.java138
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml262
2 files changed, 400 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc150/RuntimeAnnotations.java b/tests/src/org/aspectj/systemtest/ajc150/RuntimeAnnotations.java
new file mode 100644
index 000000000..0ece3bd0b
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc150/RuntimeAnnotations.java
@@ -0,0 +1,138 @@
+package org.aspectj.systemtest.ajc150;
+
+import java.io.File;
+
+import junit.framework.Test;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+/**
+ * Checking that runtime visible annotations are visible at runtime (they get into the class file)
+ */
+public class RuntimeAnnotations extends XMLBasedAjcTestCase {
+
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(RuntimeAnnotations.class);
+ }
+
+ protected File getSpecFile() {
+ return new File("../tests/src/org/aspectj/systemtest/ajc150/ajc150.xml");
+ }
+
+ public void test01() {
+ runTest("public method with declare @method");
+ }
+
+ public void test02() {
+ runTest("public method on the aspect that declares @method on it");
+ }
+
+ public void test03() {
+ runTest("public annotated method");
+ }
+
+ public void test04() {
+ runTest("public ITD method with declare @method");
+ }
+
+ public void test05() {
+ runTest("public annotated ITD method");
+ }
+
+ public void test06() {
+ runTest("public ITD-on-itself method with declare @method");
+ }
+
+ public void test07() {
+ runTest("public annotated ITD-on-itself method");
+ }
+
+ public void test08() {
+ runTest("public method on an Interface with declare @method");
+ }
+
+ public void test09() {
+ runTest("public annotated method on an Interface");
+ }
+
+ public void test10() {
+ runTest("public ITD method onto an Interface with declare @method");
+ }
+
+ public void test11() {
+ runTest("public annotated ITD method onto an Interface");
+ }
+
+ public void test12() {
+ runTest("public abstract method with declare @method");
+ }
+
+ public void test13() {
+ runTest("public abstract method on the aspect that declares @method on it");
+ }
+
+ public void test14() {
+ runTest("public abstract annotated method");
+ }
+
+ public void test15() {
+ runTest("public abstract ITD method with declare @method");
+ }
+
+ public void test16() {
+ runTest("public abstract annotated ITD method");
+ }
+
+ public void test17() {
+ runTest("public abstract ITD-on-itself method with declare @method");
+ }
+
+ public void test18() {
+ runTest("public abstract annotated ITD-on-itself method");
+ }
+
+ public void test19() {
+ runTest("public abstract method on an Interface with declare @method");
+ }
+
+ public void test20() {
+ runTest("public abstract annotated method on an Interface");
+ }
+
+ public void test21() {
+ runTest("public abstract ITD method onto an Interface with declare @method");
+ }
+
+ public void test22() {
+ runTest("public abstract annotated ITD method onto an Interface");
+ }
+
+ public void test23() {
+ runTest("public field with declare @field");
+ }
+
+ public void test24() {
+ runTest("public field on the aspect that declares @field on it");
+ }
+
+ public void test25() {
+ runTest("public annotated field");
+ }
+
+ public void test26() {
+ runTest("public ITD field with declare @field");
+ }
+
+ public void test27() {
+ runTest("public annotated ITD field");
+ }
+
+ public void test28() {
+ runTest("public ITD-on-itself field with declare @field");
+ }
+
+ public void test29() {
+ runTest("public annotated ITD-on-itself field");
+ }
+
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index 430de02a0..07345574d 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -2587,4 +2587,266 @@
<!-- End of generics tests -->
<!-- ============================================================== -->
+ <ajc-test dir="bugs150/pr98901" title="public method with declare @method">
+ <compile files="Case01.aj" options="-1.5 -Xlint:error"/>
+ <run class="B01">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs150/pr98901" title="public method on the aspect that declares @method on it">
+ <compile files="Case02.aj" options="-1.5 -Xlint:error"/>
+ <run class="B02">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs150/pr98901" title="public annotated method">
+ <compile files="Case03.aj" options="-1.5 -Xlint:error"/>
+ <run class="B03">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public ITD method with declare @method">
+ <compile files="Case04.aj" options="-1.5 -Xlint:error"/>
+ <run class="B04">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public annotated ITD method">
+ <compile files="Case05.aj" options="-1.5 -Xlint:error"/>
+ <run class="B05">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public ITD-on-itself method with declare @method">
+ <compile files="Case06.aj" options="-1.5 -Xlint:error"/>
+ <run class="B06">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public annotated ITD-on-itself method">
+ <compile files="Case07.aj" options="-1.5 -Xlint:error"/>
+ <run class="B07">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public method on an Interface with declare @method">
+ <compile files="Case08.aj" options="-1.5 -Xlint:error"/>
+ <run class="B08">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public annotated method on an Interface">
+ <compile files="Case09.aj" options="-1.5 -Xlint:error"/>
+ <run class="B09">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public ITD method onto an Interface with declare @method">
+ <compile files="Case10.aj" options="-1.5 -Xlint:error"/>
+ <run class="B10">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public annotated ITD method onto an Interface">
+ <compile files="Case11.aj" options="-1.5 -Xlint:error"/>
+ <run class="B11">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public abstract method with declare @method">
+ <compile files="Case12.aj" options="-1.5 -Xlint:error"/>
+ <run class="B12">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public abstract method on the aspect that declares @method on it">
+ <compile files="Case13.aj" options="-1.5 -Xlint:error"/>
+ <run class="B13">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public abstract annotated method">
+ <compile files="Case14.aj" options="-1.5 -Xlint:error"/>
+ <run class="B14">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public abstract ITD method with declare @method">
+ <compile files="Case15.aj" options="-1.5 -Xlint:error"/>
+ <run class="B15">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public abstract annotated ITD method">
+ <compile files="Case16.aj" options="-1.5 -Xlint:error"/>
+ <run class="B16">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public abstract ITD-on-itself method with declare @method">
+ <compile files="Case17.aj" options="-1.5 -Xlint:error"/>
+ <run class="B17">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public abstract annotated ITD-on-itself method">
+ <compile files="Case18.aj" options="-1.5 -Xlint:error"/>
+ <run class="B18">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public abstract method on an Interface with declare @method">
+ <compile files="Case19.aj" options="-1.5 -Xlint:error"/>
+ <run class="B19">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public abstract annotated method on an Interface">
+ <compile files="Case20.aj" options="-1.5 -Xlint:error"/>
+ <run class="B20">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public abstract ITD method onto an Interface with declare @method">
+ <compile files="Case21.aj" options="-1.5 -Xlint:error"/>
+ <run class="B21">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public abstract annotated ITD method onto an Interface">
+ <compile files="Case22.aj" options="-1.5 -Xlint:error"/>
+ <run class="B22">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public field with declare @field">
+ <compile files="Case23.aj" options="-1.5 -Xlint:error"/>
+ <run class="B23">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+
+<ajc-test dir="bugs150/pr98901" title="public field on the aspect that declares @field on it">
+ <compile files="Case24.aj" options="-1.5 -Xlint:error"/>
+ <run class="B24">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public annotated field">
+ <compile files="Case25.aj" options="-1.5 -Xlint:error"/>
+ <run class="B25">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public ITD field with declare @field">
+ <compile files="Case26.aj" options="-1.5 -Xlint:error"/>
+ <run class="B26">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public annotated ITD field">
+ <compile files="Case27.aj" options="-1.5 -Xlint:error"/>
+ <run class="B27">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public ITD-on-itself field with declare @field">
+ <compile files="Case28.aj" options="-1.5 -Xlint:error"/>
+ <run class="B28">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+<ajc-test dir="bugs150/pr98901" title="public annotated ITD-on-itself field">
+ <compile files="Case29.aj" options="-1.5 -Xlint:error"/>
+ <run class="B29">
+ <stdout>
+ <line text="@anInterface()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
</suite> \ No newline at end of file