aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authoraclement <aclement>2011-12-15 01:25:35 +0000
committeraclement <aclement>2011-12-15 01:25:35 +0000
commit13475b2ce5f6ebdfd9656ca7a5b40c2d28d5c4d7 (patch)
tree07584131d2d34c33e6c302b59a838014bc04d644 /tests/src
parent3bffe3bda11e8cb06e4e32d5137825547b860ad7 (diff)
downloadaspectj-13475b2ce5f6ebdfd9656ca7a5b40c2d28d5c4d7.tar.gz
aspectj-13475b2ce5f6ebdfd9656ca7a5b40c2d28d5c4d7.zip
170 language tests
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java51
-rw-r--r--tests/src/org/aspectj/systemtest/ajc170/ajc170.xml65
2 files changed, 115 insertions, 1 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java b/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
index a7374e2fa..e065a4716 100644
--- a/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
@@ -21,10 +21,59 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
*/
public class Ajc170Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ // not specifying -1.7
+ public void testDiamond1() {
+ runTest("diamond 1");
+ }
+
+ public void testDiamond2() {
+ runTest("diamond 2");
+ }
+
+ public void testDiamondItd1() {
+ runTest("diamond itd 1");
+ }
+
+ public void testLiterals1() {
+ runTest("literals 1");
+ }
+
+ public void testLiterals2() {
+ runTest("literals 2");
+ }
+
+ public void testLiteralsItd1() {
+ runTest("literals itd 1");
+ }
+
+ public void testStringSwitch1() {
+ runTest("string switch 1");
+ }
+
+ public void testStringSwitch2() {
+ runTest("string switch 2");
+ }
+
+ public void testMultiCatch1() {
+ runTest("multi catch 1");
+ }
+
+ public void testMultiCatch2() {
+ runTest("multi catch 2");
+ }
+
+ public void testMultiCatchWithHandler1() {
+ runTest("multi catch with handler 1");
+ }
+
+ // public void testMultiCatchWithHandler2() {
+ // runTest("multi catch with handler 2");
+ // }
+
public void testSanity1() {
runTest("sanity 1");
}
-
+
public void testMissingImpl_363979() {
runTest("missing impl");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml b/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml
index a0822caaf..2b775c154 100644
--- a/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml
+++ b/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml
@@ -2,6 +2,71 @@
<suite>
+ <ajc-test dir="bugs170/language" title="diamond 1">
+ <compile files="Diamond.java" options="-1.5">
+ <message kind="error" line="11" text="'&lt;&gt;' operator is not allowed for source level below 1.7"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs170/language" title="diamond 2">
+ <compile files="Diamond.java" options="-1.7">
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs170/language" title="diamond itd 1">
+ <compile files="DiamondITD.java" options="-1.7">
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs170/language" title="literals 1">
+ <compile files="Literals.java" options="-1.5">
+ <message kind="error" line="8" text="Underscores can only be used with source level 1.7 or greater"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs170/language" title="literals 2">
+ <compile files="Literals.java" options="-1.7">
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs170/language" title="literals itd 1">
+ <compile files="LiteralsITD.java" options="-1.7">
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs170/language" title="string switch 1">
+ <compile files="StringSwitch.java" options="-1.5">
+ <message kind="error" line="9" text="Cannot switch on a value of type String for source level below 1.7. Only convertible int values or enum constants are permitted"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs170/language" title="string switch 2">
+ <compile files="StringSwitch.java" options="-1.7">
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs170/language" title="multi catch 1">
+ <compile files="MultiCatch.java" options="-1.5">
+ <message kind="error" line="6" text="Multi-catch parameters are not allowed for source level below 1.7"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs170/language" title="multi catch 2">
+ <compile files="MultiCatch.java" options="-1.7">
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs170/language" title="multi catch with handler 1">
+ <compile files="MultiCatchWithHandler.java" options="-1.7">
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs170/language" title="multi catch with handler 2">
+ <compile files="MultiCatchWithHandler2.java" options="-1.7">
+ </compile>
+ <run class="MultiCatchWithHandler2"></run>
+ </ajc-test>
+
<ajc-test dir="bugs170/sanity" title="sanity 1">
<compile files="DeclareAtType.java" options="-1.5">
</compile>