aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndy Clement <aclement@gopivotal.com>2014-10-21 13:19:19 -0700
committerAndy Clement <aclement@gopivotal.com>2014-10-21 13:19:19 -0700
commit0df90e175b316d5a8e6189c2d89725cd8afd7bd3 (patch)
tree0e6a7c8b5d41ed4d0e44eb2f4a61a08653ee02a2 /tests
parentdddd1236cd21982a07f887ff7fa5d484ebc3b86c (diff)
downloadaspectj-0df90e175b316d5a8e6189c2d89725cd8afd7bd3.tar.gz
aspectj-0df90e175b316d5a8e6189c2d89725cd8afd7bd3.zip
Support for @RequiredTypes and abstract aspects
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs183/436653/abstract/A.java1
-rw-r--r--tests/bugs183/436653/abstract/AA.java5
-rw-r--r--tests/bugs183/436653/abstract/Code.java8
-rw-r--r--tests/bugs183/436653/abstract/X.java8
-rw-r--r--tests/src/org/aspectj/systemtest/ajc183/Ajc183Tests.java8
-rw-r--r--tests/src/org/aspectj/systemtest/ajc183/ajc183.xml34
6 files changed, 64 insertions, 0 deletions
diff --git a/tests/bugs183/436653/abstract/A.java b/tests/bugs183/436653/abstract/A.java
new file mode 100644
index 000000000..9f4b93d84
--- /dev/null
+++ b/tests/bugs183/436653/abstract/A.java
@@ -0,0 +1 @@
+public class A {}
diff --git a/tests/bugs183/436653/abstract/AA.java b/tests/bugs183/436653/abstract/AA.java
new file mode 100644
index 000000000..eceb74d76
--- /dev/null
+++ b/tests/bugs183/436653/abstract/AA.java
@@ -0,0 +1,5 @@
+import org.aspectj.lang.annotation.*;
+
+@RequiredTypes("A")
+abstract aspect AA {
+}
diff --git a/tests/bugs183/436653/abstract/Code.java b/tests/bugs183/436653/abstract/Code.java
new file mode 100644
index 000000000..f956f53cf
--- /dev/null
+++ b/tests/bugs183/436653/abstract/Code.java
@@ -0,0 +1,8 @@
+public class Code {
+ public static void main(String []argv) {
+ new Code().m();
+ }
+ public void m() {
+ System.out.println("Code.m()");
+ }
+}
diff --git a/tests/bugs183/436653/abstract/X.java b/tests/bugs183/436653/abstract/X.java
new file mode 100644
index 000000000..e0450f424
--- /dev/null
+++ b/tests/bugs183/436653/abstract/X.java
@@ -0,0 +1,8 @@
+import org.aspectj.lang.annotation.*;
+
+//@RequiredTypes("A")
+aspect X extends AA {
+ @SuppressAjWarnings("adviceDidNotMatch")
+ before(): execution(* *(..)) { System.out.println("X.before"); }
+}
+
diff --git a/tests/src/org/aspectj/systemtest/ajc183/Ajc183Tests.java b/tests/src/org/aspectj/systemtest/ajc183/Ajc183Tests.java
index bb033b6db..db6878e15 100644
--- a/tests/src/org/aspectj/systemtest/ajc183/Ajc183Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc183/Ajc183Tests.java
@@ -25,6 +25,14 @@ public class Ajc183Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("super calls");
}
+ public void testSuppressTypeNotFoundAbstract_436653_2() {
+ runTest("suppress type not found - abstract 2");
+ }
+
+ public void testSuppressTypeNotFoundAbstract_436653_1() {
+ runTest("suppress type not found - abstract 1");
+ }
+
public void testSuppressTypeNotFound_436653() {
runTest("suppress type not found");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc183/ajc183.xml b/tests/src/org/aspectj/systemtest/ajc183/ajc183.xml
index c24987f6b..e1c40ae72 100644
--- a/tests/src/org/aspectj/systemtest/ajc183/ajc183.xml
+++ b/tests/src/org/aspectj/systemtest/ajc183/ajc183.xml
@@ -10,6 +10,40 @@
</stdout>
</run>
</ajc-test>
+
+ <ajc-test dir="bugs183/436653/abstract" title="suppress type not found - abstract 2">
+ <compile options="-1.8 -Xlint:ignore" files="A.java" outjar="codeA.jar"/>
+ <compile options="-1.8" files="X.java AA.java" classpath="codeA.jar" outjar="aspects.jar"/>
+ <compile options="-1.8" files="Code.java" aspectpath="aspects.jar"/>
+ <run class="Code">
+ <stdout>
+ <!--
+ These don't come out because AA is missing required type A in the last compile step
+ <line text="X.before"/>
+ <line text="X.before"/>
+ -->
+ <line text="Code.m()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs183/436653/abstract" title="suppress type not found - abstract 1">
+ <compile options="-1.8 -Xlint:ignore" files="A.java" outjar="codeA.jar"/>
+ <compile options="-1.8" files="AA.java X.java" classpath="codeA.jar" outjar="aspects.jar"/>
+ <compile options="-1.8" files="Code.java" aspectpath="aspects.jar"/>
+ <run class="Code">
+ <stdout>
+ <!--
+ These don't come out because AA is missing required type A in the last compile step.
+ Difference between this test and the previous one is that this is a different order
+ of aspects (addOrReplaceAspects called with the abstract aspect first here).
+ <line text="X.before"/>
+ <line text="X.before"/>
+ -->
+ <line text="Code.m()"/>
+ </stdout>
+ </run>
+ </ajc-test>
<ajc-test dir="bugs183/436653" title="suppress type not found 4">
<compile options="-1.8 -Xlint:ignore" files="X.java" outjar="aspects.jar"/>