diff options
author | Andy Clement <aclement@pivotal.io> | 2020-04-20 16:24:02 -0700 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2020-04-20 16:24:02 -0700 |
commit | 4471ba76ac755b504d99e514a1cf5a375e7d02d1 (patch) | |
tree | 5f8d4f4dfb79d72f6c344294a319b0b04b01e2ae /tests/src/test/java/org | |
parent | 17026e35243f229c2e3c07c292f2caaac65503a4 (diff) | |
download | aspectj-4471ba76ac755b504d99e514a1cf5a375e7d02d1.tar.gz aspectj-4471ba76ac755b504d99e514a1cf5a375e7d02d1.zip |
Include JDTCore for Java14
Diffstat (limited to 'tests/src/test/java/org')
11 files changed, 584 insertions, 417 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/AllTests19.java b/tests/src/test/java/org/aspectj/systemtest/AllTests19.java index eeff00b31..20ecc3894 100644 --- a/tests/src/test/java/org/aspectj/systemtest/AllTests19.java +++ b/tests/src/test/java/org/aspectj/systemtest/AllTests19.java @@ -12,6 +12,7 @@ import org.aspectj.systemtest.ajc191.AllTestsAspectJ191; import org.aspectj.systemtest.ajc192.AllTestsAspectJ192; import org.aspectj.systemtest.ajc193.AllTestsAspectJ193; import org.aspectj.systemtest.ajc195.AllTestsAspectJ195; +import org.aspectj.systemtest.ajc196.AllTestsAspectJ196; import junit.framework.Test; import junit.framework.TestSuite; @@ -30,6 +31,7 @@ public class AllTests19 { suite.addTest(AllTestsAspectJ193.suite()); // there were no new tests for 1.9.4 suite.addTest(AllTestsAspectJ195.suite()); + suite.addTest(AllTestsAspectJ196.suite()); suite.addTest(AllTests18.suite()); // $JUnit-END$ return suite; diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc193/AllTestsAspectJ193.java b/tests/src/test/java/org/aspectj/systemtest/ajc193/AllTestsAspectJ193.java index f40e44805..7f941a3d3 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc193/AllTestsAspectJ193.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc193/AllTestsAspectJ193.java @@ -18,7 +18,7 @@ public class AllTestsAspectJ193 { public static Test suite() { TestSuite suite = new TestSuite("AspectJ 1.9.3 tests"); suite.addTest(Ajc193Tests.suite()); - suite.addTest(Java13Tests.suite()); + // suite.addTest(Java13Tests.suite()); return suite; } } diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc193/Java13Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc193/Java13Tests.java index 3b007963f..c6a32bcc8 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc193/Java13Tests.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc193/Java13Tests.java @@ -7,7 +7,6 @@ *******************************************************************************/ package org.aspectj.systemtest.ajc193; -import org.aspectj.apache.bcel.Constants; import org.aspectj.testing.XMLBasedAjcTestCase; import org.aspectj.testing.XMLBasedAjcTestCaseForJava13OrLater; @@ -18,20 +17,6 @@ import junit.framework.Test; */ public class Java13Tests extends XMLBasedAjcTestCaseForJava13OrLater { - public void testSwitch1() { - runTest("switch 1"); - checkVersion("Switch1", Constants.MAJOR_13, Constants.PREVIEW_MINOR_VERSION); - } - - public void testSwitch2() { - runTest("switch 2"); - checkVersion("Switch2", Constants.MAJOR_13, Constants.PREVIEW_MINOR_VERSION); - } - - public void testSwitch3() { - runTest("switch 3"); - checkVersion("Switch3", Constants.MAJOR_13, Constants.PREVIEW_MINOR_VERSION); - } // --- public static Test suite() { diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java index 338ca47e9..e629d504b 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc195/Ajc195Tests.java @@ -32,13 +32,6 @@ public class Ajc195Tests extends XMLBasedAjcTestCase { runTest("around finally blocks and unlinking"); } - public void testTextBlock1() { - runTest("textblock 1"); - } - - public void testTextBlock2() { - runTest("textblock 2"); - } // --- diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java b/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java index 8a714a606..f8a95a28a 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc195/AllTestsAspectJ195.java @@ -16,7 +16,7 @@ import junit.framework.TestSuite; public class AllTestsAspectJ195 { public static Test suite() { - TestSuite suite = new TestSuite("AspectJ 1.9.4 tests"); + TestSuite suite = new TestSuite("AspectJ 1.9.5 tests"); suite.addTest(Ajc195Tests.suite()); suite.addTest(SanityTestsJava13.suite()); return suite; diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc196/Ajc196Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc196/Ajc196Tests.java new file mode 100644 index 000000000..d1c7c2ced --- /dev/null +++ b/tests/src/test/java/org/aspectj/systemtest/ajc196/Ajc196Tests.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright (c) 2020 Contributors + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.aspectj.systemtest.ajc196; + +import org.aspectj.apache.bcel.Constants; +import org.aspectj.testing.XMLBasedAjcTestCase; +import org.aspectj.testing.XMLBasedAjcTestCaseForJava14OrLater; + +import junit.framework.Test; + +/** + * @author Andy Clement + */ +public class Ajc196Tests extends XMLBasedAjcTestCaseForJava14OrLater { + + public void testRecords() { + runTest("simple record"); + checkVersion("Person", Constants.MAJOR_14, Constants.PREVIEW_MINOR_VERSION); + } + + public void testRecords2() { + runTest("using a record"); + } + + public void testInstanceofPatterns() { + runTest("instanceof patterns"); + } + + public void testAdvisingRecords() { + runTest("advising records"); + } + + public void testSwitch1() { + runTest("switch 1"); + checkVersion("Switch1", Constants.MAJOR_14, 0); + } + + public void testSwitch2() { + runTest("switch 2"); + checkVersion("Switch2", Constants.MAJOR_14, 0); + } + + public void testSwitch3() { + runTest("switch 3"); + checkVersion("Switch3", Constants.MAJOR_14, 0); + } + + public void testTextBlock1() { + runTest("textblock 1"); + } + + public void testTextBlock2() { + runTest("textblock 2"); + } + // --- + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(Ajc196Tests.class); + } + + @Override + protected java.net.URL getSpecFile() { + return getClassResource("ajc196.xml"); + } + +} diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java b/tests/src/test/java/org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java new file mode 100644 index 000000000..1c8e725f0 --- /dev/null +++ b/tests/src/test/java/org/aspectj/systemtest/ajc196/AllTestsAspectJ196.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2020 Contributors + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.aspectj.systemtest.ajc196; + +import junit.framework.Test; +import junit.framework.TestSuite; + +/** + * @author Andy Clement + */ +public class AllTestsAspectJ196 { + + public static Test suite() { + TestSuite suite = new TestSuite("AspectJ 1.9.6 tests"); + suite.addTest(Ajc196Tests.suite()); + suite.addTest(SanityTestsJava14.suite()); + return suite; + } +} diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java b/tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java new file mode 100644 index 000000000..edf08298c --- /dev/null +++ b/tests/src/test/java/org/aspectj/systemtest/ajc196/SanityTestsJava14.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright (c) 2020 Contributors + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.aspectj.systemtest.ajc196; + +import org.aspectj.testing.XMLBasedAjcTestCase; +import org.aspectj.testing.XMLBasedAjcTestCaseForJava14OrLater; + +import junit.framework.Test; + +/* + * Some very trivial tests that help verify things are OK. + * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -10 option + * to check code generation and modification with that version specified. + * + * @author Andy Clement + */ +public class SanityTestsJava14 extends XMLBasedAjcTestCaseForJava14OrLater { + + public static final int bytecode_version_for_JDK_level = 58; + + // Incredibly trivial test programs that check the compiler works at all (these are easy-ish to debug) + public void testSimpleJava_A() { + runTest("simple - a"); + } + + public void testSimpleJava_B() { + runTest("simple - b"); + } + + public void testSimpleCode_C() { + runTest("simple - c"); + } + + public void testSimpleCode_D() { + runTest("simple - d"); + } + + public void testSimpleCode_E() { + runTest("simple - e"); + } + + public void testSimpleCode_F() { + runTest("simple - f"); + } + + public void testSimpleCode_G() { + runTest("simple - g"); + } + + public void testSimpleCode_H() { + runTest("simple - h", true); + } + + public void testSimpleCode_I() { + runTest("simple - i"); + } + + public void testVersionCorrect1() throws ClassNotFoundException { + runTest("simple - j"); + checkVersion("A", bytecode_version_for_JDK_level, 0); + } + + public void testVersionCorrect2() throws ClassNotFoundException { + runTest("simple - k"); + checkVersion("A", bytecode_version_for_JDK_level, 0); + } + + public void testVersionCorrect4() throws ClassNotFoundException { // check it is 49.0 when -1.5 is specified + runTest("simple - m"); + checkVersion("A", 49, 0); + } + + + // /////////////////////////////////////// + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(SanityTestsJava14.class); + } + + @Override + protected java.net.URL getSpecFile() { + return getClassResource("sanity-tests-14.xml"); + } + +} diff --git a/tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java b/tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java index edfd9ad71..c46708feb 100644 --- a/tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java +++ b/tests/src/test/java/org/aspectj/systemtest/java14/Java14Tests.java @@ -4,8 +4,8 @@ * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * + * http://www.eclipse.org/legal/epl-v10.html + * * ******************************************************************/ package org.aspectj.systemtest.java14; @@ -16,109 +16,110 @@ import junit.framework.Test; public class Java14Tests extends org.aspectj.testing.XMLBasedAjcTestCase { - public static Test suite() { - return XMLBasedAjcTestCase.loadSuite(Java14Tests.class); - } - - protected java.net.URL getSpecFile() { - return getClassResource("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(){ - if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 006 not >=1.4");return;} - runTest("compiling asserts in methods"); - } - - public void test007(){ - if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 007 not >=1.4");return;} - runTest("asserts"); - } - - public void test008(){ - if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 008 not >=1.4");return;} - 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(){ - if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 012 not >=1.4");return;} - runTest("assert tests in introduction [requires 1.4]"); - } - - public void test013(){ - runTest("various forms of package name pattern matching work"); - } - - public void test014(){ - if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 014 not >=1.4");return;} - runTest("assert statement in advice coverage [requires 1.4]"); - } - - public void test015(){ - if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 015 not >=1.4");return;} - runTest("assert statement in advice [requires 1.4]"); - } - - public void test016(){ - if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 016 not >=1.4");return;} - runTest("assert and pertarget crashes compiler"); - } - - public void test017(){ - if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 017 not >=1.4");return;} - 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(){ - if (!LangUtil.is14VMOrGreater()) { System.err.println("Skipping test 021 not >=1.4");return;} - runTest("Class Literals as non final fields (also assert, and this$0)"); - } + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(Java14Tests.class); + } + + @Override + protected java.net.URL getSpecFile() { + return getClassResource("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(){ + if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 006 not >=1.4");return;} + runTest("compiling asserts in methods"); + } + + public void test007(){ + if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 007 not >=1.4");return;} + runTest("asserts"); + } + + public void test008(){ + if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 008 not >=1.4");return;} + 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(){ + if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 012 not >=1.4");return;} + runTest("assert tests in introduction [requires 1.4]"); + } + + public void test013(){ + runTest("various forms of package name pattern matching work"); + } + + public void test014(){ + if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 014 not >=1.4");return;} + runTest("assert statement in advice coverage [requires 1.4]"); + } + + public void test015(){ + if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 015 not >=1.4");return;} + runTest("assert statement in advice [requires 1.4]"); + } + + public void test016(){ + if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 016 not >=1.4");return;} + runTest("assert and pertarget crashes compiler"); + } + + public void test017(){ + if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 017 not >=1.4");return;} + 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(){ + if (!LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping test 021 not >=1.4");return;} + runTest("Class Literals as non final fields (also assert, and this$0)"); + } } diff --git a/tests/src/test/java/org/aspectj/systemtest/pre10x/AjcPre10xTests.java b/tests/src/test/java/org/aspectj/systemtest/pre10x/AjcPre10xTests.java index e82c91349..38f9ae97b 100644 --- a/tests/src/test/java/org/aspectj/systemtest/pre10x/AjcPre10xTests.java +++ b/tests/src/test/java/org/aspectj/systemtest/pre10x/AjcPre10xTests.java @@ -4,8 +4,8 @@ * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * + * http://www.eclipse.org/legal/epl-v10.html + * * ******************************************************************/ package org.aspectj.systemtest.pre10x; @@ -15,302 +15,304 @@ import junit.framework.Test; public class AjcPre10xTests extends org.aspectj.testing.XMLBasedAjcTestCase { - public static Test suite() { - return XMLBasedAjcTestCase.loadSuite(AjcPre10xTests.class); - } + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(AjcPre10xTests.class); + } - protected java.net.URL getSpecFile() { - return getClassResource("pre10x.xml"); - } + @Override + protected java.net.URL getSpecFile() { + return getClassResource("pre10x.xml"); + } - public void test001(){ - runTest("Using 'aspect' as identifier is legal TODO"); - } + public void test001(){ + runTest("Using 'aspect' as identifier is legal TODO"); + } - public void test002(){ - runTest("Using 'pointcut' as identifier is legal TODO"); - } + public void test002(){ + runTest("Using 'pointcut' as identifier is legal TODO"); + } - public void test003(){ - runTest("CF expected when enclosing class superclass used as this qualifier in inner class"); - } + public void test003(){ + runTest("CF expected when enclosing class superclass used as this qualifier in inner class"); + } - public void test004(){ - runTest("enclosing class may be used as this qualifier in inner class"); - } + public void test004(){ + runTest("enclosing class may be used as this qualifier in inner class"); + } - public void test005(){ - runTest("reasonable error for crosscut reference with no formals specified"); - } + public void test005(){ + runTest("reasonable error for crosscut reference with no formals specified"); + } - public void test006(){ - runTest("reasonable error for introduction on type whose source isn't found"); - } + public void test006(){ + runTest("reasonable error for introduction on type whose source isn't found"); + } - public void test007(){ - runTest("handle errors in crosscut designators, insist that they end with a semicolon"); - } + public void test007(){ + runTest("handle errors in crosscut designators, insist that they end with a semicolon"); + } - public void test008(){ - runTest("try to return from a before, after, after throwing and after returning"); - } + public void test008(){ + runTest("try to return from a before, after, after throwing and after returning"); + } - public void test009(){ - runTest("the designator has a wildcard for method name but no return type specified"); - } + public void test009(){ + runTest("the designator has a wildcard for method name but no return type specified"); + } - public void test010(){ - runTest("the designator for the introduction has no type after the | charcter"); - } + public void test010(){ + runTest("the designator for the introduction has no type after the | charcter"); + } - public void test011(){ - runTest("crosscut signature does not match"); - } + public void test011(){ + runTest("crosscut signature does not match"); + } - public void test012(){ - runTest("proper exit conditions when errors fall through to javac"); - } + public void test012(){ + runTest("proper exit conditions when errors fall through to javac"); + } - public void test013(){ - runTest("mismatched parens on advice (wasn't binding Tester)"); - } + public void test013(){ + runTest("mismatched parens on advice (wasn't binding Tester)"); + } + + public void test014(){ + runTest("Non-static advice silently ignored"); + } + + public void test015(){ + runTest("extra closing brace"); + } + + public void test016(){ + runTest("decent errors for around return type not matching target point"); + } + + public void test017(){ + runTest("eachobject: can't call new on an aspect of"); + } + + public void test018(){ + runTest("eachobject: only zero-argument constructors allowed in an aspect"); + } + + public void test019(){ + runTest("eachobject: can't extend a concrete aspect"); + } + + public void test020(){ + runTest("instanceof used without a class"); + } + + public void test021(){ + runTest("wildcard used for returns clause"); + } + + public void test022(){ + runTest("no return statement in around advice"); + } + + public void test023(){ + runTest("inner aspects must be static (no longer matches PR#286)"); + } + + public void test024(){ + runTest("Casting class declarations as interfaces"); + } + + public void test025(){ + runTest("omits a variable name and crashes with a null pointer"); + } + + public void test026(){ + runTest("Not generating an error for using new as a method name"); + } + + public void test027(){ + runTest("ClassCastException on the int literal"); + } + + public void test028(){ + runTest("Wrong strictfp keyword usage in interface function prototype [TODO: move to errors]"); + } + + public void test029(){ + runTest("Wrong strictfp keyword usage in field declaration [TODO: move to errors]"); + } + + public void test030(){ + runTest("Wrong strictfp keyword usage in constructor declaration [TODO: move to errors]"); + } + + public void test031(){ + runTest("Incorrect static casts to primitively foldable arguments should not crash the compiler."); + } + + public void test032(){ + runTest("Dominates with commas should signal an error."); + } + + public void test033(){ + runTest("stack overflow with recursive crosscut specifier"); + } + + public void test034(){ + runTest("Throwing a NullPointerException when formals can't be bound in named pointcut"); + } + + public void test035(){ + runTest("disallow defining more than one pointcut with the same name"); + } + + // With intro of record in Java14 the error messages here change + // public void test036(){ + // runTest("pre 0.7 introduction form outside aspect body causes an EmptyStackException"); + // } + // + // public void test037(){ + // runTest("a class can't extend an aspect"); + // } + // + // public void test038(){ + // runTest("a before() clause at the class-level causes an EmptyStackException"); + // } + // + // public void test039(){ + // runTest("an after() clause at the class-level causes an EmptyStackException"); + // } + // + // public void test040(){ + // runTest("an around() clause at the class-level causes an EmptyStackException"); + // } + + public void test041(){ + runTest("Doesn't detect cyclic inheritance of aspects."); + } + + public void test042(){ + runTest("Binds the pointcut formals to member variables instead of pointcut formals."); + } + + public void test043(){ + runTest("ambiguous formal in formals pattern"); + } + + public void test044(){ + runTest("good error for field name instead of type name"); + } + + public void test045(){ + runTest("errors in aspect inheritance - 1"); + } + + public void test046(){ + runTest("errors in aspect inheritance - 2"); + } + + public void test047(){ + runTest("errors in aspect inheritance - 3"); + } + + public void test048(){ + runTest("errors in aspect inheritance - 4"); + } + + public void test049(){ + runTest("circular dominates leading to irresolvable advice precedence"); + } + + public void test050(){ + runTest("Should issue an error for using 'class' instead of 'aspect'"); + } + + public void test051(){ + runTest("Should signal an error when we need an exposed value but don't provide it"); + } + + public void test052(){ + runTest("StackOverFlowException with circular +implements's."); + } + + public void test053(){ + runTest("Introducing protected methods is causing a crash"); + } + + public void test054(){ + runTest("Introducing protected fields is causing a crash"); + } + + public void test055(){ + runTest("two classes with the same fully-qualified names [eachjvm]"); + } + + public void test056(){ + runTest("Undefined pointcuts were throwing exceptions in 07b11 [callsto]"); + } + + public void test057(){ + runTest("advice on abstract pointcuts"); + } + + public void test058(){ + runTest("Whoops, I forgot to put a class in the field access PCD."); + } + + public void test059(){ + runTest("the arounds return something but there is no returns statement"); + } + + public void test060(){ + runTest("multiple conflicting introductions"); + } + + public void test061(){ + runTest("referencing non-static pointcuts in outer aspects"); + } + + public void test062(){ + runTest("javac correct compiler error if there is no return in around returning result"); + } + + public void test063(){ + runTest("should give an error for introducing two members with the same name"); + } + + public void test064(){ + runTest("wimpy test for undeclared and uncaught exceptions"); + } + + public void test065(){ + runTest("Given non-matching TypePattern, CE flags use of non-introduced method rather than failure to introduce"); + } - public void test014(){ - runTest("Non-static advice silently ignored"); - } + public void test066(){ + runTest("Compiler should suggest using aspect when advice, pointcuts, or introduction is in a class"); + } - public void test015(){ - runTest("extra closing brace"); - } + public void test067(){ + runTest("declare error working with pointcut and-not (amp,amp,bang)"); + } - public void test016(){ - runTest("decent errors for around return type not matching target point"); - } + public void test068(){ + runTest("aspect as member of interface (private and protected)"); + } - public void test017(){ - runTest("eachobject: can't call new on an aspect of"); - } + public void test069(){ + runTest("introduced inner interfaces - compile should fail to bind interface name outside of Aspect or if implementing method is not public"); + } - public void test018(){ - runTest("eachobject: only zero-argument constructors allowed in an aspect"); - } + public void test070(){ + runTest("aspects may not implement Serializable or Cloneable"); + } - public void test019(){ - runTest("eachobject: can't extend a concrete aspect"); - } + public void test071(){ + runTest("explicit constructor calls can throw exceptions"); + } - public void test020(){ - runTest("instanceof used without a class"); - } - - public void test021(){ - runTest("wildcard used for returns clause"); - } - - public void test022(){ - runTest("no return statement in around advice"); - } - - public void test023(){ - runTest("inner aspects must be static (no longer matches PR#286)"); - } - - public void test024(){ - runTest("Casting class declarations as interfaces"); - } - - public void test025(){ - runTest("omits a variable name and crashes with a null pointer"); - } - - public void test026(){ - runTest("Not generating an error for using new as a method name"); - } - - public void test027(){ - runTest("ClassCastException on the int literal"); - } - - public void test028(){ - runTest("Wrong strictfp keyword usage in interface function prototype [TODO: move to errors]"); - } - - public void test029(){ - runTest("Wrong strictfp keyword usage in field declaration [TODO: move to errors]"); - } - - public void test030(){ - runTest("Wrong strictfp keyword usage in constructor declaration [TODO: move to errors]"); - } - - public void test031(){ - runTest("Incorrect static casts to primitively foldable arguments should not crash the compiler."); - } - - public void test032(){ - runTest("Dominates with commas should signal an error."); - } - - public void test033(){ - runTest("stack overflow with recursive crosscut specifier"); - } - - public void test034(){ - runTest("Throwing a NullPointerException when formals can't be bound in named pointcut"); - } - - public void test035(){ - runTest("disallow defining more than one pointcut with the same name"); - } - - public void test036(){ - runTest("pre 0.7 introduction form outside aspect body causes an EmptyStackException"); - } - - public void test037(){ - runTest("a class can't extend an aspect"); - } - - public void test038(){ - runTest("a before() clause at the class-level causes an EmptyStackException"); - } - - public void test039(){ - runTest("an after() clause at the class-level causes an EmptyStackException"); - } - - public void test040(){ - runTest("an around() clause at the class-level causes an EmptyStackException"); - } - - public void test041(){ - runTest("Doesn't detect cyclic inheritance of aspects."); - } - - public void test042(){ - runTest("Binds the pointcut formals to member variables instead of pointcut formals."); - } - - public void test043(){ - runTest("ambiguous formal in formals pattern"); - } - - public void test044(){ - runTest("good error for field name instead of type name"); - } - - public void test045(){ - runTest("errors in aspect inheritance - 1"); - } - - public void test046(){ - runTest("errors in aspect inheritance - 2"); - } - - public void test047(){ - runTest("errors in aspect inheritance - 3"); - } - - public void test048(){ - runTest("errors in aspect inheritance - 4"); - } - - public void test049(){ - runTest("circular dominates leading to irresolvable advice precedence"); - } - - public void test050(){ - runTest("Should issue an error for using 'class' instead of 'aspect'"); - } - - public void test051(){ - runTest("Should signal an error when we need an exposed value but don't provide it"); - } - - public void test052(){ - runTest("StackOverFlowException with circular +implements's."); - } - - public void test053(){ - runTest("Introducing protected methods is causing a crash"); - } - - public void test054(){ - runTest("Introducing protected fields is causing a crash"); - } - - public void test055(){ - runTest("two classes with the same fully-qualified names [eachjvm]"); - } - - public void test056(){ - runTest("Undefined pointcuts were throwing exceptions in 07b11 [callsto]"); - } - - public void test057(){ - runTest("advice on abstract pointcuts"); - } - - public void test058(){ - runTest("Whoops, I forgot to put a class in the field access PCD."); - } - - public void test059(){ - runTest("the arounds return something but there is no returns statement"); - } - - public void test060(){ - runTest("multiple conflicting introductions"); - } - - public void test061(){ - runTest("referencing non-static pointcuts in outer aspects"); - } - - public void test062(){ - runTest("javac correct compiler error if there is no return in around returning result"); - } - - public void test063(){ - runTest("should give an error for introducing two members with the same name"); - } - - public void test064(){ - runTest("wimpy test for undeclared and uncaught exceptions"); - } - - public void test065(){ - runTest("Given non-matching TypePattern, CE flags use of non-introduced method rather than failure to introduce"); - } - - public void test066(){ - runTest("Compiler should suggest using aspect when advice, pointcuts, or introduction is in a class"); - } - - public void test067(){ - runTest("declare error working with pointcut and-not (amp,amp,bang)"); - } - - public void test068(){ - runTest("aspect as member of interface (private and protected)"); - } - - public void test069(){ - runTest("introduced inner interfaces - compile should fail to bind interface name outside of Aspect or if implementing method is not public"); - } - - public void test070(){ - runTest("aspects may not implement Serializable or Cloneable"); - } - - public void test071(){ - runTest("explicit constructor calls can throw exceptions"); - } - - public void test072(){ - runTest("bad proceed args good error messages"); - } + public void test072(){ + runTest("bad proceed args good error messages"); + } } diff --git a/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java b/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java index da75267b2..1232f3909 100644 --- a/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java +++ b/tests/src/test/java/org/aspectj/tests/TestsModuleTests.java @@ -9,14 +9,14 @@ import org.aspectj.util.LangUtil; /* ******************************************************************* * Copyright (c) 2005 Contributors. - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://eclipse.org/legal/epl-v10.html - * - * Contributors: - * Wes Isberg initial implementation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://eclipse.org/legal/epl-v10.html + * + * Contributors: + * Wes Isberg initial implementation * ******************************************************************/ import junit.framework.Test; @@ -30,14 +30,14 @@ public class TestsModuleTests extends TestCase { TestSuite suite = new TestSuite(name); // compiler tests, wrapped for JUnit if (LangUtil.is19VMOrGreater()) { - suite.addTest(AllTests19.suite()); + suite.addTest(AllTests19.suite()); } else if (LangUtil.is18VMOrGreater()) { - suite.addTest(AllTests18.suite()); + suite.addTest(AllTests18.suite()); } else if (LangUtil.is15VMOrGreater()) { // suite.addTest(AllTests15.suite()); suite.addTest(AllTests17.suite()); // there are currently (28/11/06) no tests specific to a 1.6/1.7 vm - so we can do - // this - } else if (LangUtil.is14VMOrGreater()) { + // this + } else if (LangUtil.is1dot4VMOrGreater()) { System.err.println("Skipping tests for 1.5"); // suite.addTest(TestUtil.skipTest("for 1.5")); suite.addTest(AllTests14.suite()); |