diff options
author | Andy Clement <aclement@vmware.com> | 2012-02-29 14:59:00 -0800 |
---|---|---|
committer | Andy Clement <aclement@vmware.com> | 2012-02-29 14:59:00 -0800 |
commit | 0cf0cb2dfb690891fe5eb7f4219e383ed666a0fc (patch) | |
tree | da488b31e7b5bd0a0525fceb88c2df7b30fcd466 /tests | |
parent | b5835864bd821f0069797118cac017e39e893118 (diff) | |
download | aspectj-0cf0cb2dfb690891fe5eb7f4219e383ed666a0fc.tar.gz aspectj-0cf0cb2dfb690891fe5eb7f4219e383ed666a0fc.zip |
support -Xset:makeTjpFieldsTransient=truetransientTjp
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs170/transientTjpFields/Code.java | 12 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java | 24 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc170/ajc170.xml | 5 |
3 files changed, 32 insertions, 9 deletions
diff --git a/tests/bugs170/transientTjpFields/Code.java b/tests/bugs170/transientTjpFields/Code.java new file mode 100644 index 000000000..8b4c44e17 --- /dev/null +++ b/tests/bugs170/transientTjpFields/Code.java @@ -0,0 +1,12 @@ +public class Code { + public void m() { + } + + public void n() { + } + +} + +aspect X { + before(): execution(* Code.*(..)) {System.out.println(thisJoinPointStaticPart);} +} diff --git a/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java b/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java index 4e40d4162..63cb5e22b 100644 --- a/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java @@ -11,27 +11,33 @@ package org.aspectj.systemtest.ajc170; import java.io.File; -import java.util.List; import junit.framework.Test; -import org.aspectj.apache.bcel.util.ClassPath; +import org.aspectj.apache.bcel.classfile.Field; +import org.aspectj.apache.bcel.classfile.JavaClass; import org.aspectj.testing.XMLBasedAjcTestCase; -import org.aspectj.weaver.CrosscuttingMembers; -import org.aspectj.weaver.ReferenceType; -import org.aspectj.weaver.ResolvedMember; -import org.aspectj.weaver.ResolvedType; import org.aspectj.weaver.TypeFactory; -import org.aspectj.weaver.TypeVariable; import org.aspectj.weaver.UnresolvedType; -import org.aspectj.weaver.World; -import org.aspectj.weaver.bcel.BcelWorld; /** * @author Andy Clement */ public class Ajc170Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testTransientTjpFields()throws Exception { + runTest("transient tjp fields"); + JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "Code"); + Field[] fs = jc.getFields(); + //private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic] + //private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic] + for (Field f: fs) { + if (!f.isTransient()) { + fail("Field should be transient: "+f); + } + } + } + public void testGenericsWithTwoTypeParamsOneWildcard() { UnresolvedType ut; diff --git a/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml b/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml index 8a6c34c53..314ff1c6d 100644 --- a/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml +++ b/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml @@ -2,6 +2,11 @@ <suite> + <ajc-test dir="bugs170/transientTjpFields" title="transient tjp fields"> + <compile files="Code.java" options="-Xset:makeTjpFieldsTransient=true"> + </compile> + </ajc-test> + <ajc-test dir="bugs170/language" title="perthis"> <compile files="PerThis.java" options="-1.7"> </compile> |