summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2006-10-12 19:58:09 +0000
committeraclement <aclement>2006-10-12 19:58:09 +0000
commite6a707af677f170f3dbf41081f6ff296b90437d1 (patch)
treefba0b4487b2ff98d9df0864aaa882f4ead167684 /tests
parentf80ae0089b2a8f57653348b76ef1b7f89aebf2ef (diff)
downloadaspectj-e6a707af677f170f3dbf41081f6ff296b90437d1.tar.gz
aspectj-e6a707af677f170f3dbf41081f6ff296b90437d1.zip
test and fix for 160674: simpler strategy for loading bytecode on SAPBEFORE_133532
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs153/pr160674/MyAspect.java12
-rw-r--r--tests/bugs153/pr160674/MyClass.java12
-rw-r--r--tests/bugs153/pr160674/aop.xml7
-rw-r--r--tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc153/ajc153.xml22
5 files changed, 54 insertions, 0 deletions
diff --git a/tests/bugs153/pr160674/MyAspect.java b/tests/bugs153/pr160674/MyAspect.java
new file mode 100644
index 000000000..cbad3a906
--- /dev/null
+++ b/tests/bugs153/pr160674/MyAspect.java
@@ -0,0 +1,12 @@
+package a;
+
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class MyAspect {
+ //before(): call(* print(..)) {
+ @Before("call(* print(..))")
+ public void m() {
+ System.out.println("advice running");
+ }
+}
diff --git a/tests/bugs153/pr160674/MyClass.java b/tests/bugs153/pr160674/MyClass.java
new file mode 100644
index 000000000..5909e4169
--- /dev/null
+++ b/tests/bugs153/pr160674/MyClass.java
@@ -0,0 +1,12 @@
+package a;
+
+public class MyClass {
+ public static void main(String []argv) {
+ new MyClass().print("hello");
+ new MyClass().print("world");
+ }
+
+ public void print(String msg) {
+ System.out.println(msg);
+ }
+}
diff --git a/tests/bugs153/pr160674/aop.xml b/tests/bugs153/pr160674/aop.xml
new file mode 100644
index 000000000..ee28eae0f
--- /dev/null
+++ b/tests/bugs153/pr160674/aop.xml
@@ -0,0 +1,7 @@
+<aspectj>
+ <weaver options="-Xset:bcelRepositoryCaching=false -verbose">
+ </weaver>
+ <aspects>
+ <aspect name="a.MyAspect"/>
+ </aspects>
+</aspectj>
diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
index e1838f627..88435cf39 100644
--- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
@@ -28,6 +28,7 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// public void testCFlowXMLAspectLTW_pr149096() { runTest("cflow xml concrete aspect"); }
// public void testAmbiguousBinding_pr121805() { runTest("ambiguous binding");}
// public void testNegatedAnnotationMatchingProblem_pr153464() { runTest("negated annotation matching problem");}
+ public void testTurningOffBcelCaching_pr160674() { runTest("turning off bcel caching");}
public void testNoIllegalStateExceptionWithGenericInnerAspect_pr156058() { runTest("no IllegalStateException with generic inner aspect"); }
public void testNoIllegalStateExceptionWithGenericInnerAspect_pr156058_2() { runTest("no IllegalStateException with generic inner aspect - 2"); }
public void testDeclareMethodAnnotations_pr159143() { runTest("declare method annotations");}
diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
index a6ddc8ec8..27b7effc1 100644
--- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
+++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
@@ -117,6 +117,28 @@
</run>
</ajc-test>
+ <ajc-test dir="bugs153/pr160674" title="turning off bcel caching">
+ <compile files="MyClass.java" options="-1.5"/>
+ <compile files="MyAspect.java" options="-1.5 -Xlint:ignore"/>
+ <run class="a.MyClass" ltw="aop.xml">
+ <stdout>
+ <line text="advice running"/>
+ <line text="hello"/>
+ <line text="advice running"/>
+ <line text="world"/>
+ </stdout>
+ <stderr>
+ <line text="info AspectJ Weaver Version"/>
+ <line text="info register classloader"/>
+ <line text="info using"/>
+ <line text="info register aspect"/>
+ <line text="info [bcelRepositoryCaching=false] AspectJ will not"/>
+ <line text="info processing"/>
+ <line text="info successfully"/>
+ </stderr>
+ </run>
+ </ajc-test>
+
<ajc-test dir="bugs153/pr153380/case1" title="pipelining decps">
<compile files="Ann.java,Base.java,BaseImpl.java,I1.java,Mixin.java,Runner.java,X.aj" options="-1.5">
<message kind="error" line="1" text="The import java.lang.retention cannot be resolved"/>