summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-03-11 21:04:59 +0000
committerjhugunin <jhugunin>2003-03-11 21:04:59 +0000
commitd6b8b38cd0a707741788f8d4fae3850b213f50a4 (patch)
tree89d0af7f7012388a9b58aac2f1e0b5ce0b3e716d /tests
parentbb66774ab4a5afb36d36bc8274ff265f10d666db (diff)
downloadaspectj-d6b8b38cd0a707741788f8d4fae3850b213f50a4.tar.gz
aspectj-d6b8b38cd0a707741788f8d4fae3850b213f50a4.zip
added tests and fixes
fixed two bugs in ajcTestsFailing
Diffstat (limited to 'tests')
-rw-r--r--tests/ajcTests.xml20
-rw-r--r--tests/ajcTestsBroken.xml6
-rw-r--r--tests/ajcTestsFailing.xml26
-rw-r--r--tests/bugs/AspectInitError.java23
-rw-r--r--tests/bugs/ThisJoinPointAndVerifier.java28
-rw-r--r--tests/jimTests.xml21
6 files changed, 103 insertions, 21 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml
index 54261ece4..321afe3d9 100644
--- a/tests/ajcTests.xml
+++ b/tests/ajcTests.xml
@@ -5610,4 +5610,24 @@
<compile files="TransactionTest.java,sub/ExecutionMonitor.java,sub/ObserverProtocol.aj"/>
<run class="TransactionTest"/>
</ajc-test>
+
+ <ajc-test dir="bugs" pr="34210"
+ title="thisJoinPoint.getArgs() causes IncompatibleClassChangeError">
+ <compile files="ThisJoinPointAndVerifier.java"/>
+ <run class="ThisJoinPointAndVerifier"/>
+ </ajc-test>
+
+ <ajc-test dir="errors" keywords="error"
+ title="inter-type declaration of void field">
+ <compile files="VoidFieldDeclarationCE.java">
+ <message kind="error" line="7"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="binding"
+ title="no such constructor for proceed argument (error)">
+ <compile files="UnfoundConstructor.java">
+ <message kind="error" line="25"/>
+ </compile>
+ </ajc-test>
</suite>
diff --git a/tests/ajcTestsBroken.xml b/tests/ajcTestsBroken.xml
index 6fc14b27f..d919e26e4 100644
--- a/tests/ajcTestsBroken.xml
+++ b/tests/ajcTestsBroken.xml
@@ -67,5 +67,9 @@
</compile>
</ajc-test>
-
+ <ajc-test dir="bugs" pr="33948"
+ title="default constructor inter-type declaration">
+ <compile files="ConstructorDeclaration.java"/>
+ <run class="ConstructorDeclaration"/>
+ </ajc-test>
</suite>
diff --git a/tests/ajcTestsFailing.xml b/tests/ajcTestsFailing.xml
index 2073f0e7c..051196a60 100644
--- a/tests/ajcTestsFailing.xml
+++ b/tests/ajcTestsFailing.xml
@@ -52,19 +52,6 @@
</compile>
</ajc-test>
- <ajc-test dir="binding"
- title="no such constructor for proceed argument (error)">
- <compile files="UnfoundConstructor.java">
- <message kind="error" line="25"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="33948"
- title="default constructor inter-type declaration">
- <compile files="ConstructorDeclaration.java"/>
- <run class="ConstructorDeclaration"/>
- </ajc-test>
-
<ajc-test dir="errors" keywords="error"
title="class extending abstract aspect">
<compile files="ClassExtendingAbstractAspectCE.java">
@@ -72,13 +59,6 @@
</compile>
</ajc-test>
- <ajc-test dir="errors" keywords="error"
- title="inter-type declaration of void field">
- <compile files="VoidFieldDeclarationCE.java">
- <message kind="error" line="7"/>
- </compile>
- </ajc-test>
-
<ajc-test dir="incremental/stringliteral"
title="incrementally change string size and wire in injar classes">
<compile staging="true" options="-incremental"
@@ -104,4 +84,10 @@
before main packageOne.Main"/>
</ajc-test>
+ <ajc-test dir="bugs" pr="34206"
+ title="before():execution(new(..)) does not throw NoAspectBoundException">
+ <compile files="AspectInitError.java"/>
+ <run class="AspectInitError"/>
+ </ajc-test>
+
</suite>
diff --git a/tests/bugs/AspectInitError.java b/tests/bugs/AspectInitError.java
new file mode 100644
index 000000000..3a46b9c5a
--- /dev/null
+++ b/tests/bugs/AspectInitError.java
@@ -0,0 +1,23 @@
+
+
+/** Bugzilla Bug 34206
+ before():execution(new(..)) does not throw NoAspectBoundException */
+public class AspectInitError {
+ public static void main(String[] args) {
+ //Watchcall.aspectOf();
+ AspectInitError c = new AspectInitError();
+ }
+
+}
+
+aspect Watchcall {
+ pointcut myConstructor(): execution(new(..));
+
+ before(): myConstructor() {
+ System.err.println("Entering Constructor");
+ }
+
+ after(): myConstructor() {
+ System.err.println("Leaving Constructor");
+ }
+}
diff --git a/tests/bugs/ThisJoinPointAndVerifier.java b/tests/bugs/ThisJoinPointAndVerifier.java
new file mode 100644
index 000000000..a3b609c40
--- /dev/null
+++ b/tests/bugs/ThisJoinPointAndVerifier.java
@@ -0,0 +1,28 @@
+
+
+/** Bugzilla Bug 34210
+ thisJoinPoint.getArgs() causes IncompatibleClassChangeError */
+public class ThisJoinPointAndVerifier {
+ public void method() {
+ System.out.println("Executed method");
+ }
+ public static void main(String args[]) {
+ ThisJoinPointAndVerifier td = new ThisJoinPointAndVerifier();
+ td.method();
+ }
+}
+
+aspect Log1 {
+ pointcut logged_method() :
+ call(* ThisJoinPointAndVerifier.*(..));
+ after() : logged_method() {
+ Object[] args = thisJoinPoint.getArgs();
+ System.out.println ("Log1a: leaving " + thisJoinPoint.getSignature());
+ }
+ // comment this advice for scenario 2
+ after() : logged_method() {
+ //VM crash on scenario 1
+ //Object[] args = thisJoinPoint.getArgs();
+ System.out.println ("Log1b: leaving " + thisJoinPoint.getSignature());
+ }
+} \ No newline at end of file
diff --git a/tests/jimTests.xml b/tests/jimTests.xml
index e7e9b8b97..17db88e59 100644
--- a/tests/jimTests.xml
+++ b/tests/jimTests.xml
@@ -1,5 +1,26 @@
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">
<suite>
+ <ajc-test dir="new/declare" pr="31724"
+ title="omnibus declare warning context"
+ comment="XXX untested: no source context shown">
+ <compile files="DeclareWarning.java">
+ <message kind="warning" line="5"/>
+ <message kind="warning" line="12"/>
+ <message kind="warning" line="13"/>
+ <message kind="warning" line="14"/>
+ <message kind="warning" line="15"/>
+ <message kind="warning" line="16"/>
+ <message kind="warning" line="17"/>
+ <message kind="warning" line="18"/>
+ <message kind="warning" line="21"/>
+ <message kind="warning" line="22"/>
+ <message kind="warning" line="23"/>
+ <message kind="warning" line="33"/>
+ <message kind="warning" line="36"/>
+ <message kind="warning" line="39"/>
+ <message kind="warning" line="74"/>
+ </compile>
+ </ajc-test>
<!--