aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2018-08-24 17:49:44 -0700
committerAndy Clement <aclement@pivotal.io>2018-08-24 17:57:36 -0700
commita5c0fc936fbbe65f31339395aa8e369ffda7b136 (patch)
tree407aa24501eabdf5444095d10a3eff79932f9a37 /tests/src
parent43fab006f4e9d6d0b0c8e637d3aec101c3688fbb (diff)
downloadaspectj-a5c0fc936fbbe65f31339395aa8e369ffda7b136.tar.gz
aspectj-a5c0fc936fbbe65f31339395aa8e369ffda7b136.zip
537825: Remove FINAL for cflow related class elements for Java 9+
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/org/aspectj/systemtest/ajc192/Ajc192Tests.java12
-rw-r--r--tests/src/org/aspectj/systemtest/ajc192/ajc192.xml37
-rw-r--r--tests/src/org/aspectj/systemtest/apt/AptTests.java8
3 files changed, 53 insertions, 4 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc192/Ajc192Tests.java b/tests/src/org/aspectj/systemtest/ajc192/Ajc192Tests.java
index 989d74b2d..0629294db 100644
--- a/tests/src/org/aspectj/systemtest/ajc192/Ajc192Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc192/Ajc192Tests.java
@@ -21,6 +21,18 @@ import junit.framework.Test;
*/
public class Ajc192Tests extends XMLBasedAjcTestCase {
+ public void testCflowFinal() {
+ runTest("no final on cflow elements");
+ }
+
+ public void testAroundAdvice_AnnoStyle() {
+ runTest("around advice");
+ }
+
+ public void testAroundAdvice_CodeStyle() {
+ runTest("around advice - 2");
+ }
+
public void testPTW_nonPrivileged() {
runTest("ptw");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc192/ajc192.xml b/tests/src/org/aspectj/systemtest/ajc192/ajc192.xml
index 13e0ae9c1..5eb7fcbbb 100644
--- a/tests/src/org/aspectj/systemtest/ajc192/ajc192.xml
+++ b/tests/src/org/aspectj/systemtest/ajc192/ajc192.xml
@@ -2,6 +2,43 @@
<suite>
+ <ajc-test dir="bugs192/537825" title="no final on cflow elements">
+ <compile files="Code.java" options="-9">
+ </compile>
+ <run class="Code">
+ <stdout>
+ <line text="call(void B.methodB())"/>
+ <line text="staticinitialization(B.&lt;clinit&gt;)"/>
+ <line text="execution(void B.methodB())"/>
+ <line text="call(void C.methodC())"/>
+ <line text="staticinitialization(C.&lt;clinit&gt;)"/>
+ <line text="execution(void C.methodC())"/>
+ <line text="call(void D.methodD())"/>
+ <line text="staticinitialization(D.&lt;clinit&gt;)"/>
+ <line text="execution(void D.methodD())"/>
+ <line text="get(PrintStream java.lang.System.out)"/>
+ <line text="call(void java.io.PrintStream.println(int))"/>
+ <line text="3"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs192/535156" title="around advice">
+ <compile files="DemoApp.java" options="-8 -showWeaveInfo">
+ <message kind="weave" text="Join point 'method-call(void DemoApp.say())' in Type 'DemoApp' (DemoApp.java:6) advised by around advice from 'X' (DemoApp.java:14)"/>
+ </compile>
+ <run class="DemoApp">
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs192/535156" title="around advice - 2">
+ <compile files="DemoApp2.java" options="-8 -showWeaveInfo">
+ <message kind="weave" text="Join point 'method-call(void DemoApp2.say())' in Type 'DemoApp2' (DemoApp2.java:6) advised by around advice from 'X' (DemoApp2.java:13)"/>
+ </compile>
+ <run class="DemoApp2">
+ </run>
+ </ajc-test>
+
<ajc-test dir="bugs192/ptw" title="ptw">
<compile files="a/b/c/Code.java a/b/d/Foo.java" options="-8">
</compile>
diff --git a/tests/src/org/aspectj/systemtest/apt/AptTests.java b/tests/src/org/aspectj/systemtest/apt/AptTests.java
index bf9c53916..14de6b12f 100644
--- a/tests/src/org/aspectj/systemtest/apt/AptTests.java
+++ b/tests/src/org/aspectj/systemtest/apt/AptTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014 Contributors
+ * Copyright (c) 2014,2018 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
@@ -10,12 +10,12 @@
*******************************************************************************/
package org.aspectj.systemtest.apt;
-import junit.framework.Test;
-import org.aspectj.apache.bcel.classfile.Method;
+import java.io.File;
+
import org.aspectj.testing.XMLBasedAjcTestCase;
import org.aspectj.util.LangUtil;
-import java.io.File;
+import junit.framework.Test;
/**
* Annotation processing tool tests.