aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2008-08-21 18:00:21 +0000
committeraclement <aclement>2008-08-21 18:00:21 +0000
commitd456da9c254dc59a60b4250cae05da376d808d9f (patch)
tree939f7fa423afd23e4bb6aaa4fb6c44d959ef5648 /tests
parentcd0feecc0b1b875be8e5083b1c38efa677f012f2 (diff)
downloadaspectj-d456da9c254dc59a60b4250cae05da376d808d9f.tar.gz
aspectj-d456da9c254dc59a60b4250cae05da376d808d9f.zip
210114: test and fix: errors for compiler limitations become warnings
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs162/pr210114/TestAspect.java20
-rw-r--r--tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc162/ajc162.xml8
3 files changed, 29 insertions, 0 deletions
diff --git a/tests/bugs162/pr210114/TestAspect.java b/tests/bugs162/pr210114/TestAspect.java
new file mode 100644
index 000000000..f641673d6
--- /dev/null
+++ b/tests/bugs162/pr210114/TestAspect.java
@@ -0,0 +1,20 @@
+package test;
+
+public aspect TestAspect {
+ Object around() : within(TestClass) {
+ return proceed();
+ }
+
+ after() : within(TestClass) {
+ }
+}
+
+class TestClass {
+ public void test() {
+ try {
+ new String();
+ } catch (Exception ex) {
+ }
+ }
+}
+
diff --git a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
index 2862c298f..08dba1573 100644
--- a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
@@ -19,6 +19,7 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// AspectJ1.6.2
+ public void testWarningsForLimitations_pr210114() { runTest("warnings for limitations"); }
public void testPTW_pr244830() { runTest("ptw initFailureCause"); }
public void testGenericItdsOverrides_pr222648() { runTest("generic itds - overrides"); }
public void testGenericItdsOverrides_pr222648_2() { runTest("generic itds - overrides - 2"); }
diff --git a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml
index bdea360d1..ccbe977f0 100644
--- a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml
+++ b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml
@@ -3,6 +3,14 @@
<!-- AspectJ v1.6.2 Tests -->
<suite>
+ <ajc-test dir="bugs162/pr210114" title="warnings for limitations">
+ <compile files="TestAspect.java" options="-1.5">
+ <message kind="warning" text="Only before advice is supported on handler join points (compiler limitation)"/>
+ <message kind="warning" text="around on initialization not supported (compiler limitation)"/>
+ <message kind="warning" text="around on pre-initialization not supported (compiler limitation)"/>
+ </compile>
+ </ajc-test>
+
<ajc-test dir="bugs162/pr244830" title="ptw initFailureCause">
<compile files="PTW.java" options="-1.5"/>
<run class="PTW"/>