aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2006-04-06 11:45:02 +0000
committeraclement <aclement>2006-04-06 11:45:02 +0000
commit1a6f69583137f03d2a8052148a17eebe8e79e162 (patch)
tree7f500202f7254b3e2db306c7e826d87b800a8683 /tests
parent94d8b82fbf3cb18a14d77508b3adad6d50434080 (diff)
downloadaspectj-1a6f69583137f03d2a8052148a17eebe8e79e162.tar.gz
aspectj-1a6f69583137f03d2a8052148a17eebe8e79e162.zip
test and fix for 135001
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs152/pr135001/AbstractAspect.java9
-rw-r--r--tests/bugs152/pr135001/ConcreteAspect.java3
-rw-r--r--tests/bugs152/pr135001/Foo.java9
-rw-r--r--tests/src/org/aspectj/systemtest/AllTests15.java2
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java32
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/AllTestsAspectJ152.java25
-rw-r--r--tests/src/org/aspectj/systemtest/ajc152/ajc152.xml18
7 files changed, 98 insertions, 0 deletions
diff --git a/tests/bugs152/pr135001/AbstractAspect.java b/tests/bugs152/pr135001/AbstractAspect.java
new file mode 100644
index 000000000..6f4d57951
--- /dev/null
+++ b/tests/bugs152/pr135001/AbstractAspect.java
@@ -0,0 +1,9 @@
+public abstract aspect AbstractAspect {
+
+ abstract pointcut scope();
+
+ void around(): scope() {
+ System.err.println("In the advice!");
+ proceed();
+ }
+} \ No newline at end of file
diff --git a/tests/bugs152/pr135001/ConcreteAspect.java b/tests/bugs152/pr135001/ConcreteAspect.java
new file mode 100644
index 000000000..df6119758
--- /dev/null
+++ b/tests/bugs152/pr135001/ConcreteAspect.java
@@ -0,0 +1,3 @@
+public aspect ConcreteAspect extends AbstractAspect {
+ pointcut scope(): call(* foo(..));
+} \ No newline at end of file
diff --git a/tests/bugs152/pr135001/Foo.java b/tests/bugs152/pr135001/Foo.java
new file mode 100644
index 000000000..4a80ea394
--- /dev/null
+++ b/tests/bugs152/pr135001/Foo.java
@@ -0,0 +1,9 @@
+public class Foo {
+ public static void main(String[] args) {
+ new Foo().foo();
+ }
+
+ public void foo() {
+
+ }
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/AllTests15.java b/tests/src/org/aspectj/systemtest/AllTests15.java
index fec875785..8667d9686 100644
--- a/tests/src/org/aspectj/systemtest/AllTests15.java
+++ b/tests/src/org/aspectj/systemtest/AllTests15.java
@@ -9,6 +9,7 @@ import junit.framework.TestSuite;
import org.aspectj.systemtest.ajc150.AllTestsAspectJ150;
import org.aspectj.systemtest.ajc150.ataspectj.AtAjAnnotationGenTests;
import org.aspectj.systemtest.ajc151.AllTestsAspectJ151;
+import org.aspectj.systemtest.ajc152.AllTestsAspectJ152;
public class AllTests15 {
@@ -18,6 +19,7 @@ public class AllTests15 {
suite.addTest(AllTests14.suite());
suite.addTest(AllTestsAspectJ150.suite());
suite.addTest(AllTestsAspectJ151.suite());
+ suite.addTest(AllTestsAspectJ152.suite());
suite.addTest(AtAjAnnotationGenTests.suite());
//$JUnit-END$
return suite;
diff --git a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
new file mode 100644
index 000000000..18baacb7e
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * Andy Clement - initial API and implementation
+ *******************************************************************************/
+package org.aspectj.systemtest.ajc152;
+
+import java.io.File;
+import junit.framework.Test;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+public class Ajc152Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testAspectLibrariesAndASM_pr135001() { runTest("aspect libraries and asm");}
+
+
+ /////////////////////////////////////////
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(Ajc152Tests.class);
+ }
+
+ protected File getSpecFile() {
+ return new File("../tests/src/org/aspectj/systemtest/ajc152/ajc152.xml");
+ }
+
+
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc152/AllTestsAspectJ152.java b/tests/src/org/aspectj/systemtest/ajc152/AllTestsAspectJ152.java
new file mode 100644
index 000000000..82a3983e1
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc152/AllTestsAspectJ152.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * Andy Clement - initial API and implementation
+ *******************************************************************************/
+package org.aspectj.systemtest.ajc152;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTestsAspectJ152 {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("AspectJ 1.5.2 tests");
+ //$JUnit-BEGIN$
+ suite.addTest(Ajc152Tests.suite());
+ //$JUnit-END$
+ return suite;
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
new file mode 100644
index 000000000..75c8c07cf
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml
@@ -0,0 +1,18 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<!-- AspectJ v1.5.2 Tests -->
+<suite>
+
+ <ajc-test dir="bugs152/pr135001" title="aspect libraries and asm">
+ <compile files="AbstractAspect.java" outjar="lib.jar" options="-1.5"/>
+ <compile files="Foo.java,ConcreteAspect.java" classpath="lib.jar" options="-1.5 -showWeaveInfo">
+ <message kind="weave" text="Join point 'method-call(void Foo.foo())' in Type 'Foo' (Foo.java:3) advised by around advice from 'ConcreteAspect' (AbstractAspect.java:5)"/>
+ </compile>
+ <run class="Foo">
+ <stderr>
+ <line text="In the advice!"/>
+ </stderr>
+ </run>
+ </ajc-test>
+
+</suite> \ No newline at end of file