summaryrefslogtreecommitdiffstats
path: root/tests/src/org/aspectj/systemtest/java14
diff options
context:
space:
mode:
authoracolyer <acolyer>2004-08-04 12:04:41 +0000
committeracolyer <acolyer>2004-08-04 12:04:41 +0000
commit0f211e17cac9b031ab8d9115f9030b3e65d3927a (patch)
treecabe16f0e367daaa4b28685e09f5b0bcd55bb43d /tests/src/org/aspectj/systemtest/java14
parent9a051d348a240095e56ead5485c2dba8cf6ad4a7 (diff)
downloadaspectj-0f211e17cac9b031ab8d9115f9030b3e65d3927a.tar.gz
aspectj-0f211e17cac9b031ab8d9115f9030b3e65d3927a.zip
Spring cleaning in the test suite. Docs for AjcTestCase and XMLBasedAjcTestCase
added in docs dir.
Diffstat (limited to 'tests/src/org/aspectj/systemtest/java14')
-rw-r--r--tests/src/org/aspectj/systemtest/java14/Java14Tests.java115
-rw-r--r--tests/src/org/aspectj/systemtest/java14/java14-tests.xml153
-rw-r--r--tests/src/org/aspectj/systemtest/java14/java14.xml11
3 files changed, 279 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/java14/Java14Tests.java b/tests/src/org/aspectj/systemtest/java14/Java14Tests.java
new file mode 100644
index 000000000..8bedab1ec
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/java14/Java14Tests.java
@@ -0,0 +1,115 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * 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
+ *
+ * ******************************************************************/
+package org.aspectj.systemtest.java14;
+
+import java.io.File;
+import junit.framework.Test;
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+public class Java14Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(Java14Tests.class);
+ }
+
+ protected File getSpecFile() {
+ return new File("../tests/src/org/aspectj/systemtest/java14/java14.xml");
+ }
+
+
+ public void test001(){
+ runTest("assert flow");
+ }
+
+ public void test002(){
+ runTest("assert flow - 2");
+ }
+
+ public void test003(){
+ runTest("assert typing");
+ }
+
+// bug in eclipse compiler, moved to ajcTestsFailing.xml
+// public void test004(){
+// runTest("assert coverage tests [requires 1.4]");
+// }
+
+// bug in eclipse compiler, moved to ajcTestsFailing.xml
+// public void test005(){
+// runTest("assert coverage tests in one package [requires 1.4]");
+// }
+
+ public void test006(){
+ runTest("compiling asserts in methods");
+ }
+
+ public void test007(){
+ runTest("asserts");
+ }
+
+ public void test008(){
+ runTest("asserts in aspect and declared methods [requires 1.4]");
+ }
+
+ public void test009(){
+ runTest("Does the matrix coverage thing for the new method signatures");
+ }
+
+ public void test010(){
+ runTest("correct types of parameters at call-sites");
+ }
+
+ public void test011(){
+ runTest("target type matching with messy interface hierarchies");
+ }
+
+ public void test012(){
+ runTest("assert tests in introduction [requires 1.4]");
+ }
+
+ public void test013(){
+ runTest("various forms of package name pattern matching work");
+ }
+
+ public void test014(){
+ runTest("assert statement in advice coverage [requires 1.4]");
+ }
+
+ public void test015(){
+ runTest("assert statement in advice [requires 1.4]");
+ }
+
+ public void test016(){
+ runTest("assert and pertarget crashes compiler");
+ }
+
+ public void test017(){
+ runTest("testing that assert works like .class");
+ }
+
+ public void test018(){
+ runTest("JoinPoint Optimization when targetting 1.4");
+ }
+
+ public void test019(){
+ runTest("XLint warning for call PCD's using subtype of defining type (-1.4 -Xlint:ignore)");
+ }
+
+ public void test020(){
+ runTest("XLint warning for call PCD's using subtype of defining type (-1.4)");
+ }
+
+ public void test021(){
+ runTest("Class Literals as non final fields (also assert, and this$0)");
+ }
+
+
+}
+
diff --git a/tests/src/org/aspectj/systemtest/java14/java14-tests.xml b/tests/src/org/aspectj/systemtest/java14/java14-tests.xml
new file mode 100644
index 000000000..364c28e4f
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/java14/java14-tests.xml
@@ -0,0 +1,153 @@
+<!-- Java 1.4 Specific Tests -->
+
+ <ajc-test dir="pureJava" title="assert flow"
+ keywords="from-14tests,purejava">
+ <compile options="-source,1.4" files="AssertsCF.java">
+ <message kind="error" line="8"/>
+ <message kind="error" line="11"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="pureJava" title="assert flow - 2"
+ keywords="from-14tests,purejava">
+ <compile options="-source,1.4" files="AssertsCF2.java">
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="pureJava" title="assert typing"
+ keywords="from-14tests,purejava,fail-publicType">
+ <compile options="-source,1.4" files="AssertsCF1.java">
+ <message kind="error" line="5"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="pureJava" title="compiling asserts in methods"
+ keywords="from-14tests,purejava">
+ <compile options="-source,1.4" files="AssertInMethod.java"/>
+ <run class="AssertInMethod" vm="1.4"/>
+ </ajc-test>
+
+ <ajc-test dir="pureJava" title="asserts" keywords="from-14tests">
+ <compile options="-source,1.4" files="Asserts.java"/>
+ <run class="Asserts" vm="1.4"/>
+ </ajc-test>
+
+ <ajc-test dir="pureJava" pr="725"
+ title="asserts in aspect and declared methods [requires 1.4]"
+ keywords="from-14tests" comment="not pure java!">
+ <compile options="-source,1.4"
+ files="IntroducedAssertion.java"/>
+ <run class="IntroducedAssertion" vm="1.4"/>
+ </ajc-test>
+
+ <!-- This test case requires bytecode generated according to the declaring type
+ rules in JLS 2nd edition. -1.4 must be passed to the eclipse compiler for
+ this behavior. -->
+ <ajc-test dir="new"
+ title="Does the matrix coverage thing for the new method signatures"
+ keywords="from-resolved_10x">
+ <compile files="MethodSignatures.java" options="-1.4,-Xlint:ignore"/>
+ <run class="MethodSignatures" vm="1.4"/>
+ </ajc-test>
+
+ <!-- This test case requires bytecode generated according to the declaring type
+ rules in JLS 2nd edition. -1.4 must be passed to the eclipse compiler for
+ this behavior. -->
+ <ajc-test dir="new" title="correct types of parameters at call-sites"
+ keywords="from-resolved_10x">
+ <compile files="CallTypes.java" options="-1.4,-Xlint:ignore"/>
+ <run class="CallTypes" vm="1.4"/>
+ </ajc-test>
+
+ <!-- This test case requires bytecode generated according to the declaring type
+ rules in JLS 2nd edition. -1.4 must be passed to the eclipse compiler for
+ this behavior. That means that this case will only work under 1.4. -->
+ <ajc-test dir="new"
+ title="target type matching with messy interface hierarchies"
+ keywords="from-resolved_10x">
+ <compile files="CallTypesI.java" options="-1.4,-Xlint:ignore"/>
+ <run class="CallTypesI" vm="1.4"/>
+ </ajc-test>
+
+ <ajc-test dir="new" title="assert tests in introduction [requires 1.4]"
+ keywords="from-14tests,fail-unimplemented">
+ <compile options="-source,1.4" files="AssertInIntro.java"/>
+ <run class="AssertInIntro" vm="1.4"/>
+ </ajc-test>
+
+
+ <ajc-test dir="base/test131"
+ title="various forms of package name pattern matching work"
+ keywords="from-broken14usejavac">
+ <compile files="Driver.java,p1/C1.java,p1/p2/C2.java" />
+ <run class="Driver"/>
+ </ajc-test>
+
+ <ajc-test dir="new" pr="657"
+ title="assert statement in advice coverage [requires 1.4]"
+ keywords="from-14tests,fail-in-eclipse">
+ <compile options="-source,1.4" files="AssertInAdvice.java"/>
+ <run class="AssertInAdvice" vm="1.4"/>
+ </ajc-test>
+
+ <ajc-test dir="new" pr="657"
+ title="assert statement in advice [requires 1.4]"
+ keywords="from-14tests,fail-in-eclipse">
+ <compile options="-source,1.4" files="AssertInAdviceBug.java"/>
+ <run class="AssertInAdviceBug" vm="1.4"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs" pr="28703" title="assert and pertarget crashes compiler">
+ <compile files="EnsureOverriding.java" options="-source,1.4"/>
+ <run class="EnsureOverriding" vm="1.4"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs/interSpecials" title="testing that assert works like .class"
+ pr="36110">
+ <compile files="p1/C.java,p2/A2.java" options="-source,1.4"/>
+ <run class="p2.A2" vm="1.4"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs/jpOptimization"
+ pr="45441"
+ title="JoinPoint Optimization when targetting 1.4">
+ <compile
+ files="de/test/MyMain.java,
+ de/test/MyAspect.java"
+ options="-1.4"/>
+ <run class="de.test.MyMain"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs"
+ title="XLint warning for call PCD's using subtype of defining type (-1.4 -Xlint:ignore)"
+ pr="41952"
+ >
+ <compile
+ options="-Xlint:ignore,-1.4"
+ files="DeclaringTypeWarning.java" >
+ <message kind="warning" line="12"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs"
+ title="XLint warning for call PCD's using subtype of defining type (-1.4)"
+ pr="41952"
+ >
+ <compile
+ options="-1.4"
+ files="DeclaringTypeWarning.java" >
+ <message kind="warning" line="6" text="declaring type">
+ <source line="14" file="DeclaringTypeWarning.java"/>
+ </message>
+ <message kind="warning" line="12" text="declare warning">
+ <source line="19" file="DeclaringTypeWarning.java"/>
+ </message>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs" pr="39711"
+ title="Class Literals as non final fields (also assert, and this$0)">
+ <compile files="ClassLiteralField.java" options="-source,1.4"/>
+ <run vm="1.4" class="ClassLiteralField"/>
+ </ajc-test>
+ \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/java14/java14.xml b/tests/src/org/aspectj/systemtest/java14/java14.xml
new file mode 100644
index 000000000..c25b999cf
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/java14/java14.xml
@@ -0,0 +1,11 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[
+<!ENTITY tests SYSTEM "../tests/src/org/aspectj/systemtest/java14/java14-tests.xml">
+]>
+
+<!-- Tests requiring JDK 1.4 or above -->
+
+<suite>
+
+&tests;
+
+</suite>