From 0f211e17cac9b031ab8d9115f9030b3e65d3927a Mon Sep 17 00:00:00 2001 From: acolyer Date: Wed, 4 Aug 2004 12:04:41 +0000 Subject: Spring cleaning in the test suite. Docs for AjcTestCase and XMLBasedAjcTestCase added in docs dir. --- tests/src/org/aspectj/systemtest/AllTests.java | 55 + tests/src/org/aspectj/systemtest/AllTests14.java | 30 + .../org/aspectj/systemtest/ajc10x/Ajc10xTests.java | 1165 ++++++++++++ .../org/aspectj/systemtest/ajc10x/ajc10x-tests.xml | 2006 ++++++++++++++++++++ tests/src/org/aspectj/systemtest/ajc10x/ajc10x.xml | 9 + .../org/aspectj/systemtest/ajc11/Ajc11Tests.java | 480 +++++ .../org/aspectj/systemtest/ajc11/ajc11-tests.xml | 834 ++++++++ tests/src/org/aspectj/systemtest/ajc11/ajc11.xml | 10 + .../org/aspectj/systemtest/ajc120/Ajc120Tests.java | 244 +++ .../org/aspectj/systemtest/ajc120/ajc120-tests.xml | 478 +++++ tests/src/org/aspectj/systemtest/ajc120/ajc120.xml | 11 + .../org/aspectj/systemtest/ajc121/Ajc121Tests.java | 84 + .../org/aspectj/systemtest/ajc121/ajc121-tests.xml | 127 ++ tests/src/org/aspectj/systemtest/ajc121/ajc121.xml | 12 + .../systemtest/aspectpath/AspectPathTests.java | 116 ++ .../systemtest/aspectpath/aspectpath-tests.xml | 198 ++ .../aspectj/systemtest/aspectpath/aspectpath.xml | 12 + .../src/org/aspectj/systemtest/base/BaseTests.java | 188 ++ .../aspectj/systemtest/base/baseTests-tests.xml | 263 +++ .../src/org/aspectj/systemtest/base/baseTests.xml | 10 + .../org/aspectj/systemtest/design/DesignTests.java | 80 + tests/src/org/aspectj/systemtest/design/design.xml | 11 + .../org/aspectj/systemtest/design/designtest.xml | 94 + .../systemtest/incremental/IncrementalTests.java | 194 ++ .../incremental/incremental-junit-tests.xml | 197 ++ .../systemtest/incremental/incremental-tests.xml | 183 ++ .../aspectj/systemtest/incremental/incremental.xml | 10 + .../org/aspectj/systemtest/inpath/InPathTests.java | 96 + .../org/aspectj/systemtest/inpath/inpath-tests.xml | 296 +++ tests/src/org/aspectj/systemtest/inpath/inpath.xml | 11 + .../org/aspectj/systemtest/java14/Java14Tests.java | 115 ++ .../org/aspectj/systemtest/java14/java14-tests.xml | 153 ++ tests/src/org/aspectj/systemtest/java14/java14.xml | 11 + .../knownlimitations/KnownLimitationsTests.java | 144 ++ .../knownlimitations/knownLimitations-tests.xml | 297 +++ .../knownlimitations/knownLimitations.xml | 11 + .../aspectj/systemtest/options/OptionsTests.java | 44 + .../aspectj/systemtest/options/options-tests.xml | 37 + .../src/org/aspectj/systemtest/options/options.xml | 10 + .../aspectj/systemtest/pre10x/AjcPre10xTests.java | 316 +++ .../org/aspectj/systemtest/pre10x/pre10x-tests.xml | 629 ++++++ tests/src/org/aspectj/systemtest/pre10x/pre10x.xml | 10 + .../aspectj/systemtest/purejava/PureJavaTests.java | 992 ++++++++++ .../aspectj/systemtest/purejava/pureJava-tests.xml | 1894 ++++++++++++++++++ .../org/aspectj/systemtest/purejava/pureJava.xml | 10 + .../aspectj/systemtest/serialVerUID/SUIDTests.java | 96 + .../systemtest/serialVerUID/serialVerUID-tests.xml | 165 ++ .../systemtest/serialVerUID/serialVerUID.xml | 10 + .../org/aspectj/systemtest/xlint/XLintTests.java | 104 + .../org/aspectj/systemtest/xlint/xlint-tests.xml | 161 ++ tests/src/org/aspectj/systemtest/xlint/xlint.xml | 10 + 51 files changed, 12723 insertions(+) create mode 100644 tests/src/org/aspectj/systemtest/AllTests.java create mode 100644 tests/src/org/aspectj/systemtest/AllTests14.java create mode 100644 tests/src/org/aspectj/systemtest/ajc10x/Ajc10xTests.java create mode 100644 tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/ajc10x/ajc10x.xml create mode 100644 tests/src/org/aspectj/systemtest/ajc11/Ajc11Tests.java create mode 100644 tests/src/org/aspectj/systemtest/ajc11/ajc11-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/ajc11/ajc11.xml create mode 100644 tests/src/org/aspectj/systemtest/ajc120/Ajc120Tests.java create mode 100644 tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/ajc120/ajc120.xml create mode 100644 tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java create mode 100644 tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/ajc121/ajc121.xml create mode 100644 tests/src/org/aspectj/systemtest/aspectpath/AspectPathTests.java create mode 100644 tests/src/org/aspectj/systemtest/aspectpath/aspectpath-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/aspectpath/aspectpath.xml create mode 100644 tests/src/org/aspectj/systemtest/base/BaseTests.java create mode 100644 tests/src/org/aspectj/systemtest/base/baseTests-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/base/baseTests.xml create mode 100644 tests/src/org/aspectj/systemtest/design/DesignTests.java create mode 100644 tests/src/org/aspectj/systemtest/design/design.xml create mode 100644 tests/src/org/aspectj/systemtest/design/designtest.xml create mode 100644 tests/src/org/aspectj/systemtest/incremental/IncrementalTests.java create mode 100644 tests/src/org/aspectj/systemtest/incremental/incremental-junit-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/incremental/incremental-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/incremental/incremental.xml create mode 100644 tests/src/org/aspectj/systemtest/inpath/InPathTests.java create mode 100644 tests/src/org/aspectj/systemtest/inpath/inpath-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/inpath/inpath.xml create mode 100644 tests/src/org/aspectj/systemtest/java14/Java14Tests.java create mode 100644 tests/src/org/aspectj/systemtest/java14/java14-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/java14/java14.xml create mode 100644 tests/src/org/aspectj/systemtest/knownlimitations/KnownLimitationsTests.java create mode 100644 tests/src/org/aspectj/systemtest/knownlimitations/knownLimitations-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/knownlimitations/knownLimitations.xml create mode 100644 tests/src/org/aspectj/systemtest/options/OptionsTests.java create mode 100644 tests/src/org/aspectj/systemtest/options/options-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/options/options.xml create mode 100644 tests/src/org/aspectj/systemtest/pre10x/AjcPre10xTests.java create mode 100644 tests/src/org/aspectj/systemtest/pre10x/pre10x-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/pre10x/pre10x.xml create mode 100644 tests/src/org/aspectj/systemtest/purejava/PureJavaTests.java create mode 100644 tests/src/org/aspectj/systemtest/purejava/pureJava-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/purejava/pureJava.xml create mode 100644 tests/src/org/aspectj/systemtest/serialVerUID/SUIDTests.java create mode 100644 tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID.xml create mode 100644 tests/src/org/aspectj/systemtest/xlint/XLintTests.java create mode 100644 tests/src/org/aspectj/systemtest/xlint/xlint-tests.xml create mode 100644 tests/src/org/aspectj/systemtest/xlint/xlint.xml (limited to 'tests/src') diff --git a/tests/src/org/aspectj/systemtest/AllTests.java b/tests/src/org/aspectj/systemtest/AllTests.java new file mode 100644 index 000000000..21a2ea5bb --- /dev/null +++ b/tests/src/org/aspectj/systemtest/AllTests.java @@ -0,0 +1,55 @@ +/* + * Created on 03-Aug-2004 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package org.aspectj.systemtest; + +import org.aspectj.systemtest.ajc10x.Ajc10xTests; +import org.aspectj.systemtest.ajc11.Ajc11Tests; +import org.aspectj.systemtest.ajc120.Ajc120Tests; +import org.aspectj.systemtest.ajc121.Ajc121Tests; +import org.aspectj.systemtest.aspectpath.AspectPathTests; +import org.aspectj.systemtest.base.BaseTests; +import org.aspectj.systemtest.design.DesignTests; +import org.aspectj.systemtest.incremental.IncrementalTests; +import org.aspectj.systemtest.inpath.InPathTests; +import org.aspectj.systemtest.options.OptionsTests; +import org.aspectj.systemtest.pre10x.AjcPre10xTests; +import org.aspectj.systemtest.serialVerUID.SUIDTests; +import org.aspectj.systemtest.xlint.XLintTests; + +import junit.framework.Test; +import junit.framework.TestSuite; + +/** + * @author colyer + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class AllTests { + + public static Test suite() { + TestSuite suite = new TestSuite("AspectJ System Test Suite - JDK 1.3"); + //$JUnit-BEGIN$ + suite.addTest(Ajc121Tests.suite()); + suite.addTest(Ajc120Tests.suite()); + suite.addTest(Ajc11Tests.suite()); + suite.addTest(Ajc10xTests.suite()); + suite.addTest(AspectPathTests.suite()); + suite.addTest(InPathTests.suite()); + suite.addTest(BaseTests.suite()); + suite.addTest(DesignTests.suite()); + suite.addTest(IncrementalTests.suite()); + //suite.addTest(KnownLimitationsTests.class); + suite.addTest(OptionsTests.suite()); + suite.addTest(AjcPre10xTests.suite()); + //suite.addTest(PureJavaTests.class); + suite.addTest(SUIDTests.suite()); + suite.addTest(XLintTests.suite()); + //$JUnit-END$ + return suite; + } +} diff --git a/tests/src/org/aspectj/systemtest/AllTests14.java b/tests/src/org/aspectj/systemtest/AllTests14.java new file mode 100644 index 000000000..da97c7337 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/AllTests14.java @@ -0,0 +1,30 @@ +/* + * Created on 03-Aug-2004 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package org.aspectj.systemtest; + +import org.aspectj.systemtest.java14.Java14Tests; + +import junit.framework.Test; +import junit.framework.TestSuite; + +/** + * @author colyer + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class AllTests14 { + + public static Test suite() { + TestSuite suite = new TestSuite("AspectJ System Test Suite - JDK 1.4"); + //$JUnit-BEGIN$ + suite.addTest(AllTests.suite()); + suite.addTest(Java14Tests.suite()); + //$JUnit-END$ + return suite; + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc10x/Ajc10xTests.java b/tests/src/org/aspectj/systemtest/ajc10x/Ajc10xTests.java new file mode 100644 index 000000000..cd63392c8 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc10x/Ajc10xTests.java @@ -0,0 +1,1165 @@ +/* ******************************************************************* + * 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.ajc10x; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class Ajc10xTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(Ajc10xTests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/ajc10x/ajc10x.xml"); + } + + + public void test001(){ + runTest("properly make choice between cast and parenthesis in parser"); + } + + public void test002(){ + runTest("field from implemented interface not found in advice"); + } + + public void test003(){ + runTest("make sure advice affects introduced methods and constructors"); + } + + public void test004(){ + runTest("new around construct"); + } + + public void test005(){ + runTest("aspect redefines a parameter"); + } + + public void test006(){ + runTest("introducing extends and implements"); + } + + public void test007(){ + runTest("(related) aspect on interface"); + } + + public void test008(){ + runTest("advice and package visibility"); + } + + public void test009(){ + runTest("advice and package visibility"); + } + + public void test010(){ + runTest("advice on implied empty constructor"); + } + + public void test011(){ + runTest("advice on * *(..) not mapping to initializers"); + } + + public void test012(){ + runTest("three type declarations in the scope of an advice"); + } + + public void test013(){ + runTest("introduction fails on class with an inner class that extends or implements something"); + } + + public void test014(){ + runTest("checks that methods are introduced on the topmost class implemented"); + } + + public void test015(){ + runTest("a couple different returns from around advice"); + } + + public void test016(){ + runTest("member finally advice paired with signature advice"); + } + + public void test017(){ + runTest("aspect of eachobject(instanceof(Interface))"); + } + + public void test018(){ + runTest("final member initialization broken with JDK before 1.1.8"); + } + + public void test019(){ + runTest("same package and var name clash in preprocessed code when aspectOf is used"); + } + + public void test020(){ + runTest("and PR#201 advice on static methods fails javac compile with this"); + } + + public void test021(){ + runTest("non-static advice on inner class defined inside of method body"); + } + + public void test022(){ + runTest("simple single-threaded eachcflow test (includes aspectOf)"); + } + + public void test023(){ + runTest("bad type resolution when var reassigned in same scope"); + } + + public void test024(){ + runTest("generating the right throws clause for call-site advice (and around)"); + } + + public void test025(){ + runTest("advice on calls to static methods using several syntax"); + } + + public void test026(){ + runTest(", PR#249, PR#250 advice on constructor sites"); + } + + public void test027(){ + runTest("test after throwing advice in several ways"); + } + + public void test028(){ + runTest("fancy name patterns for method names"); + } + + public void test029(){ + runTest("calls: calls(...)"); + } + + public void test030(){ + runTest("throws Exception clause is unnecessarily added to Driver.main method"); + } + + public void test031(){ + runTest("javac fails when this is referenced in the static main method"); + } + + public void test032(){ + runTest("and 276 cast error generated by ajc when type not in signature"); + } + + public void test033(){ + runTest("calls to methods to which we don't have source"); + } + + public void test034(){ + runTest("more aspect inheritance"); + } + + public void test035(){ + runTest("around and calls with both calling and called this params"); + } + + public void test036(){ + runTest("compiler crashes with eachobject and named pointcuts with parameters"); + } + + public void test037(){ + runTest("lookup rules for unqualified pointcut names"); + } + + public void test038(){ + runTest("eachcflow only instantiated if the aspect has some advice in it"); + } + + public void test039(){ + runTest("(DESIGN QUESTION) aspect of eachJVM advising its own initializer"); + } + + public void test040(){ + runTest("after returning advice on calls to constructors"); + } + + public void test041(){ + runTest("Does annotating 'new' with a type work as desired?"); + } + + public void test042(){ + runTest("Referring to inner classes as {super}.{inner} confused ajc."); + } + + public void test043(){ + runTest("Advice on advice"); + } + + public void test044(){ + runTest("Introductions on other introductions"); + } + + public void test045(){ + runTest("Putting advice on array constructors."); + } + + public void test046(){ + runTest("call points within block inner classes are doubled"); + } + + public void test047(){ + runTest("Gets and sets with other advice"); + } + + public void test048(){ + runTest("Compiler can compile correct strictfp modifiers"); + } + + public void test049(){ + runTest("basic test of callsto pointcuts"); + } + + public void test050(){ + runTest("package wildcards in packages"); + } + + public void test051(){ + runTest("around advice on calls and receptions with lots of context"); + } + + public void test052(){ + runTest("! modifier and char in pointcut (no longer an error)"); + } + + public void test053(){ + runTest("right number of aspect instances per cflow"); + } + + public void test054(){ + runTest("many this's into around advice on calls"); + } + + public void test055(){ + runTest("Ensures introduction methods can have advice placed on them"); + } + + public void test056(){ + runTest("No boolean appearing in the 'if' clause for around advice with eachJVM()"); + } + + public void test057(){ + runTest("Order of super introductions."); + } + + public void test058(){ + runTest("Ensuring backdoor methods are produced."); + } + + public void test059(){ + runTest("no duplicate advice methods in abstract aspects"); + } + + public void test060(){ + runTest("no duplicate advice methods in abstract aspects extended"); + } + + public void test061(){ + runTest("Putting after-constructor advice on the wrong types implementing the same interface."); + } + + public void test062(){ + runTest("Instantiating non-static inner classes in advice."); + } + + public void test063(){ + runTest("Referring to pointcut in of clauses"); + } + + public void test064(){ + runTest("Confused referring to instance variables and locals"); + } + + public void test065(){ + runTest("Parsing C+ expressions without parens in super introductions."); + } + + public void test066(){ + runTest("Introducing methods on classes that implements inner-interfaces with +implements."); + } + + public void test067(){ + runTest("Methods with the same name are generated when abstract aspects extend another abstract aspect."); + } + + public void test068(){ + runTest("Making sure final variables stay final."); + } + + public void test069(){ + runTest("Problem resolving meta-joinpoint names with around advice on methods called from around advice."); + } + + public void test070(){ + runTest("Make sure that names of lifted local classes are right when referenced in call-site advice"); + } + + public void test071(){ + runTest("matching for throws clause"); + } + + public void test072(){ + runTest("basic test of declare soft"); + } + + public void test073(){ + runTest("advice on calls to constructors of anonymous inners and access to context"); + } + + public void test074(){ + runTest("inner aspects can't access outer pointcuts"); + } + + public void test075(){ + runTest("implements and extends are introduced before methods and fields"); + } + + public void test076(){ + runTest("a static/inner aspect of a inner class of an aspect is pulled to the top level as static"); + } + + public void test077(){ + runTest("Crashes with privileged aspect."); + } + + public void test078(){ + runTest("join points exist in the execution of field initializers"); + } + + public void test079(){ + runTest("privileged aspects"); + } + + public void test080(){ + runTest("advice on field gets in privileged aspects"); + } + + public void test081(){ + runTest("Two anonymous classes in the same scope"); + } + + public void test082(){ + runTest("basic tests for initializer and staticinitializer PCDs"); + } + + public void test083(){ + runTest("introduction of an initializer into a class"); + } + + public void test084(){ + runTest("some method accessibility tests, particularly package-protected and inheritance"); + } + + public void test085(){ + runTest("fairly monotonous (and non-covering) tests for expanded dot patterns"); + } + + public void test086(){ + runTest("field patterns and subtyping"); + } + + public void test087(){ + runTest("Checking formal matching as in Roeder's bug in 0.7b10"); + } + + public void test088(){ + runTest("Introducing synchronized methods on interfaces."); + } + + public void test089(){ + runTest("The pointcut params (..,int..) is not recognizing (Object,int,Object)."); + } + + public void test090(){ + runTest("calls advice on array objects causes error in code generation"); + } + + public void test091(){ + runTest("join points in field initializers aren't showing up."); + } + + public void test092(){ + runTest("Handlers problem"); + } + + public void test093(){ + runTest("work nicely with inner class method look-up rules and call-site advice"); + } + + public void test094(){ + runTest("strictfp modifier allowed on advice"); + } + + public void test095(){ + runTest("No argthis was being created for calls advice."); + } + + public void test096(){ + runTest("Ensuring no advice with instanceof(..) is run on static methods."); + } + + public void test097(){ + runTest("Null pointer on gets advice showing the case causing the error"); + } + + public void test098(){ + runTest("try to make sure that dynamic JoinPoint objects aren't generated when used inside of if (false) { ... }"); + } + + public void test099(){ + runTest("within and withincode (doesn't all work due to local class name issues)"); + } + + public void test100(){ + runTest("around advice on calls within inner classes (including protected method calls)"); + } + + public void test101(){ + runTest("around advice on calls within inner classes (including protected method calls)"); + } + + public void test102(){ + runTest("Arguments to runNext should be final when needed"); + } + + public void test103(){ + runTest("Method introductions"); + } + + public void test104(){ + runTest("Putting an introduced method on each interface"); + } + + public void test105(){ + runTest("Extending interfaces"); + } + + public void test106(){ + runTest("Introducing private methods on interfaces"); + } + + public void test107(){ + runTest("Issuing errors for assigning variables thisJoinPoint -- not assigning thisJoinPoint."); + } + + public void test108(){ + runTest("Static references inside of introduced bodies get bound correctly."); + } + + public void test109(){ + runTest("cflow and object creations [of eachcflow]"); + } + + public void test110(){ + runTest("Doesn't import MightHaveAspect when compiling with more than 1 file. [eachobject]"); + } + + public void test111(){ + runTest("test binding to formals in calls to constructors (binding to null) (eachobject !!! now misnamed)"); + } + + public void test112(){ + runTest("After advice isn't being woven into after throwing advice"); + } + + public void test113(){ + runTest("Throwing an EmptyStackException."); + } + + public void test114(){ + runTest("check that MightHaveAspect interface is created correctly for an aspect in deep package"); + } + + public void test115(){ + runTest("Defines clfow$ajc0 more once. [eachcflow]"); + } + + public void test116(){ + runTest("Various calls, receptions, and callsto tests [callsto]"); + } + + public void test117(){ + runTest("Was throwing exception, now just an error. [eachobject]"); + } + + public void test118(){ + runTest("different version of aspect inheritance, particularly empty pointcuts and abstract cflows [eachcflow]"); + } + + public void test119(){ + runTest("set advice on member initing throwing exception [eachobject]"); + } + + public void test120(){ + runTest("Testing class names with same name's with difference case as package. [eachobject]"); + } + + public void test121(){ + runTest("Null pointer on gets advice with coverage [painful]"); + } + + public void test122(){ + runTest("Basic test for cflow pointcuts [eachcflow]"); + } + + public void test123(){ + runTest("Crashing when looking up the type of array members."); + } + + public void test124(){ + runTest("PostfixExprs to various synthetic things are fixed correctly [eachobject]"); + } + + public void test125(){ + runTest("Dave Binkley's problem with eachcflowroot. [eachcflow]"); + } + + public void test126(){ + runTest("advice on an inherited method"); + } + + public void test127(){ + runTest(", PR#115 checks the ordering of catch clauses"); + } + + public void test128(){ + runTest("various declared exception permutations"); + } + + public void test129(){ + runTest("ordering of advice kinds as well as cflow and dominates"); + } + + public void test130(){ + runTest("advice on default constructor for a class only referenced via reflection"); + } + + public void test131(){ + runTest("calling and called this params in calls points"); + } + + public void test132(){ + runTest("primitive parameters coercable to Object just like return values are"); + } + + public void test133(){ + runTest("join points in static/dynamic initializers aren't showing up."); + } + + public void test134(){ + runTest("Gets and sets on a number of variables (field access ???)"); + } + + public void test135(){ + runTest("Joinpoints are showing up on intermediate call sites"); + } + + public void test136(){ + runTest("Reception based on strictfp modifier"); + } + + public void test137(){ + runTest("Subclasses that do not redefine a method are not being handled correctly"); + } + + public void test138(){ + runTest("making sure that super calls are bound to the right methods"); + } + + public void test139(){ + runTest("inheritance, around advice and abstract pointcuts [eachobject] (still)"); + } + + public void test140(){ + runTest("Priviledged aspect methods are missing for privates. [eachobject]"); + } + + public void test141(){ + runTest("exceptions thrown and caught in advice, particularly try+proceed"); + } + + public void test142(){ + runTest("Not and And operators in pointcuts not working"); + } + + public void test143(){ + runTest("Member initializers should run before the current class constructor"); + } + + public void test144(){ + runTest("Coverage tests for Member initializers should run before the current class constructor and after super"); + } + + public void test145(){ + runTest("thisJoinPoint{Static} not visible in if() pcd of named pointcut"); + } + + public void test146(){ + runTest("pcd if() expression visibility at compile-time (minimal operation)"); + } + + public void test147(){ + runTest("pcd if() NPE in compiler when unwinding assignment in pcd if(expr)"); + } + + public void test148(){ + runTest("pcd if() dup methods produced when pointcut after advice etc (javac)"); + } + + public void test149(){ + runTest("pcd if() variants: [anonymous, named] x [execution, call, callTyped, get, set, initializations] x [before, after, around]"); + } + +// moved to ajcTestsFailing.xml +// public void test150(){ +// runTest("advice on advice in usejavac mode"); +// } + + public void test151(){ + runTest("initialization order with this"); + } + + public void test152(){ + runTest("!within and !this handling for callee-side call points"); + } + + public void test153(){ + runTest("private inner interfaces and bytecode visibility"); + } + + public void test154(){ + runTest("elaborated into testing of around on all join points"); + } + + public void test155(){ + runTest("type name hygiene when code comes from aspects in different packages"); + } + + public void test156(){ + runTest("cflowbelow dependencies (from Chris Dutchyn)"); + } + + public void test157(){ + runTest("Compiler incorrectly flagging *1 (non-alphabetic start to signature pattern)"); + } + + public void test158(){ + runTest("Unable to bind privately-introduced field name from introduced method in the same aspect"); + } + + public void test159(){ + runTest("anonymous inner class with aspect"); + } + + public void test160(){ + runTest("Arguments are not being passed in to calls advice"); + } + + public void test161(){ + runTest("interfaces as mixins with introduction"); + } + + public void test162(){ + runTest("functional modifiers work correctly with introduced members"); + } + + public void test163(){ + runTest("ExceptionInInitializerError accessing cflow in aspect initialization - before variants"); + } + + public void test164(){ + runTest("NoClassDefFoundError accessing cflow in aspect initialization - after variants"); + } + + public void test165(){ + runTest("InternalCompilerError in JpPlan when args alone"); + } + + public void test166(){ + runTest("compile error using pcd if() with advice on introduced methods."); + } + + public void test167(){ + runTest("compile errors boolean using cflow and unimplemented method using around advice on methods introduced by interface"); + } + + public void test168(){ + runTest("aspect as member of interface"); + } + + public void test169(){ + runTest("missing method name to synthetic invocation"); + } + + public void test170(){ + runTest("protected subclass impl of superclass method with default access and variants"); + } + + public void test171(){ + runTest("Exception planning advice"); + } + + public void test172(){ + runTest("unreproduced bug with advice - probably UTR"); + } + + public void test173(){ + runTest("introduced inner interfaces accessible inside aspect"); + } + + public void test174(){ + runTest("validate (enclosing) join point and source locations"); + } + + public void test175(){ + runTest("advice formals are just like method formals"); + } + + public void test176(){ + runTest("advice formals produce errors just like method formals"); + } + + public void test177(){ + runTest("advice throws clauses must be compatible with joinpoints they apply to"); + } + + public void test178(){ + runTest("potential method conflicts with introductions and interfaces and PR#561"); + } + + public void test179(){ + runTest("illegal method conflicts with introductions and interfaces and PR#561"); + } + + public void test180(){ + runTest("AspectOf available for different aspect types"); + } + + public void test181(){ + runTest("access to all members of class and inner class from privileged aspect"); + } + + public void test182(){ + runTest("cflow alone with around produces compiler bcg StackOverflowError"); + } + + public void test183(){ + runTest("get/set join points run for complex assignment operators (+=, etc.) (working)"); + } + + public void test184(){ + runTest("this available in introduced field initializers"); + } + + public void test185(){ + runTest("Introduced type unavailable to cast expressions in introduced methods"); + } + + public void test186(){ + runTest("Introduced type unavailable to qualified new expressions in introduced methods"); + } + + public void test187(){ + runTest("Introduced type unavailable to cast expressions in introduced field initializers"); + } + + public void test188(){ + runTest("Aspect type unavailable to qualified new expressions in body of introduced methods"); + } + + public void test189(){ + runTest("Introduced type unavailable to qualified new expressions in introduced field initializers"); + } + + public void test190(){ + runTest("variable slots and finally/catch causing verify errors"); + } + + public void test191(){ + runTest("after advice on static method with pcd if() using result"); + } + + public void test192(){ + runTest("after advice on static method with pcd if() using result through pointcut"); + } + + public void test193(){ + runTest("AbstractMethodError for introduced methods (order 1)"); + } + + public void test194(){ + runTest("AbstractMethodError for introduced methods (order 2)"); + } + + public void test195(){ + runTest("AbstractMethodError for introduced methods (order 3)"); + } + + public void test196(){ + runTest("AbstractMethodError for introduced methods (order 4)"); + } + + public void test197(){ + runTest("AbstractMethodError for introduced methods (order 5)"); + } + + public void test198(){ + runTest("declare error and abstract pointcuts"); + } + + public void test199(){ + runTest("Exercise runtime classes (optionally in 1.1 VM)"); + } + + public void test200(){ + runTest("VerifyError after around advice falls off end of tryCatch"); + } + + public void test201(){ + runTest("Named within pointcuts failing"); + } + + public void test202(){ + runTest("aspect with private abstract pointcut"); + } + + public void test203(){ + runTest("concrete aspect unable to access abstract package-private pointcut in parent for overriding"); + } + + public void test204(){ + runTest("inner, outer, and outside-package subaspects of an aspect with abstract protected-, public-, and default-access pointcuts"); + } + + public void test205(){ + runTest("inner subaspects of an aspect with private pointcut"); + } + + public void test206(){ + runTest("outer subaspects of an aspect with private pointcut"); + } + + public void test207(){ + runTest("abstract aspect used statically should not cause instantiation of advice or pointcut"); + } + + public void test208(){ + runTest("private inner interface accessible in scope when declared on outer class"); + } + + public void test209(){ + runTest("accessing protected superclass members in and outside CCC from body of method introduction"); + } + + public void test210(){ + runTest("accessing private superclass members from body of method introduction"); + } + + public void test211(){ + runTest("simple test for around and casting"); + } + + public void test212(){ + runTest("aroundInner 1 - around advice inner Thread subclass running proceed but not writing field"); + } + + public void test213(){ + runTest("aroundInner 2 - around advice inner Runnable running proceed and writing method-final proxy"); + } + + public void test214(){ + runTest("aroundInner 3 - around advice inner class running proceed and writing field"); + } + + public void test215(){ + runTest("aroundInner 4 - around advice inner Thread subclass running proceed and writing field"); + } + + public void test216(){ + runTest("aroundInner 5 - around advice inner Runnable (subinterface) running proceed and writing field introduced on subinterface"); + } + + public void test217(){ + runTest("Named local class closing over proceed invocation"); + } + + public void test218(){ + runTest("beautiful recursive computation of factorial with around is now supported"); + } + + public void test219(){ + runTest("multi-dispatch not used for named pcd references"); + } + + public void test220(){ + runTest("multi-dispatch implemented through around + args"); + } + + public void test221(){ + runTest("unrecognized aspect should not net Cloneable and Serializable warnings"); + } + + public void test222(){ + runTest("unreachable code generated by around advice on the execution of void methods"); + } + + public void test223(){ + runTest("Overriding method implementations using introduction on interfaces"); + } + + public void test224(){ + runTest("more coverage for around and concrete methods on interfaces"); + } + + public void test225(){ + runTest("invalid number and type of proceed arguments"); + } + + public void test226(){ + runTest("after returning advice order"); + } + + public void test227(){ + runTest("after returning advice param"); + } + + public void test228(){ + runTest("! and declaring types with callee-side call join points"); + } + + public void test229(){ + runTest(". Binding the wrong arguments in withincode(..)."); + } + + public void test230(){ + runTest(". Matching arguments in cflow correctly."); + } + + public void test231(){ + runTest(". Binding variables with numbers in their name with pertarget(..)'s."); + } + + public void test232(){ + runTest("second arg in formal on shared joinpoint with pcd if() causes verify error ??"); + } + + public void test233(){ + runTest("access to private members from privileged aspect"); + } + + public void test234(){ + runTest("inner classes of privileged aspects cannot see target class private members"); + } + + public void test235(){ + runTest("aspects should get package access outside the file"); + } + + public void test236(){ + runTest("subclass advice not run for join points selected by superclass cflow-based pointcuts"); + } + + public void test237(){ + runTest("more issues with abstract aspects and cflow pointcuts"); + } + + public void test238(){ + runTest("compile fails for aspect derived from percflow base aspect unless pointcut excludes base aspect and subaspects"); + } + + public void test239(){ + runTest("pertarget stack overflow getting name of anonymous (Interface) class"); + } + + public void test240(){ + runTest("pertarget stack overflow getting name of anonymous (Object) class"); + } + + public void test241(){ + runTest("pertarget runtime stack overflow (getting name of anonymous (Object) class?)"); + } + + public void test242(){ + runTest("subaspect method declaration on superaspect inner interface (names)"); + } + + public void test243(){ + runTest("subaspect method declaration on superaspect inner interface (access)"); + } + + public void test244(){ + runTest("subaspect method declaration on superaspect inner interface (types)"); + } + + public void test245(){ + runTest("around AST type XXX"); + } + + public void test246(){ + runTest("around all execution with double assignment in initializer (simple)"); + } + + public void test247(){ + runTest("around all execution with double assignment in initializer (coverage)"); + } + + public void test248(){ + runTest("changing this in around's proceed reported by Rich Price"); + } + + public void test249(){ + runTest("default package for aspect introductions is not the current package"); + } + + public void test250(){ + runTest("anon class written to wrong directory"); + } + + public void test251(){ + runTest("unqualified transitive pointcut references not resolved"); + } + + public void test252(){ + runTest("unqualified transitive pointcut references not resolved - 2"); + } + + public void test253(){ + runTest("direct use outside aspect of defined abstract pointcut"); + } + + public void test254(){ + runTest("direct use outside aspect of undefined abstract pointcut"); + } + + public void test255(){ + runTest("indirect use outside aspect of undefined abstract pointcut"); + } + + public void test256(){ + runTest("simple call join point tests for JoinPoint SourceLocation context"); + } + + public void test257(){ + runTest("!target with second advice on casted call"); + } + + public void test258(){ + runTest("name binding in around cflow"); + } + + public void test259(){ + runTest("name binding in around cflow - 2"); + } + + public void test260(){ + runTest("around name-binding in cflows using factorial"); + } + + public void test261(){ + runTest("replacing this or target in around advice"); + } + + public void test262(){ + runTest("after returning from initialization and after executing constructor"); + } + + public void test263(){ + runTest("after returning from initialization causes ExceptionInInitializer in aspect"); + } + + public void test264(){ + runTest("name binding in before cflow containing cflowbelow"); + } + + public void test265(){ + runTest("file order in type searching"); + } + + public void test266(){ + runTest("simple declare warning (NPE)"); + } + + public void test267(){ + runTest("ajc dies on cflow into field init anon class see knownbugs.txt"); + } + + public void test268(){ + runTest("Incrementing interface-introduced field"); + } + + public void test269(){ + runTest("The dynamic type, not the static one, should be used in if pcds"); + } + + public void test270(){ + runTest("bad interaction with after returning, around and void methods (from Rich Price)"); + } + + public void test271(){ + runTest("type pattern matching for inner classes (from Ken Horn)"); + } + + public void test272(){ + runTest("static initializer member name"); + } + + public void test273(){ + runTest("cflow pcd syntax error"); + } + + public void test274(){ + runTest("binding args with indeterminate prefix and suffix"); + } + + public void test275(){ + runTest("check arg types with indeterminate prefix and suffix"); + } + + public void test276(){ + runTest("testing and binding args with single indeterminate prefix and suffix"); + } + + public void test277(){ + runTest("binding handler args with indeterminate prefix and suffix"); + } + + public void test278(){ + runTest("Compiling java.lang.Object with ajc yields non-verifying bytecode"); + } + + public void test279(){ + runTest("method-local class defined in around return statement"); + } + + public void test280(){ + runTest("CE expected for assignment to arg in if pcd"); + } + + public void test281(){ + runTest("advising field get/sets when accessing via super"); + } + + public void test282(){ + runTest("accessing private members in outer types"); + } + + public void test283(){ + runTest("can't apply around advice to the execution of around advice"); + } + + public void test284(){ + runTest("incompatible advice throws clause are a compile-time error"); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml b/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml new file mode 100644 index 000000000..9e04c610e --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc10x/ajc10x-tests.xml @@ -0,0 +1,2006 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/ajc10x/ajc10x.xml b/tests/src/org/aspectj/systemtest/ajc10x/ajc10x.xml new file mode 100644 index 000000000..90198331d --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc10x/ajc10x.xml @@ -0,0 +1,9 @@ + +]> + + + + +&tests; + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc11/Ajc11Tests.java b/tests/src/org/aspectj/systemtest/ajc11/Ajc11Tests.java new file mode 100644 index 000000000..e594d3dc5 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc11/Ajc11Tests.java @@ -0,0 +1,480 @@ +/* ******************************************************************* + * 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.ajc11; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class Ajc11Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(Ajc11Tests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/ajc11/ajc11.xml"); + } + + + public void test001(){ + runTest("declare interface extends class"); + } + + public void test002(){ + runTest("declare interface implements class"); + } + + public void test003(){ + runTest("declaring a private method on an inner interface"); + } + + public void test004(){ + runTest("CE expected when declaring fields on arrays"); + } + + public void test005(){ + runTest("signature of handler join point"); + } + + public void test006(){ + runTest("source locations within expressions"); + } + + public void test007(){ + runTest("crashes given method in declared method"); + } + + public void test008(){ + runTest("after returning advice on interface constructor"); + } + + public void test009(){ + runTest("after returning advice on interface constructor - error"); + } + + public void test010(){ + runTest("after advice on static call join point"); + } + + public void test011(){ + runTest("incompatible class change error"); + } + + public void test012(){ + runTest("simple cflow of method execution"); + } + + public void test013(){ + runTest("using instance as class reference to constant field"); + } + + public void test014(){ + runTest("interface self-reference in anonymous instance"); + } + + public void test015(){ + runTest("self-reference from (aspect-declared) method-local class"); + } + + public void test016(){ + runTest("expect CE for unterminated declare error"); + } + + public void test017(){ + runTest("expect CE for declaration collision between subaspects instead of domination order"); + } + + public void test018(){ + runTest("subtype pattern in dominates should pick out aspect subtypes"); + } + + public void test019(){ + runTest("subtype pattern in dominates will conflict with type pattern"); + } + + public void test020(){ + runTest("after returning advice on interface and implementation constructor"); + } + + public void test021(){ + runTest("after throwing advice with non-throwable formal"); + } + + public void test022(){ + runTest("declare array field using postfix"); + } + + public void test023(){ + runTest("prohibit declaring new aspect constructor with arguments"); + } + + public void test024(){ + runTest("prohibit declaring only aspect constructor with arguments"); + } + + public void test025(){ + runTest("declare class extends interface"); + } + + public void test026(){ + runTest("declare class implements class"); + } + + public void test027(){ + runTest("declare interface implements interface"); + } + + public void test028(){ + runTest("if and cflow arg binding"); + } + + public void test029(){ + runTest("circularity in declare dominates"); + } + + public void test030(){ + runTest("percflow code hangs compiler"); + } + + public void test031(){ + runTest("Verification error tracing constructor that takes arguments"); + } + + public void test032(){ + runTest("declared exceptions in inter-type decls"); + } + + public void test033(){ + runTest("Verify error on non-Throwable in declare soft"); + } + + public void test034(){ + runTest("inter-type fields with array types"); + } + + public void test035(){ + runTest("checking around join point for advice return type - numeric"); + } + + public void test036(){ + runTest("void around advice without proceed"); + } + + public void test037(){ + runTest("declaring method on superclass and subclass"); + } + + public void test038(){ + runTest("introducing final fields (simple)"); + } + + public void test039(){ + runTest("introducing final fields and using as constants"); + } + + public void test040(){ + runTest("introducing final fields and checking errors"); + } + + public void test041(){ + runTest("Static inner aspects cannot reference user defined pointcuts"); + } + + public void test042(){ + runTest("Static inner aspects cannot reference user defined pointcuts"); + } + + public void test043(){ + runTest("Declare precedence should not allow multiple * patterns"); + } + + public void test044(){ + runTest("VerifyError on accessing objects not accessible to the weaver"); + } + + public void test045(){ + runTest("aspect static initializers should run before instance constructed"); + } + + public void test046(){ + runTest("super call in intertype method declaration body causes VerifyError"); + } + + public void test047(){ + runTest("Error with certain combination of advice"); + } + + public void test048(){ + runTest("Pointcut adviceexecution() does not work"); + } + + public void test049(){ + runTest("problems with finalize call"); + } + + public void test050(){ + runTest("Negation of if pointcut does not work"); + } + + public void test051(){ + runTest("ajc reports error when encountering static declaration of nested classes"); + } + + public void test052(){ + runTest("can't use pointcuts defined in inner aspects "); + } + + public void test053(){ + runTest("can't resolve nested public interfaces (also PR#32399)"); + } + + public void test054(){ + runTest("thisJoinPoint.getArgs() causes IncompatibleClassChangeError"); + } + + public void test055(){ + runTest("inter-type declaration of void field"); + } + + public void test056(){ + runTest("no such constructor for proceed argument (error)"); + } + + public void test057(){ + runTest("omnibus declare warning context with no initializer/constructor"); + } + + public void test058(){ + runTest("omnibus declare warning context"); + } + + public void test059(){ + runTest("cflow binding issues with ignoring state"); + } + + public void test060(){ + runTest("cflow binding -- original weaver crash"); + } + + public void test061(){ + runTest("type not imported in around advice"); + } + + public void test062(){ + runTest("type not imported in aspect"); + } + + public void test063(){ + runTest("class extending abstract aspect"); + } + + public void test064(){ + runTest("declare soft and throw statements"); + } + + public void test065(){ + runTest("inter-type declaration bug with abstract classes"); + } + + public void test066(){ + runTest("Inter type declaration to base class not seen by derived class"); + } + + public void test067(){ + runTest("Declare parents with intermediate ancestor"); + } + + public void test068(){ + runTest("Declare parents removing ancestor"); + } + + public void test069(){ + runTest("IllegalAccessError while accessing introduced variable / 1.1rc1"); + } + + public void test070(){ + runTest("implemented abstract pointcut"); + } + + public void test071(){ + runTest("privileged aspect main verify error"); + } + + public void test072(){ + runTest("Internal compiler error with thisJoinPoint.getStaticPart()"); + } + + public void test073(){ + runTest("Inconsistant stack height with around"); + } + + public void test074(){ + runTest("Ajc 1.1 rc1 java.lang.VerifyError with messy arounds"); + } + + public void test075(){ + runTest("try/finally in around advice (same as ...messy arounds?)"); + } + + public void test076(){ + runTest("advise join points in subclass of empty interface"); + } + + public void test077(){ + runTest("can't put around advice on interface static initializer"); + } + + public void test078(){ + runTest("cflow concretization causing assertion failure"); + } + + public void test079(){ + runTest("lame error message: negation doesn't allow binding"); + } + + public void test080(){ + runTest("Error when introducing members of type Class"); + } + + public void test081(){ + runTest("arrays via Class.forName()"); + } + + public void test082(){ + runTest("perthis and inline arounds"); + } + + public void test083(){ + runTest("Weaver fails with NPE for very large source files "); + } + + public void test084(){ + runTest("CLE: no sources"); + } + + public void test085(){ + runTest("CLE: bad filename"); + } + + public void test086(){ + runTest("CLE: no dir specified for sourceroots"); + } + + public void test087(){ + runTest("CLE: no sourceroot specified for incremental"); + } + + public void test088(){ + runTest("CLE: file specified with incremental"); + } + + public void test089(){ + runTest("public static fields being ignored"); + } + + public void test090(){ + runTest("can not resolve this member warning"); + } + + public void test091(){ + runTest("try switch VerifyError, InconsistentStackHeight"); + } + + public void test092(){ + runTest("Compiler crash in ajc 1.1 - terrible error for inaccessible constructor"); + } + + public void test093(){ + runTest("Missing import crashes compiler"); + } + + public void test094(){ + runTest("NPE in bcel.LazyMethodGen when delegating from one ctor to a second that includes a switch"); + } + + public void test095(){ + runTest("switch statement in aspects crashes weaving"); + } + + public void test096(){ + runTest("ajc stack trace on declaring hashcode() method in aspect"); + } + + public void test097(){ + runTest("using super in method introduced on interface with multiple supertypes"); + } + + public void test098(){ + runTest("Compiler crashes in jar and cflow (with no .jar)"); + } + + public void test099(){ + runTest("Compiler crashes in jar and cflow (with .jar)"); + } + + public void test100(){ + runTest("Default method impl for interface causes internal exception."); + } + + public void test102(){ + runTest("compile error expected for abstract pointcut outside abstract aspect"); + } + + public void test103(){ + runTest("subtype-qualified pointcut reference"); + } + + public void test104(){ + runTest("weaver trace on mis-qualified pointcut reference"); + } + + public void test105(){ + runTest("compile error expected for interface pointcuts"); + } + + public void test106(){ + runTest("interface call signatures when declaring method in aspect"); + } + + public void test107(){ + runTest("reflective check of declared exceptions from aspect-declared methods"); + } + + public void test108(){ + runTest("throw derivative pointcuts not advised"); + } + + public void test109(){ + runTest("perthis and signature bad interaction"); + } + + public void test110(){ + runTest("declare error fails on pointcuts composed from multiple classes"); + } + + public void test111(){ + runTest("declare error fails on pointcuts composed from multiple classes"); + } + + public void test112(){ + runTest("Interaction between pointcut binding and declare parents"); + } + + public void test113(){ + runTest("Non-functional concretezation of ReferencePointcut"); + } + + public void test114(){ + runTest("zip and jar suffixes for extdirs entries"); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/ajc11/ajc11-tests.xml b/tests/src/org/aspectj/systemtest/ajc11/ajc11-tests.xml new file mode 100644 index 000000000..95fe34a0b --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc11/ajc11-tests.xml @@ -0,0 +1,834 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc11/ajc11.xml b/tests/src/org/aspectj/systemtest/ajc11/ajc11.xml new file mode 100644 index 000000000..899dfe725 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc11/ajc11.xml @@ -0,0 +1,10 @@ + +]> + + + + +&tests; + + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc120/Ajc120Tests.java b/tests/src/org/aspectj/systemtest/ajc120/Ajc120Tests.java new file mode 100644 index 000000000..84054333a --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc120/Ajc120Tests.java @@ -0,0 +1,244 @@ +/* ******************************************************************* + * 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.ajc120; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class Ajc120Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(Ajc120Tests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/ajc120/ajc120.xml"); + } + + + public void test001(){ + runTest("NPE in concretization error path"); + } + + public void test002(){ + runTest("priviledged aspects calling methods from advice"); + } + + public void test003(){ + runTest("No error on overloaded pointcuts in class"); + } + + public void test004(){ + runTest("No error on overloaded pointcuts unless binding variables"); + } + + public void test005(){ + runTest("Declare soft softening other exception types"); + } + + public void test006(){ + runTest("static method introduction on interfaces, should not be allowed"); + } + + public void test007(){ + runTest("External pointcut refs not resolved if named pointcut used by declare"); + } + + public void test008(){ + runTest("Appropriate message for 'after() thowing(Throwable th)' syntax error"); + } + + public void test009(){ + runTest("Ensure we don't look for source on the classpath when binary not found"); + } + + public void test010(){ + runTest("inner aspect containing declare soft"); + } + + public void test011(){ + runTest("Bad parser error recovery in advice"); + } + + public void test012(){ + runTest("Bad parser error recovery in java source"); + } + + public void test013(){ + runTest("compiler issues error on inner aspects when privilieged"); + } + + public void test014(){ + runTest("After throwing advice on ctors doesn't execute for inter-type decl field inits"); + } + + public void test015(){ + runTest("Introduced abstract method on abstract class not implemented by subtype (single source file)"); + } + + public void test016(){ + runTest("Introduced abstract method on abstract class with introduced concrete method (single source file)"); + } + + public void test017(){ + runTest("Introduced abstract method on abstract class with existing concrete method (single source file)"); + } + + public void test018(){ + runTest("aspect declares interface method (no modifiers)"); + } + + public void test019(){ + runTest("aspect declares interface method (abstract)"); + } + + public void test020(){ + runTest("aspect declares interface method (public abstract)"); + } + + public void test021(){ + runTest("Use class implementing interface via aspect (not woven together)"); + } + + public void test022(){ + runTest("Use class implementing interface via aspect (weave all together)"); + } + + public void test023(){ + runTest("Use class implementing interface via aspect (only one implementer)"); + } + + public void test024(){ + runTest("Erroneous exception conversion"); + } + + public void test025(){ + runTest("before():execution(new(..)) does not throw NoAspectBoundException"); + } + + public void test026(){ + runTest("Anomalous handling of inter-type declarations to abstract base classes in aspectj 1.1"); + } + + public void test027(){ + runTest("NPE When compiling intertype declaration"); + } + + public void test028(){ + runTest("declare warning on subtype constructor"); + } + + public void test029(){ + runTest("CatchClauseSignature has broken operation"); + } + + public void test030(){ + runTest("after returning with parameter: matching rules"); + } + + public void test031(){ + runTest("binary compatibility of advice method names - expect no error"); + } + + public void test032(){ + runTest("binary compatibility of advice method names - expect error"); + } + + public void test033(){ + runTest("binary compatibility of advice method names - expect no error"); + } + + public void test034(){ + runTest("mail list VerifyError with protected access"); + } + + public void test035(){ + runTest("Polymorphic ITD fails in CVS HEAD (From ajdt 1.1.6)"); + } + + public void test036(){ + runTest("ClasscastException on concretization of if(false)"); + } + + public void test037(){ + runTest("ClasscastException on concretization of if(false)"); + } + + public void test038(){ + runTest("Introduced abstract method on interface not implemented by subtype (weave altogether)"); + } + + public void test039(){ + runTest("declare String field on interface"); + } + + public void test040(){ + runTest("declare int field on interface"); + } + + public void test041(){ + runTest("declare Object field on interface"); + } + + public void test042(){ + runTest("fail in compiling aspect with overriding method introduction with different throws clause "); + } + + public void test043(){ + runTest("super call in anonymous class created in around advice"); + } + + public void test044(){ + runTest("retitle warning to circular {advice} dependency at ..."); + } + + public void test045(){ + runTest("Introduce Unknown Type to class causes Null pointer exception"); + } + + public void test046(){ + runTest("Private members introduced via an interface are visible to the class"); + } + + public void test047(){ + runTest("declare precedence on a class should be a compile-time error"); + } + + public void test048(){ + runTest("declare precedence on a class should be a compile-time error"); + } + + public void test049(){ + runTest("NPE when binary weaving a ctor ITD"); + } + + public void test050(){ + runTest("NPE in compiler when using (an unusual) declare warning against a ctor ITD"); + } + + public void test051(){ + runTest("InterTypeMethodDeclaration.java:104"); + } + + public void test052(){ + runTest("nested uses of this() inside constructors not handled properly for initialization and preinitialization pointcuts"); + } + + public void test053(){ + runTest("wrong variable binding in || pointcuts"); + } + + public void test054(){ + runTest("error message for constructor-execution pcd"); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml b/tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml new file mode 100644 index 000000000..51f70134b --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc120/ajc120-tests.xml @@ -0,0 +1,478 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/ajc120/ajc120.xml b/tests/src/org/aspectj/systemtest/ajc120/ajc120.xml new file mode 100644 index 000000000..dade07154 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc120/ajc120.xml @@ -0,0 +1,11 @@ + +]> + + + + + +&tests; + + diff --git a/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java b/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java new file mode 100644 index 000000000..019dabd75 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java @@ -0,0 +1,84 @@ +/* ******************************************************************* + * 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.ajc121; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class Ajc121Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(Ajc121Tests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/ajc121/ajc121.xml"); + } + + + public void test001(){ + runTest("false ambigous binding error (introduced in 1.2rc2)"); + } + + public void test002(){ + runTest("An if() pointcut inside a perthis() clauses an ABORT - null pointer exception in ajc"); + } + + public void test003(){ + runTest("An if() pointcut inside a perthis() clauses an ABORT - null pointer exception in ajc"); + } + + public void test004(){ + runTest("An if() pointcut inside a perthis() clauses an ABORT - null pointer exception in ajc"); + } + + public void test005(){ + runTest("compiler aborts with 'conflicting dominates orders' with circular declare precedences"); + } + + public void test006(){ + runTest("'can't bind type' message has $ for . in type name for declare soft"); + } + + public void test007(){ + runTest("Hiding of Instance Methods by static methods"); + } + + public void test008(){ + runTest("if(false) optimisation"); + } + + public void test009(){ + runTest("if(true) optimisation"); + } + + public void test010(){ + runTest("java.lang.NullPointerException in WeaverMessageHandler class"); + } + + public void test011(){ + runTest("ClassCastException at BcelRenderer.java:169"); + } + + public void test012(){ + runTest("Front-end bug, shouldn't allow patterns of the form foo.., should be foo..*"); + } + + public void test013() { + runTest("Nullpointer-Exception when defining a withincode() pointcut"); + } + + public void test014() { + runTest("NPE, Incorrect XLint:unmatchedSuperTypeInCall warning"); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml new file mode 100644 index 000000000..7f1a72902 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/ajc121/ajc121.xml b/tests/src/org/aspectj/systemtest/ajc121/ajc121.xml new file mode 100644 index 000000000..8ad54bf32 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc121/ajc121.xml @@ -0,0 +1,12 @@ + +]> + + + + + +&tests; + + + diff --git a/tests/src/org/aspectj/systemtest/aspectpath/AspectPathTests.java b/tests/src/org/aspectj/systemtest/aspectpath/AspectPathTests.java new file mode 100644 index 000000000..779bedec9 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/aspectpath/AspectPathTests.java @@ -0,0 +1,116 @@ +/* ******************************************************************* + * 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.aspectpath; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class AspectPathTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(AspectPathTests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/aspectpath/aspectpath.xml"); + } + + + public void test001(){ + runTest("testing new options"); + } + + public void test002(){ + runTest("aspect-declared interface members in libraries - baseline"); + } + + public void test003(){ + runTest("aspect-declared interface members in libraries - interfaceOnly.jar"); + } + + public void test004(){ + runTest("aspect-declared interface members in libraries - aspectOnly.jar"); + } + + public void test005(){ + runTest("aspect-declared interface members in libraries - aspectedInterfaceOnly.jar"); + } + + public void test006(){ + runTest("aspect-declared interface members in libraries - aspectedInterfaceOnly.jar,aspectOnly.jar"); + } + + public void test007(){ + runTest("aspect-declared interface members in libraries - aspectedInterfaceOnlyBinary.jar,aspectOnly.jar"); + } + + public void test008(){ + runTest("aspect-declared interface members in libraries - aspectedInterfaceOnly.jar,aspectpath=aspectOnly.jar"); + } + + public void test009(){ + runTest("aspect-declared interface members in libraries - aspectedInterfaceOnly.jar,aspectpath=aspectOnly.jar"); + } + + public void test010(){ + runTest("exception clause for aspect-declared interface methods - positive"); + } + + public void test011(){ + runTest("exception clause for aspect-declared interface methods - negative"); + } + + public void test012(){ + runTest("exception clause for aspect-declared class methods - positive"); + } + + public void test013(){ + runTest("exception clause for aspect-declared class methods - negative"); + } + + public void test014(){ + runTest("exception clause for aspect-declared interface methods - positive binary"); + } + + public void test015(){ + runTest("exception clause for aspect-declared interface methods - negative binary"); + } + + public void test016(){ + runTest("exception clause for aspect-declared class methods - positive binary"); + } + + public void test017(){ + runTest("exception clause for aspect-declared class methods - negative binary"); + } + + public void test018(){ + runTest("percflow aspects compiled from jars share one instance for all entry points"); + } + + public void test019(){ + runTest("(using aspectpath) percflow aspects compiled from jars share one instance for all entry points"); + } + + public void test020(){ + runTest("Introduced abstract method on abstract class not implemented by subtype"); + } + + public void test021(){ + runTest("Introduced abstract method on interface not implemented by subtype (aspectpath)"); + } + + public void test022(){ + runTest("weaving from an aspectpath jar into that same jar.."); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/aspectpath/aspectpath-tests.xml b/tests/src/org/aspectj/systemtest/aspectpath/aspectpath-tests.xml new file mode 100644 index 000000000..9be3b32d3 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/aspectpath/aspectpath-tests.xml @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/aspectpath/aspectpath.xml b/tests/src/org/aspectj/systemtest/aspectpath/aspectpath.xml new file mode 100644 index 000000000..ba587fe9e --- /dev/null +++ b/tests/src/org/aspectj/systemtest/aspectpath/aspectpath.xml @@ -0,0 +1,12 @@ + +]> + + + + + +&tests; + + + diff --git a/tests/src/org/aspectj/systemtest/base/BaseTests.java b/tests/src/org/aspectj/systemtest/base/BaseTests.java new file mode 100644 index 000000000..37cdd7363 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/base/BaseTests.java @@ -0,0 +1,188 @@ +/* ******************************************************************* + * 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.base; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class BaseTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(BaseTests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/base/baseTests.xml"); + } + + + public void test001(){ + runTest("static and non-static before methods -- one file"); + } + + public void test002(){ + runTest("static and non-static before methods -- many files"); + } + + public void test003(){ + runTest("this redirection in non-static before methods"); + } + + public void test004(){ + runTest("DEPRECATED: introductions"); + } + + public void test005(){ + runTest("before constructors -- one file"); + } + + public void test006(){ + runTest("advise weaves find methods typed to builtins or non-woven classes"); + } + + public void test007(){ + runTest("make sure new weaves work inside of packages"); + } + + public void test008(){ + runTest("make sure new weaves work inside of packages (again)"); + } + + public void test009(){ + runTest("Inheritance of class and aspect vars in weaves"); + } + + public void test010(){ + runTest("Accessibility of class and aspect members from inside weaves"); + } + + public void test011(){ + runTest("Packaged aspects referring to packaged classes"); + } + + public void test012(){ + runTest("Inheritance of methods advised by aspects"); + } + + public void test013(){ + runTest("Inherited weaves on constructor"); + } + + public void test014(){ + runTest("Initializers in Aspect and Class Bodies"); + } + + public void test015(){ + runTest("Weaver Resolution of method names in method calls passed as args"); + } + + public void test016(){ + runTest("DEPRECATED: Introduce constructor with class inheritance"); + } + + public void test017(){ + runTest("empty and singular patterns on modifiers and throws"); + } + + public void test018(){ + runTest("DEPRECATED: Introduce of constructors"); + } + + public void test019(){ + runTest("Local declarations in advise bodies"); + } + + public void test020(){ + runTest("advises on introduced methods and constructors"); + } + + public void test021(){ + runTest("DEPRECATED: Method introduction into interface implemented by abstract class"); + } + + public void test022(){ + runTest("Crossing super calls in constructors"); + } + + public void test023(){ + runTest("empty modifier pattern"); + } + + public void test024(){ + runTest("Alpha conversion of argument names in designators"); + } + + public void test025(){ + runTest("advice uses its own formals to get actuals"); + } + + public void test026(){ + runTest("DEPRECATED: introduce weaves can use this"); + } + + public void test027(){ + runTest("DEPRECATED: introduce of abstract methods works"); + } + + public void test028(){ + runTest("multiple arounds successfully intercept and return own values"); + } + + public void test029(){ + runTest("proper matching of overloaded constructors"); + } + + public void test030(){ + runTest("proper handling of formals in catch advice"); + } + + public void test031(){ + runTest("proper values for thisJoinPoint attributes"); + } + + public void test032(){ + runTest("supers, supers, supers"); + } + + public void test033(){ + runTest("operations on private and protected aspect members (++, -- in partciular)"); + } + + public void test034(){ + runTest("only register things once"); + } + + public void test035(){ + runTest("inner aspects and around"); + } + + public void test036(){ + runTest("aspect inheritance and advice, introduction"); + } + + public void test037(){ + runTest("thisResultObject for primitives"); + } + + public void test038(){ + runTest("introductions calling super."); + } + + public void test039(){ + runTest("allow one argument calls even when there's a comma in the arglist"); + } + + public void test040(){ + runTest("advice on calls to static methods even works when called on super"); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/base/baseTests-tests.xml b/tests/src/org/aspectj/systemtest/base/baseTests-tests.xml new file mode 100644 index 000000000..264c03fab --- /dev/null +++ b/tests/src/org/aspectj/systemtest/base/baseTests-tests.xml @@ -0,0 +1,263 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/base/baseTests.xml b/tests/src/org/aspectj/systemtest/base/baseTests.xml new file mode 100644 index 000000000..420567395 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/base/baseTests.xml @@ -0,0 +1,10 @@ + +]> + + + + +&tests; + + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/design/DesignTests.java b/tests/src/org/aspectj/systemtest/design/DesignTests.java new file mode 100644 index 000000000..8a3248189 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/design/DesignTests.java @@ -0,0 +1,80 @@ +/* ******************************************************************* + * 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.design; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class DesignTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(DesignTests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/design/design.xml"); + } + + + public void test001(){ + runTest("initial tests for new introduction style"); + } + + public void test002(){ + runTest("overriding of introduced methods and accessibility"); + } + + public void test003(){ + runTest("within and introductions behaves correctly"); + } + + public void test004(){ + runTest("correct inheritance of multiple concrete methods"); + } + + public void test005(){ + runTest("errors in inheritance of multiple concrete methods"); + } + + public void test006(){ + runTest("declared exceptions are checked correctly on intros (errors)"); + } + + public void test007(){ + runTest("declared exceptions are checked correctly on intros"); + } + + public void test008(){ + runTest("Joinpoint is not created for foo(String) when before() advice is present."); + } + + public void test009(){ + runTest("more tests of eachobject with some difficult typing issues"); + } + + public void test010(){ + runTest("eachobject: eachobject(receptions(...)) [eachobject]"); + } + + public void test011(){ + runTest("Checking new joinpoints"); + } + + public void test012(){ + runTest("eachobject: simple test [eachobject] (still)"); + } + + public void test013(){ + runTest("scope issues with introduction (needs more work)"); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/design/design.xml b/tests/src/org/aspectj/systemtest/design/design.xml new file mode 100644 index 000000000..51cc93173 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/design/design.xml @@ -0,0 +1,11 @@ + +]> + + + + + +&designTests; + + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/design/designtest.xml b/tests/src/org/aspectj/systemtest/design/designtest.xml new file mode 100644 index 000000000..112d9b6c1 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/design/designtest.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/incremental/IncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/IncrementalTests.java new file mode 100644 index 000000000..fd7c1fa5e --- /dev/null +++ b/tests/src/org/aspectj/systemtest/incremental/IncrementalTests.java @@ -0,0 +1,194 @@ +/* ******************************************************************* + * 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.incremental; + +import java.io.File; + +import junit.framework.Test; + +import org.aspectj.testing.XMLBasedAjcTestCase; +import org.aspectj.tools.ajc.CompilationResult; +import org.aspectj.util.FileUtil; + +public class IncrementalTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(IncrementalTests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/incremental/incremental.xml"); + } + + + public void test001() throws Exception { + runTest("expect class added in initial incremental tests"); + nextIncrement(false); + copyFileAndDoIncrementalBuild("src.20/main/Main.java","src/main/Main.java"); + assertAdded("main/Target.class"); + run("main.Main"); + } + + public void test002() throws Exception { + runTest("expect class removed in initial incremental tests"); + nextIncrement(false); + assertAdded("main/Target.class"); + copyFileAndDoIncrementalBuild("src.20/main/Main.java","src/main/Main.java"); + assertDeleted("main/Target.class"); + run("main.Main"); + } + + public void test003() throws Exception { + runTest("expect class updated in initial incremental tests"); + long lastTime = nextIncrement(true); + copyFileAndDoIncrementalBuild("src.20/main/Main.java","src/main/Main.java"); + assertUpdated("main/Main.class",lastTime); + run("main.Main"); + } + + public void test004() throws Exception { + runTest("add file with class"); + nextIncrement(false); + copyFileAndDoIncrementalBuild("src.20/main/Target.java","src/main/Target.java"); + assertAdded("main/Target.class"); + long lastTime = nextIncrement(true); + copyFileAndDoIncrementalBuild("src.30/main/Main.java","src/main/Main.java"); + assertUpdated("main/Main.class",lastTime); + run("main.Main"); + } + + public void test005()throws Exception { + runTest("delete source file before incremental compile"); + nextIncrement(false); + MessageSpec messageSpec = new MessageSpec(null,newMessageList(new Message(6,"delete/Target.java",null,null))); + deleteFileAndDoIncrementalBuild("src/delete/DeleteMe.java",messageSpec); + nextIncrement(false); + copyFileAndDoIncrementalBuild("src.30/delete/Target.java","src/delete/Target.java"); + run("delete.Main"); + } + + public void test006() throws Exception { + runTest("do everything in default package (sourceroots)"); + nextIncrement(false); + copyFileAndDoIncrementalBuild("changes/Target.20.java","src/Target.java"); + run("Target"); + long lastTime = nextIncrement(true); + copyFileAndDoIncrementalBuild("changes/Main.30.java","src/Main.java"); + assertUpdated("Main.class",lastTime); + nextIncrement(false); + MessageSpec messageSpec = new MessageSpec(null,newMessageList(new Message(6,"Main.java",null,null))); + deleteFileAndDoIncrementalBuild("src/Target.java",messageSpec); + nextIncrement(false); + copyFileAndDoIncrementalBuild("changes/Main.50.java","src/Main.java"); + run("Main"); + } + + public void test007() throws Exception { + runTest("change sources in default package"); + nextIncrement(false); + copyFileAndDoIncrementalBuild("changes/Main.20.java","src/Main.java"); + run("Main"); + } + + public void test008() throws Exception { + runTest("change source"); + nextIncrement(false); + copyFileAndDoIncrementalBuild("changes/Main.20.java","src/app/Main.java"); + run("app.Main"); + } + + public void test009() throws Exception { + runTest("incrementally change only string literal, still expect advice"); + long lastTime = nextIncrement(true); + copyFileAndDoIncrementalBuild("changes/Main.20.java","src/packageOne/Main.java"); + assertUpdated("packageOne/Main.class",lastTime); + run("packageOne.Main",new String[] {"in longer packageOne.Main.main(..)", + "before main packageOne.Main"}, + null); + } + + public void test010() throws Exception { + runTest("add aspect source file and check world is rewoven"); + nextIncrement(false); + copyFileAndDoIncrementalBuild("changes/Detour.20.java","src/Detour.java"); + assertAdded("Detour.class"); + run("Main"); + } + + public void test011() throws Exception { + runTest("make sure additional classes generated during weave are deleted with src class file"); + nextIncrement(false); + assertTrue("AdviceOnIntroduced$AjcClosure1.class exists", + new File(ajc.getSandboxDirectory(),"AdviceOnIntroduced$AjcClosure1.class").exists()); + deleteFileAndDoIncrementalBuild("src/AdviceOnIntroduced.java"); + assertDeleted("AdviceOnIntroduced$AjcClosure1.class"); + } + + public void test012() throws Exception { + runTest("incremental with aspect-driven full rebuild"); + nextIncrement(false); + MessageSpec messageSpec = new MessageSpec(newMessageList(new Message(4,"Main.java",null,null)),null); + copyFileAndDoIncrementalBuild("changes/Aspect.20.java","src/Aspect.java",messageSpec); + run("Main"); + } + + private long nextIncrement(boolean doWait) { + long time = System.currentTimeMillis(); + if (doWait) { + try { + Thread.sleep(1000); + } catch (InterruptedException intEx) {} + } + return time; + } + + private void copyFileAndDoIncrementalBuild(String from, String to) throws Exception { + String dir = getCurrentTest().getDir(); + FileUtil.copyFile(new File(dir + File.separator + from), + new File(ajc.getSandboxDirectory(),to)); + CompilationResult result = ajc.doIncrementalCompile(); + assertNoMessages(result,"Expected clean compile from test '" + getCurrentTest().getTitle() + "'"); + } + + private void copyFileAndDoIncrementalBuild(String from, String to, MessageSpec expectedResults) throws Exception { + String dir = getCurrentTest().getDir(); + FileUtil.copyFile(new File(dir + File.separator + from), + new File(ajc.getSandboxDirectory(),to)); + CompilationResult result = ajc.doIncrementalCompile(); + assertMessages(result,"Test '" + getCurrentTest().getTitle() + "' did not produce expected messages",expectedResults); + } + + + private void deleteFileAndDoIncrementalBuild(String file, MessageSpec expectedResult) throws Exception { + new File(ajc.getSandboxDirectory(),file).delete(); + CompilationResult result = ajc.doIncrementalCompile(); + assertMessages(result,"Test '" + getCurrentTest().getTitle() + "' did not produce expected messages",expectedResult); + } + + private void deleteFileAndDoIncrementalBuild(String file) throws Exception { + deleteFileAndDoIncrementalBuild(file,MessageSpec.EMPTY_MESSAGE_SET); + } + + private void assertAdded(String file) { + assertTrue("File " + file + " should have been added", + new File(ajc.getSandboxDirectory(),file).exists()); + } + + private void assertDeleted(String file) { + assertFalse("File " + file + " should have been deleted", + new File(ajc.getSandboxDirectory(),file).exists()); + } + + private void assertUpdated(String file, long sinceTime) { + File f = new File(ajc.getSandboxDirectory(),file); + assertTrue("File " + file + " should have been updated",f.lastModified() > sinceTime); + } +} + diff --git a/tests/src/org/aspectj/systemtest/incremental/incremental-junit-tests.xml b/tests/src/org/aspectj/systemtest/incremental/incremental-junit-tests.xml new file mode 100644 index 000000000..f2f72c9f0 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/incremental/incremental-junit-tests.xml @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/incremental/incremental-tests.xml b/tests/src/org/aspectj/systemtest/incremental/incremental-tests.xml new file mode 100644 index 000000000..24b7a234a --- /dev/null +++ b/tests/src/org/aspectj/systemtest/incremental/incremental-tests.xml @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/incremental/incremental.xml b/tests/src/org/aspectj/systemtest/incremental/incremental.xml new file mode 100644 index 000000000..39d6a6823 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/incremental/incremental.xml @@ -0,0 +1,10 @@ + +]> + + + + +&tests; + + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/inpath/InPathTests.java b/tests/src/org/aspectj/systemtest/inpath/InPathTests.java new file mode 100644 index 000000000..6bd3bf749 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/inpath/InPathTests.java @@ -0,0 +1,96 @@ +/* ******************************************************************* + * 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.inpath; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class InPathTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(InPathTests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/inpath/inpath.xml"); + } + + + public void test001(){ + runTest("source for options -injars"); + } + + public void test002(){ + runTest("options -injars"); + } + + public void test003(){ + runTest("options -injars checking declare parents interactions"); + } + + public void test004(){ + runTest("The compiler crashes when using aspect libraries created without using -noweave"); + } + + public void test005(){ + runTest("declare warnings on main"); + } + + public void test006(){ + runTest("declare warnings on binary javac 1.4 classes"); + } + + public void test007(){ + runTest("declare warnings on binary ajc 1.1 classes"); + } + + public void test008(){ + runTest("Weaving rt.jar results in stack overflow"); + } + + public void test009(){ + runTest("Weaving failure when using injars (no jars)"); + } + + public void test010(){ + runTest("Weaving failure when using injars (on aspectpath)"); + } + + public void test011(){ + runTest("Weaving failure when using injars (on classpath)"); + } + + public void test012(){ + runTest("Weaving failure when using injars (actual injars)"); + } + + public void test013(){ + runTest("Introduced abstract method on interface not implemented by subtype (injars)"); + } + + public void test014(){ + runTest("error Type mismatch: cannot convert from java.lang.String to java.lang.String"); + } + + public void test015(){ + runTest("declare error binary-weaving NPE"); + } + + public void test016(){ + runTest("declare error binary-weaving NPE"); + } + + public void test017(){ + runTest("Regression from 1.1: NPE in CompilationResult"); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/inpath/inpath-tests.xml b/tests/src/org/aspectj/systemtest/inpath/inpath-tests.xml new file mode 100644 index 000000000..18d78cf28 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/inpath/inpath-tests.xml @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/inpath/inpath.xml b/tests/src/org/aspectj/systemtest/inpath/inpath.xml new file mode 100644 index 000000000..2c0eac4c7 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/inpath/inpath.xml @@ -0,0 +1,11 @@ + +]> + + + + + +&tests; + + 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 @@ + +]> + + + + + +&tests; + + diff --git a/tests/src/org/aspectj/systemtest/knownlimitations/KnownLimitationsTests.java b/tests/src/org/aspectj/systemtest/knownlimitations/KnownLimitationsTests.java new file mode 100644 index 000000000..481827125 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/knownlimitations/KnownLimitationsTests.java @@ -0,0 +1,144 @@ +/* ******************************************************************* + * 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.knownlimitations; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class KnownLimitationsTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(KnownLimitationsTests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/knownlimitations/knownlimitations.xml"); + } + + + public void test001(){ + runTest("DEPRECATED: introduce of variables"); + } + + public void test002(){ + runTest("checking the contra-variant errors for typing of proceed"); + } + + public void test003(){ + runTest("introduction of static methods and fields on classes and interfaces"); + } + + public void test004(){ + runTest("advice on catch clauses"); + } + + public void test005(){ + runTest("holding onto proceed calls in a closure-like way"); + } + + public void test006(){ + runTest("PR#458 Compiler was incorrectly flagging error in advice on initialization and static initialization"); + } + + public void test007(){ + runTest("Introduced type unavailable to instanceof expressions in introduced methods"); + } + + public void test008(){ + runTest("enclosing join point not exported properly in pre-initialization join point"); + } + + public void test009(){ + runTest("cyclic pointcut definitions"); + } + + public void test010(){ + runTest("package typepattern with no packages (in default package)"); + } + + public void test011(){ + runTest("flag errors when binding args with indeterminate prefix and suffix"); + } + + public void test012(){ + runTest("around and return types + inlining optimizations"); + } + + public void test013(){ + runTest("source locations within expressions (hard case of constructor start)"); + } + + public void test014(){ + runTest("declaring method on superclass and subclass"); + } + + public void test015(){ + runTest("illegal name binding in around cflow"); + } + + public void test016(){ + runTest("incrementally change string size and wire in injar classes"); + } + + public void test017(){ + runTest("before():execution(new(..)) does not throw NoAspectBoundException"); + } + + public void test018(){ + runTest("declare error on handler/method execution with no code on binary ajc 1.1 classes"); + } + + public void test019(){ + runTest("declare error on handler/method execution with no code on binary javac 1.4 classes"); + } + + public void test020(){ + runTest("CLE: -help usage"); + } + + public void test021(){ + runTest("declare warnings on main - constructor execution"); + } + + public void test022(){ + runTest("declare warnings on binary javac 1.4 main - constructor execution"); + } + + public void test023(){ + runTest("declare warnings on binary ajc 1.1 main - constructor execution"); + } + + public void test024(){ + runTest("advice on handler join points should not throw unpermitted checked exceptions"); + } + + public void test025(){ + runTest("-nowarn suppresses XLint warnings"); + } + + public void test026(){ + runTest("warn:none suppresses XLint warnings"); + } + + public void test027(){ + runTest("-nowarn suppresses declare warnings"); + } + + public void test028(){ + runTest("-warn:none suppresses declare warnings"); + } + + public void test029(){ + runTest("insertion of lots of advice code can make branch offset for if too large"); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/knownlimitations/knownLimitations-tests.xml b/tests/src/org/aspectj/systemtest/knownlimitations/knownLimitations-tests.xml new file mode 100644 index 000000000..d420885de --- /dev/null +++ b/tests/src/org/aspectj/systemtest/knownlimitations/knownLimitations-tests.xml @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/knownlimitations/knownLimitations.xml b/tests/src/org/aspectj/systemtest/knownlimitations/knownLimitations.xml new file mode 100644 index 000000000..25d99f6e4 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/knownlimitations/knownLimitations.xml @@ -0,0 +1,11 @@ + +]> + + + + + +&tests; + + diff --git a/tests/src/org/aspectj/systemtest/options/OptionsTests.java b/tests/src/org/aspectj/systemtest/options/OptionsTests.java new file mode 100644 index 000000000..746c51011 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/options/OptionsTests.java @@ -0,0 +1,44 @@ +/* ******************************************************************* + * 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.options; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class OptionsTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(OptionsTests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/options/options.xml"); + } + + + public void test001(){ + runTest("options -warn:deprecation"); + } + + public void test002(){ + runTest("options -warn:deprecation not enabled"); + } + + public void test003(){ + runTest("setting -warn:constructorName works"); + } + + public void test004(){ + runTest("-deprecation not working?"); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/options/options-tests.xml b/tests/src/org/aspectj/systemtest/options/options-tests.xml new file mode 100644 index 000000000..d109cd2d0 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/options/options-tests.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/options/options.xml b/tests/src/org/aspectj/systemtest/options/options.xml new file mode 100644 index 000000000..d877da040 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/options/options.xml @@ -0,0 +1,10 @@ + +]> + + + + +&tests; + + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/pre10x/AjcPre10xTests.java b/tests/src/org/aspectj/systemtest/pre10x/AjcPre10xTests.java new file mode 100644 index 000000000..264b4f55e --- /dev/null +++ b/tests/src/org/aspectj/systemtest/pre10x/AjcPre10xTests.java @@ -0,0 +1,316 @@ +/* ******************************************************************* + * 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.pre10x; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class AjcPre10xTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(AjcPre10xTests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/pre10x/pre10x.xml"); + } + + + public void test001(){ + runTest("Using 'aspect' 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 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 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 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 test010(){ + runTest("the designator for the introduction has no type after the | charcter"); + } + + public void test011(){ + runTest("crosscut signature does not match"); + } + + 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 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"); + } + + 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"); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/pre10x/pre10x-tests.xml b/tests/src/org/aspectj/systemtest/pre10x/pre10x-tests.xml new file mode 100644 index 000000000..90a1de463 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/pre10x/pre10x-tests.xml @@ -0,0 +1,629 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/pre10x/pre10x.xml b/tests/src/org/aspectj/systemtest/pre10x/pre10x.xml new file mode 100644 index 000000000..cfaa7480d --- /dev/null +++ b/tests/src/org/aspectj/systemtest/pre10x/pre10x.xml @@ -0,0 +1,10 @@ + +]> + + + + +&tests; + + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/purejava/PureJavaTests.java b/tests/src/org/aspectj/systemtest/purejava/PureJavaTests.java new file mode 100644 index 000000000..d692464f5 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/purejava/PureJavaTests.java @@ -0,0 +1,992 @@ +/* ******************************************************************* + * 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.purejava; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class PureJavaTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(PureJavaTests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/pureJava/pureJava.xml"); + } + + + public void test001(){ + runTest("unicodes and literals"); + } + + public void test002(){ + runTest("For Statement"); + } + + public void test003(){ + runTest("correct super call lookup for method().name()"); + } + + public void test004(){ + runTest("combined logic expression (handling coericions vs. parens)"); + } + + public void test005(){ + runTest("comment after class closes (with no new line at end)"); + } + + public void test006(){ + runTest("multi-dimensional array initializers"); + } + + public void test007(){ + runTest("probelm with the generated names of exceptions"); + } + + public void test008(){ + runTest("checks if the class field can be used on all of the primitive types"); + } + + public void test009(){ + runTest("Doesn't parse an array-returning method that throws an exception"); + } + + public void test010(){ + runTest("check that nested constructions of local classes work"); + } + + public void test011(){ + runTest("Make sure anonymous classes can have non-nullary constructors"); + } + + public void test012(){ + runTest("Full names are dropped from inner interfaces"); + } + + public void test013(){ + runTest("Making sure full names stay on static inner classes"); + } + + public void test014(){ + runTest("Not binding constructor when using more than one compilation"); + } + + public void test015(){ + runTest("return;;; is not really legal"); + } + + public void test016(){ + runTest("ajc treating Throwable as checked, issuing error if not found"); + } + + public void test017(){ + runTest("package protected classes becoming public"); + } + + public void test018(){ + runTest("IOException on windows if nul used as identifier"); + } + + public void test019(){ + runTest("NullPointerException (not compiler error) when extending non-static inner class"); + } + + public void test020(){ + runTest("compiler flags final static variable as indefinite in member assignment."); + } + + public void test021(){ + runTest("confirm no IOException on windows if nul used as identifier"); + } + + public void test022(){ + runTest("final constructor parameter causes incorrect compiler error"); + } + + public void test023(){ + runTest("Error expected for field of type void"); + } + + public void test024(){ + runTest("Error expected for constructor in interfaces"); + } + + public void test025(){ + runTest("class name for identifier as String should provoke error"); + } + + public void test026(){ + runTest("cyclic interface inheritance not detected if no classes implement the interfaces"); + } + + public void test027(){ + runTest("cyclic class inheritance"); + } + + public void test028(){ + runTest("type and package name conflicts are resolved happily (1a)"); + } + + public void test029(){ + runTest("(fails in USEJAVAC) type and package name conflicts are resolved happily (1b)"); + } + + public void test030(){ + runTest("type and package name conflicts caught as errors (1)"); + } + + public void test031(){ + runTest("flow analysis where final variable set in another constructor"); + } + + public void test032(){ + runTest("Can construct inner classes using qualified expressions"); + } + + public void test033(){ + runTest("subclass unable to access protected static methods using type-qualified references"); + } + + public void test034(){ + runTest("Undefined inner class constructor"); + } + + public void test035(){ + runTest("classes that are package prefixes are illegal"); + } + + public void test036(){ + runTest("valid type expressions for introduced type testing"); + } + + public void test037(){ + runTest("PR591 compiler error expected when directly calling unimplemented abstract method using super"); + } + + public void test038(){ + runTest("suggested by Jacks 15.28-qualified-namestr tests"); + } + + public void test039(){ + runTest("suggested by jacks 3.7-15 all comments must be closed"); + } + + public void test040(){ + runTest("package class access not enforced outside of package"); + } + + public void test041(){ + runTest("expecting CE for ambiguous reference"); + } + + public void test042(){ + runTest("try without catch or finally"); + } + + public void test043(){ + runTest("invalid floating-point constant"); + } + + public void test044(){ + runTest("concrete aspect unable to access abstract package-private method in parent for overriding"); + } + + public void test045(){ + runTest("super reference used to disambiguate names of different but compatible types"); + } + + public void test046(){ + runTest("anonymous explicit inner constructors"); + } + + public void test047(){ + runTest("Overruning the lineStarts buffer, DO NOT EDIT THIS FILE!!!!"); + } + + public void test048(){ + runTest("no CE for unambiguous type reference"); + } + + public void test049(){ + runTest("CE for ambiguous type reference (imports)"); + } + + public void test050(){ + runTest("CE for ambiguous type reference (two type declarations)"); + } + + public void test051(){ + runTest("CE for ambiguous type reference (two inner types)"); + } + + public void test052(){ + runTest("final assignment in loop"); + } + + public void test053(){ + runTest("private super access in inners"); + } + + public void test054(){ + runTest("nested interface does not require new qualifier (8)"); + } + + public void test055(){ + runTest("nested interface does not require new qualifier (9)"); + } + + public void test056(){ + runTest("nested interface does not require new qualifier (10)"); + } + + public void test057(){ + runTest("nested interface does not require new qualifier (14)"); + } + + public void test058(){ + runTest("nested interface does not require new qualifier (15)"); + } + + public void test059(){ + runTest("nested interface does not require new qualifier (16)"); + } + + public void test060(){ + runTest("check that constructor name's match the enclosing type"); + } + + public void test061(){ + runTest("errors for not applicable or accessible methods"); + } + + public void test062(){ + runTest("import statement within class body crashes compiler"); + } + + public void test063(){ + runTest("Accessing instance fields and instance methods statically."); + } + + public void test064(){ + runTest("Crashes when a cast is within another cast"); + } + + public void test065(){ + runTest("Crashes when a cast of the form )int) appears"); + } + + public void test066(){ + runTest("Crashes when the closing brace is reversed"); + } + + public void test067(){ + runTest("Crashes when a method name is missing in a call -- e.g. 'System.out.();'"); + } + + public void test068(){ + runTest("Crashes when a bad r-value appears."); + } + + public void test069(){ + runTest("Two underscores as a variables causes a crash"); + } + + public void test070(){ + runTest("Crashes when assigning to a final static in an intializer and declaration"); + } + + public void test071(){ + runTest("Crashes when two dots appear instead of one"); + } + + public void test072(){ + runTest("Crashes when there're stray dots"); + } + + public void test073(){ + runTest("Stray characters cause a crash"); + } + + public void test074(){ + runTest("Colon instead of a semi-colon causes a crash"); + } + + public void test075(){ + runTest("type error in initializer caught by ajc, not javac"); + } + + public void test076(){ + runTest("Circular inheritance with classes causes a stack overflow."); + } + + public void test077(){ + runTest("Missing ;"); + } + + public void test078(){ + runTest("cast expressions should not allow casts between ifaces and array types"); + } + + public void test079(){ + runTest("parsing errors for various bad forms of NewArrayExprs."); + } + + public void test080(){ + runTest("good error for bad field and inner class references"); + } + + public void test081(){ + runTest("Implementing a non-interface used to crash the compiler."); + } + + public void test082(){ + runTest("error of no return statement detected not by ajc but by javac (line 4)"); + } + + public void test083(){ + runTest("class and interface extension"); + } + + public void test084(){ + runTest("types in throws clauses"); + } + + public void test085(){ + runTest("bad switch syntax"); + } + + public void test086(){ + runTest("Referencing various things from static contexts"); + } + + public void test087(){ + runTest("Some expressions are illegal expression statements"); + } + + public void test088(){ + runTest("illegal forward reference"); + } + + public void test089(){ + runTest("protected accessibility"); + } + + public void test090(){ + runTest("parse-time illegal modifiers"); + } + + public void test091(){ + runTest("check-time illegal modifiers"); + } + + public void test092(){ + runTest("illegal synchronized stmts"); + } + + public void test093(){ + runTest("modifiers on interface members"); + } + + public void test094(){ + runTest("good errors (and not too many) for missing members"); + } + + public void test095(){ + runTest("expecting compile failures with subclass narrowing scope of superclass methods or accessing private superclass variables"); + } + + public void test096(){ + runTest("inner classes may not have static non-constant members"); + } + + public void test097(){ + runTest("flow analysis with local types"); + } + + public void test098(){ + runTest("PR584 Can construct inner classes using qualified expressions"); + } + + public void test099(){ + runTest("incrementing objects, arrays - 2"); + } + + public void test100(){ + runTest("incrementing objects, arrays CE"); + } + + public void test101(){ + runTest("incrementing objects, arrays - 3"); + } + + public void test102(){ + runTest("incrementing objects, arrays"); + } + + public void test103(){ + runTest("no circularity errors simply because of inners (1)"); + } + + public void test104(){ + runTest("no circularity errors simply because of inners (2)"); + } + + public void test105(){ + runTest("should have circular inheritance errors (1)"); + } + + public void test106(){ + runTest("should have circular inheritance errors (2)"); + } + + public void test107(){ + runTest("interface using preceding subinterface in its definition"); + } + + public void test108(){ + runTest("Parent interface using public inner interface of child in same file"); + } + + public void test109(){ + runTest("a type is not allowed to extend or implement its own innner type"); + } + + public void test110(){ + runTest("try requires block JLS 14.19"); + } + + public void test111(){ + runTest("loop expressions not declarations"); + } + + public void test112(){ + runTest("no error when public class is in file of a different name"); + } + + public void test113(){ + runTest("local variables must be final to be accessed from inner class"); + } + + public void test114(){ + runTest("final local variables may be accessed from inner class"); + } + + public void test115(){ + runTest("missing package identifier"); + } + + public void test116(){ + runTest("CE for ambiguous type reference (two files in package)"); + } + + public void test117(){ + runTest("initializer can throw so long as all constructors declare so"); + } + + public void test118(){ + runTest("interfaces may not contain initializers (bug found by jacks)"); + } + + public void test119(){ + runTest("initializers must be able to complete normally (found by jacks)"); + } + + public void test120(){ + runTest("more tests of super alone"); + } + + public void test121(){ + runTest("subclass access to enclosing super class private members"); + } + + public void test122(){ + runTest("various tests of switch bounds"); + } + + public void test123(){ + runTest("VerifyError if nested sync returning result"); + } + + public void test124(){ + runTest("assert flow"); + } + + public void test125(){ + runTest("assert flow - 2"); + } + + public void test126(){ + runTest("assert typing"); + } + + public void test127(){ + runTest("assert coverage tests [requires 1.4]"); + } + + public void test128(){ + runTest("assert coverage tests in one package [requires 1.4]"); + } + + public void test129(){ + runTest("compiling asserts in methods"); + } + + public void test130(){ + runTest("import of a class in the default package"); + } + + public void test131(){ + runTest("Referencing static interfaces with import statements"); + } + + public void test132(){ + runTest("Referencing static interfaces with import statements stars"); + } + + public void test133(){ + runTest("Referencing static interfaces with import statements stars 2"); + } + + public void test134(){ + runTest("Referencing static interfaces with import statements stars 3"); + } + + public void test135(){ + runTest("Referencing interfaces with import statements"); + } + + public void test136(){ + runTest("Referencing interfaces with import statements stars"); + } + + public void test137(){ + runTest("Referencing interfaces with import statements stars 2"); + } + + public void test138(){ + runTest("Referencing interfaces with import statements stars 3"); + } + + public void test139(){ + runTest("import any inner from interface implementor"); + } + + public void test140(){ + runTest("equals method on quoted strings"); + } + + public void test141(){ + runTest("anonymous inner class"); + } + + public void test142(){ + runTest("parsing of parenthesized 'this' (in returns)"); + } + + public void test143(){ + runTest("Strings are folded and interned correctly"); + } + + public void test144(){ + runTest("Cast binds tighter than equality tests"); + } + + public void test145(){ + runTest("Boundary base values can be parsed"); + } + + public void test146(){ + runTest("State is passed correctly across nested annonymous inners"); + } + + public void test147(){ + runTest("?: expressions should typecheck in interesting ways"); + } + + public void test148(){ + runTest("cast expressions should allow casts to/from interfaces at compile-time."); + } + + public void test149(){ + runTest("various anonymous inner classes plus super types tests"); + } + + public void test150(){ + runTest("Various comment syntaxes should be handled."); + } + + public void test151(){ + runTest("Abstract inner classes across package boundaries"); + } + + public void test152(){ + runTest("inner classes accessing outers and some more inner class names"); + } + + public void test153(){ + runTest("remember to cast folded values down to the proper types."); + } + + public void test154(){ + runTest("inner classes can be built using protected constructors in super"); + } + + public void test155(){ + runTest("The current AspectJ compiler cannot parse qualified superclass constructor invocations"); + } + + public void test156(){ + runTest("More thourough test of static members using full names"); + } + + public void test157(){ + runTest("More thourough test of static members using imports"); + } + + public void test158(){ + runTest("Looking in class Java for java.lang.String WITH separate compilation"); + } + + public void test159(){ + runTest("Looking in class Java for java.lang.String WITHOUT separate compilation"); + } + + public void test160(){ + runTest("Looking in class Java for java.lang.String WITH separate compilation with packages"); + } + + public void test161(){ + runTest("Looking in class Java for java.lang.String WITHOUT separate compilation with packages"); + } + + public void test162(){ + runTest("Testing ternary operations."); + } + + public void test163(){ + runTest("Lifting locals in switch statements."); + } + + public void test164(){ + runTest("Getting confused when looking up method signatures"); + } + + public void test165(){ + runTest("Not recognizing the chars '\0', '\1', '\2', '\3', '\4', '\5', '\6', '\7'"); + } + + public void test166(){ + runTest("Test chars '\0', '\1', '\2', '\3', '\4', '\5', '\6', '\7' with a case statement"); + } + + public void test167(){ + runTest("Checking character values with all the unicode chars."); + } + + public void test168(){ + runTest("Trouble finding methods with the same name and different parameter types"); + } + + public void test169(){ + runTest("Binding non-public static inner classes of interfaces in other packages"); + } + + public void test170(){ + runTest("Not recognizing the octal chars '\0', '\1', '\2', '\3', '\4', '\5', '\6', '\7'"); + } + + public void test171(){ + runTest("Members with the same name as their package cause confusion with fully-qualified names."); + } + + public void test172(){ + runTest("Fully-qual'ed names with same start as variable names"); + } + + public void test173(){ + runTest("Fully qualifying inner classes within annonymous classes causes problems."); + } + + public void test174(){ + runTest("Calls to methods in outer annonymous classes are being qual's incorrectly with 'this'"); + } + + public void test175(){ + runTest("Reading inner classes from source and bytecode (1) -- was failing"); + } + + public void test176(){ + runTest("Reading inner classes from source and bytecode (2)"); + } + + public void test177(){ + runTest("Reading inner classes from source and bytecode (3)"); + } + + public void test178(){ + runTest("Not lifting types correctly with bytes and shorts with ternary ops"); + } + + public void test179(){ + runTest("Not looking up methods inside of anonymous declarations correctly."); + } + + public void test180(){ + runTest("Resolving extended classes with array parameters"); + } + + public void test181(){ + runTest("Assignments as second arguments in ternary operators."); + } + + public void test182(){ + runTest("Conflicting inner classes with interfaces."); + } + + public void test183(){ + runTest("confusions of casts and parens"); + } + + public void test184(){ + runTest("default constructors seen by inner classes subtyping outers"); + } + + public void test185(){ + runTest("folding fields set to anonymous instances containing self-references"); + } + + public void test186(){ + runTest("finally at the end of a method that needs to return"); + } + + public void test187(){ + runTest("overriding methods from object in interfaces and multiple-inheritance"); + } + + public void test188(){ + runTest("private fields in an outer class accessed by an inner which also extends the outer"); + } + + public void test189(){ + runTest("breaking out of a labeled block inside of an if"); + } + + public void test190(){ + runTest("abstractifying a method and getting it back through super"); + } + + public void test191(){ + runTest("Packages and static classes with the same name produce compile errors."); + } + + public void test192(){ + runTest("Inner types must generate classfiles with only Public/Default access flags."); + } + + public void test193(){ + runTest("Default constructors have same access as their enclosing type"); + } + + public void test194(){ + runTest("Returning primitive values matching method return type (minimal)"); + } + + public void test195(){ + runTest("Flow analysis and if(true)"); + } + + public void test196(){ + runTest("packages and generated inner types (for I.class)"); + } + + public void test197(){ + runTest("A.this exprs match by exact type matching"); + } + + public void test198(){ + runTest("Implicit this for new inner instance must be avaliable"); + } + + public void test199(){ + runTest("Inners can reference protected fields of their outer's super."); + } + + public void test200(){ + runTest("Primitives that special case for a constant arm should work"); + } + + public void test201(){ + runTest("Parenthesized true and false don't parse"); + } + + public void test202(){ + runTest("Field sets to public fields of private fields of enclosing types"); + } + + public void test203(){ + runTest("Constant values should be stored with the correct type of their fields"); + } + + public void test204(){ + runTest("Local variables in initializers should not be treated as blank final fields"); + } + + public void test205(){ + runTest("Binops aren't allowed as update stmts in for loops"); + } + + public void test206(){ + runTest("Can't avoid doing division in case of div by zero"); + } + + public void test207(){ + runTest("Testing frames w/greater than FF locals and 7F incs (i.e., WIDE instruction)"); + } + + public void test208(){ + runTest("correct numeric literals"); + } + + public void test209(){ + runTest("invalid numeric literals"); + } + + public void test210(){ + runTest("inner types can't have the same simple name as an enclosing type"); + } + + public void test211(){ + runTest("test the unops and binops with various values"); + } + + public void test212(){ + runTest("test + and += for strings and variously typed values"); + } + + public void test213(){ + runTest("test try/catch/finally statements"); + } + + public void test214(){ + runTest("local types can be bound in the signatures of other local types"); + } + + public void test215(){ + runTest("type and package name conflicts are resolved happily (2)"); + } + + public void test216(){ + runTest("try statements work sorta like scoped items for exception flow control"); + } + + public void test217(){ + runTest("qualified this must work exactly, not based on subtypes"); + } + + public void test218(){ + runTest("nested finally blocks have interesting frame location problems"); + } + + public void test219(){ + runTest("nested synchronized blocks have interesting frame location problems"); + } + + public void test220(){ + runTest("anonymous inner classes with inner types"); + } + + public void test221(){ + runTest("qualified super call expr"); + } + + public void test222(){ + runTest("interfaces with non-explicitly static inner classes"); + } + + public void test223(){ + runTest("Operands work correctly"); + } + + public void test224(){ + runTest("simple tests of throws and for stmt typing"); + } + + public void test225(){ + runTest("test for not folding circular constants"); + } + + public void test226(){ + runTest("continue targets must be continuable"); + } + + public void test227(){ + runTest("qualified this to non-inner should be caught"); + } + + public void test228(){ + runTest("Cannot bind a name."); + } + + public void test229(){ + runTest("interface declaration not permitted in local method scope"); + } + + public void test230(){ + runTest("Locals inside other locals, ordering of processing [eh]"); + } + + public void test231(){ + runTest("asserts"); + } + + public void test232(){ + runTest("non-constant static final fields marked as final in .class"); + } + + public void test233(){ + runTest("handle multiple nested inner classes"); + } + + public void test234(){ + runTest("advice on a static method"); + } + + public void test235(){ + runTest("inner constructor syntax causes compile error"); + } + + public void test236(){ + runTest("widening of method parameters to match javac"); + } + + public void test237(){ + runTest("parenthesized string literals matching primitive type names"); + } + + public void test238(){ + runTest("simple type coercions tests"); + } + + public void test239(){ + runTest("order of type declarations shouldn't matter"); + } + + public void test240(){ + runTest("Scanner non recognizing strictfp."); + } + + public void test241(){ + runTest("Crashes when a lot of zeros are in front of a double variable [!!! purejava]"); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/purejava/pureJava-tests.xml b/tests/src/org/aspectj/systemtest/purejava/pureJava-tests.xml new file mode 100644 index 000000000..9864ffe79 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/purejava/pureJava-tests.xml @@ -0,0 +1,1894 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/purejava/pureJava.xml b/tests/src/org/aspectj/systemtest/purejava/pureJava.xml new file mode 100644 index 000000000..1eb4b9f60 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/purejava/pureJava.xml @@ -0,0 +1,10 @@ + +]> + + + + +&tests; + + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/serialVerUID/SUIDTests.java b/tests/src/org/aspectj/systemtest/serialVerUID/SUIDTests.java new file mode 100644 index 000000000..8f5241287 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/serialVerUID/SUIDTests.java @@ -0,0 +1,96 @@ +/* ******************************************************************* + * 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.serialVerUID; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class SUIDTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(SUIDTests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID.xml"); + } + + + public void test001(){ + runTest("SUID: Before execution advice"); + } + + public void test002(){ + runTest("SUID: Around execution advice"); + } + + public void test003(){ + runTest("SUID: Around closure execution advice (-Xlint:ignore)"); + } + + public void test004(){ + runTest("SUID: Around closure execution advice"); + } + + public void test005(){ + runTest("SUID: thisJoinPoint"); + } + + public void test006(){ + runTest("SUID: thisJoinPoint with clinit method"); + } + + public void test007(){ + runTest("SUID: After returning staticinitialization advice"); + } + + public void test008(){ + runTest("SUID: After returning staticinitialization advice with serialVersionUID field"); + } + + public void test009(){ + runTest("SUID: ITD field"); + } + + public void test010(){ + runTest("SUID: ITD method"); + } + + public void test011(){ + runTest("SUID: Declare extends"); + } + + public void test012(){ + runTest("SUID: Declare implements (compile)"); + } + + public void test013(){ + runTest("SUID: Declare implements non-Serializable (compile)"); + } + + public void test014(){ + runTest("SUID: Declare implements Serializable (compile)"); + } + + public void test015(){ + runTest("SUID: Declare implements (weave)"); + } + + public void test016(){ + runTest("SUID: Priviliged aspect"); + } + + public void test017(){ + runTest("SUID: Perthis aspect"); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID-tests.xml b/tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID-tests.xml new file mode 100644 index 000000000..f121ac3f1 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID-tests.xml @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID.xml b/tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID.xml new file mode 100644 index 000000000..20bfa889d --- /dev/null +++ b/tests/src/org/aspectj/systemtest/serialVerUID/serialVerUID.xml @@ -0,0 +1,10 @@ + +]> + + + + +&tests; + + diff --git a/tests/src/org/aspectj/systemtest/xlint/XLintTests.java b/tests/src/org/aspectj/systemtest/xlint/XLintTests.java new file mode 100644 index 000000000..d3c1c54aa --- /dev/null +++ b/tests/src/org/aspectj/systemtest/xlint/XLintTests.java @@ -0,0 +1,104 @@ +/* ******************************************************************* + * 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.xlint; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class XLintTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(XLintTests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/xlint/xlint.xml"); + } + + + public void test001(){ + runTest("options -Xlint args()"); + } + + public void test002(){ + runTest("options declare field on bad type"); + } + + public void test003(){ + runTest("options declare method on bad type"); + } + + public void test004(){ + runTest("options -Xlint declare parent"); + } + + public void test005(){ + runTest("options -Xlint target()"); + } + + public void test006(){ + runTest("options -Xlint this()"); + } + + public void test007(){ + runTest("options negative -Xlint args()"); + } + + public void test008(){ + runTest("options negative -Xlint declare parent"); + } + + public void test009(){ + runTest("options negative -Xlint target()"); + } + + public void test010(){ + runTest("options negative -Xlint this()"); + } + + public void test011(){ + runTest("unmatched type name in a declare parents should result in a warning in -Xlint mode"); + } + + public void test012(){ + runTest("privileged access to code outside the control of the compiler"); + } + + public void test013(){ + runTest("Unexpected Xlint:unresolvableMember warning with withincode"); + } + + public void test014(){ + runTest("valid XLintWarningTest file, default level of warning"); + } + + public void test015(){ + runTest("XLint:ignore suppresses XLint warnings"); + } + + public void test016(){ + runTest("XLint:error promotes XLint warnings to error"); + } + + public void test017(){ + runTest("alias getCause for getWrappedThrowable in SoftException"); + } + + public void test018(){ + runTest("XLint warning for call PCD's using subtype of defining type"); + } + + public void test019(){ + runTest("XLint warning for call PCD's using subtype of defining type (-1.3 -Xlint:ignore)"); + } + +} + diff --git a/tests/src/org/aspectj/systemtest/xlint/xlint-tests.xml b/tests/src/org/aspectj/systemtest/xlint/xlint-tests.xml new file mode 100644 index 000000000..150aa984a --- /dev/null +++ b/tests/src/org/aspectj/systemtest/xlint/xlint-tests.xml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/xlint/xlint.xml b/tests/src/org/aspectj/systemtest/xlint/xlint.xml new file mode 100644 index 000000000..efe2a0014 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/xlint/xlint.xml @@ -0,0 +1,10 @@ + +]> + + + + +&tests; + + \ No newline at end of file -- cgit v1.2.3