aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoravasseur <avasseur>2005-05-13 09:37:31 +0000
committeravasseur <avasseur>2005-05-13 09:37:31 +0000
commit0852d51f34460040aa3d3c60e47b7e0fe7b7633d (patch)
tree4b897ec6d3b3bba87b7c53643203ede5dda73fc7 /tests
parente8345b8759aebb52e5d56e216cb6634b6591fa54 (diff)
downloadaspectj-0852d51f34460040aa3d3c60e47b7e0fe7b7633d.tar.gz
aspectj-0852d51f34460040aa3d3c60e47b7e0fe7b7633d.zip
added test entries instead of autowiredtest for Andy sake, fix 1.4 dependancies in loadtime module and util module
Diffstat (limited to 'tests')
-rw-r--r--tests/java5/ataspectj/ataspectj/TestHelper.java2
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java18
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjMisuseTests.java38
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjSyntaxTests.java54
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml2
5 files changed, 103 insertions, 11 deletions
diff --git a/tests/java5/ataspectj/ataspectj/TestHelper.java b/tests/java5/ataspectj/ataspectj/TestHelper.java
index c1e75532d..10855a5db 100644
--- a/tests/java5/ataspectj/ataspectj/TestHelper.java
+++ b/tests/java5/ataspectj/ataspectj/TestHelper.java
@@ -18,7 +18,6 @@ import junit.framework.TestFailure;
import java.util.Enumeration;
-import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.AbortException;
import org.aspectj.weaver.loadtime.DefaultMessageHandler;
@@ -61,6 +60,7 @@ public class TestHelper extends DefaultMessageHandler {
} else {
// we do exit here since Assert.fail will only trigger a runtime exception that might
// be catched by the weaver anyway
+ System.err.println("*** Exiting - got a warning/fail/error/abort IMessage");
System.exit(-1);
}
return ret;
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java
index 0f820873e..a4ba644a3 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java
@@ -11,7 +11,7 @@
*******************************************************************************/
package org.aspectj.systemtest.ajc150.ataspectj;
-import org.aspectj.testing.AutowiredXMLBasedAjcTestCase;
+import org.aspectj.testing.XMLBasedAjcTestCase;
import junit.framework.Test;
import java.io.File;
@@ -19,13 +19,25 @@ import java.io.File;
/**
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
*/
-public class AtAjLTWTests extends AutowiredXMLBasedAjcTestCase {
+public class AtAjLTWTests extends XMLBasedAjcTestCase {
public static Test suite() {
- return AutowiredXMLBasedAjcTestCase.loadSuite(org.aspectj.systemtest.ajc150.ataspectj.AtAjLTWTests.class);
+ return XMLBasedAjcTestCase.loadSuite(org.aspectj.systemtest.ajc150.ataspectj.AtAjLTWTests.class);
}
protected File getSpecFile() {
return new File("../tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml");
}
+
+ public void testRunThemAllWithJavacCompiledAndLTW() {
+ runTest("RunThemAllWithJavacCompiledAndLTW");
+ }
+
+ public void testAjcLTWPerClauseTest_XnoWeave() {
+ runTest("AjcLTW PerClauseTest -XnoWeave");
+ }
+
+ public void testAjcLTWPerClauseTest_Xreweavable() {
+ runTest("AjcLTW PerClauseTest -Xreweavable");
+ }
}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjMisuseTests.java b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjMisuseTests.java
index 82bee5e63..318d60295 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjMisuseTests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjMisuseTests.java
@@ -14,18 +14,50 @@ import java.io.File;
import junit.framework.Test;
-import org.aspectj.testing.AutowiredXMLBasedAjcTestCase;
+import org.aspectj.testing.XMLBasedAjcTestCase;
/**
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
*/
-public class AtAjMisuseTests extends AutowiredXMLBasedAjcTestCase {
+public class AtAjMisuseTests extends XMLBasedAjcTestCase {
protected File getSpecFile() {
return new File("../tests/src/org/aspectj/systemtest/ajc150/ataspectj/misuse.xml");
}
public static Test suite() {
- return AutowiredXMLBasedAjcTestCase.loadSuite(AtAjMisuseTests.class);
+ return XMLBasedAjcTestCase.loadSuite(AtAjMisuseTests.class);
}
+
+ public void testQAspectClassExtendingQAspectClass() {
+ runTest("@Aspect class extending @Aspect class");
+ }
+
+ public void testClassWithQBeforeExtendingQAspectClass() {
+ runTest("class with @Before extending @Aspect class");
+ }
+
+ public void testQPointcutNotReturningVoid() {
+ runTest("@Pointcut not returning void");
+ }
+
+ public void testQPointcutWithGarbageString() {
+ runTest("@Pointcut with garbage string");
+ }
+
+ public void testQPointcutWithThrowsClause() {
+ runTest("@Pointcut with throws clause");
+ }
+
+ public void testQAfterReturningWithWrongNumberOfArgs() {
+ runTest("@AfterReturning with wrong number of args");
+ }
+
+ public void testQBeforeOnNon_publicMethod() {
+ runTest("@Before on non-public method");
+ }
+
+ public void testQBeforeOnMethodNotReturningVoid() {
+ runTest("@Before on method not returning void");
+ }
}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjSyntaxTests.java b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjSyntaxTests.java
index 7927a2675..a23806e06 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjSyntaxTests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjSyntaxTests.java
@@ -16,21 +16,69 @@ import java.io.File;
import junit.framework.Test;
import org.aspectj.testing.XMLBasedAjcTestCase;
-import org.aspectj.testing.AutowiredXMLBasedAjcTestCase;
/**
* A suite for @AspectJ aspects located in java5/ataspectj
*
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
*/
-public class AtAjSyntaxTests extends AutowiredXMLBasedAjcTestCase {
+public class AtAjSyntaxTests extends XMLBasedAjcTestCase {
public static Test suite() {
- return AutowiredXMLBasedAjcTestCase.loadSuite(AtAjSyntaxTests.class);
+ return XMLBasedAjcTestCase.loadSuite(AtAjSyntaxTests.class);
}
protected File getSpecFile() {
return new File("../tests/src/org/aspectj/systemtest/ajc150/ataspectj/syntax.xml");
}
+
+ public void testSimpleBefore() {
+ runTest("SimpleBefore");
+ }
+
+ public void testSimpleAfter() {
+ runTest("SimpleAfter");
+ }
+
+ public void testSingletonAspectBindings() {
+ runTest("singletonAspectBindings");
+ }
+
+ public void testCflowTest() {
+ runTest("CflowTest");
+ }
+
+ public void testPointcutReferenceTest() {
+ runTest("PointcutReferenceTest");
+ }
+
+ public void testXXJoinPointTest() {
+ runTest("XXJoinPointTest");
+ }
+
+ public void testPrecedenceTest() {
+ runTest("PrecedenceTest");
+ }
+
+ public void testAfterXTest() {
+ runTest("AfterXTest");
+ }
+
+ public void testBindingTest() {
+ runTest("BindingTest");
+ }
+
+ public void testBindingTestNoInline() {
+ runTest("BindingTest no inline");
+ }
+
+ public void testPerClause() {
+ runTest("PerClause");
+ }
+
+ public void testAroundInlineMunger() {
+ runTest("AroundInlineMunger");
+ }
+
} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml
index ae296871c..e44aef3f9 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml
@@ -2,7 +2,7 @@
<suite>
<ajc-test dir="java5/ataspectj" title="RunThemAllWithJavacCompiledAndLTW">
- <ant file="ajc-ant.xml" target="javac.ltw"/>
+ <ant file="ajc-ant.xml" target="javac.ltw" verbose="true"/>
</ajc-test>
<ajc-test dir="java5/ataspectj" title="AjcLTW PerClauseTest -XnoWeave">