123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480 |
- <!-- AspectJ v1.2.0 Tests -->
-
- <ajc-test dir="bugs/concretizeNpe" pr="43033"
- title="NPE in concretization error path"
- keywords="poorErrorMessages">
- <compile files="base/ExceptionHandling.java,model/ModelExceptionHandling.java">
- <!--
- <message line="5" kind="error" text="pointcut base.ExceptionHandling.scope() is abstract"/>
- <message line="4" kind="error" text="inherited abstract pointcut base.ExceptionHandling.scope() is not made concrete"/>
- <message line="8" kind="error" text="inherited abstract pointcut base.ExceptionHandling.scope() is not made concrete"/>
- <message line="12" kind="error" />
- <message line="13" kind="error" />
- -->
- <message line="12" kind="error" />
- <message line="13" kind="error" />
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs/privilege/packageProtected" pr="42711"
- title="priviledged aspects calling methods from advice">
- <compile files="concern/ContextUser.java,concern/BaseTarget.java,core/Base.java" />
- </ajc-test>
-
- <ajc-test dir="bugs" pr="49457"
- title="No error on overloaded pointcuts in class">
- <compile files="OverloadedPointcutsInClass.java">
- <message kind="error" line="3" text="duplicate pointcut name: pc1"/>
- <message kind="error" line="4" text="duplicate pointcut name: pc1"/>
- <message kind="error" line="6" text="duplicate pointcut name: pc2"/>
- <message kind="error" line="7" text="duplicate pointcut name: pc2"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="49457"
- title="No error on overloaded pointcuts unless binding variables">
- <compile files="OverloadedPointcutsInAspect.java">
- <message kind="error" line="15" text="duplicate pointcut name: pc"/>
- <message kind="error" line="16" text="duplicate pointcut name: pc"/>
- <message kind="error" line="18" text="incompatible type"/>
- <message kind="error" line="20" text="incompatible type"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="48522"
- title="Declare soft softening other exception types">
- <compile files="SofteningTooMuch.java">
- <message kind="error" line="6" text="Unhandled exception"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="47754"
- title="static method introduction on interfaces, should not be allowed">
- <compile files="StaticInterfaceMethods.java">
- <message kind="error" line="7" text="methods in interfaces cannot be declared static"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="45184"
- title="External pointcut refs not resolved if named pointcut used by declare">
- <compile files="DeclareErrorNamedPointcutCE.java">
- <message kind="error" line="10" text="ref"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs"
- title="Appropriate message for 'after() thowing(Throwable th)' syntax error"
- pr="49638"
- >
- <compile
- files="AfterThrowingAdviceSyntaxError.java" >
- <message kind="error" line="21" />
- <message kind="error" line="23" />
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs/faultingInSource" pr="46671"
- title="Ensure we don't look for source on the classpath when binary not found">
- <compile files="SimpleTracing.java" classpath="." options="-verbose">
- <message kind="warning" line="4" text="no match for this type name: SampleClass"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="46750" title="inner aspect containing declare soft">
- <compile files="TestSoftening.java">
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="45663"
- title="Bad parser error recovery in advice">
- <compile files="ParserRecoveryTest.java">
- <message kind="error" line="7"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="45663"
- title="Bad parser error recovery in java source">
- <compile files="ParserRecoveryTestPureJava.java">
- <message kind="error" line="6"/>
- <message kind="error" line="8"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs"
- pr="46280"
- title="compiler issues error on inner aspects when privilieged">
- <compile files="PrivilegedParsing.java"/>
- <run class="PrivilegedParsing"/>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="44586"
- title="After throwing advice on ctors doesn't execute for inter-type decl field inits">
- <compile files="AfterThrowingCtor.java">
- </compile>
- <run class="AfterThrowingCtor"/>
- </ajc-test>
-
- <ajc-test dir="bugs/abstractMethods" pr="49784"
- title="Introduced abstract method on abstract class not implemented by subtype (single source file)">
- <compile files="singlesource/C.java">
- <message kind="error" line="9"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs/abstractMethods" pr="49784"
- title="Introduced abstract method on abstract class with introduced concrete method (single source file)">
- <compile files="singlesource/C1.java"/>
- <run class="C1"/>
- </ajc-test>
-
- <ajc-test dir="bugs/abstractMethods" pr="49784"
- title="Introduced abstract method on abstract class with existing concrete method (single source file)">
- <compile files="singlesource/C2.java"/>
- <run class="C2"/>
- </ajc-test>
-
- <ajc-test dir="bugs/interAbstract"
- pr="49784"
- title="aspect declares interface method (no modifiers)">
- <compile files="InterfaceMethodDeclarationNone.java" >
- <message kind="error" line="32" text="requires a body" />
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs/interAbstract"
- pr="49784"
- title="aspect declares interface method (abstract)">
- <compile files="InterfaceMethodDeclarationAbstract.java">
- <message kind="error" line="40" text="abstract intertype method declaration 'int I.getInt()' on interface I must be declared public (compiler limitation)" />
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs/interAbstract"
- pr="49784"
- comment="working in 1.1.1 - keep with others?"
- title="aspect declares interface method (public abstract)">
- <compile files="InterfaceMethodDeclarationFull.java" />
- <run class="InterfaceMethodDeclarationFull"/>
- </ajc-test>
-
- <ajc-test dir="bugs/interfaceDefinition"
- pr="43972"
- title="Use class implementing interface via aspect (not woven together)">
- <compile
- files="pack/DefineInterface.java,
- pack/InterfaceDefinition.java,
- pack/MyInterface.java"/>
- <run class="pack.InterfaceDefinition"/>
- <compile
- includeClassesDir="true"
- files="Main.java">
- <message kind="error" line="3"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs/interfaceDefinition"
- pr="43972"
- title="Use class implementing interface via aspect (weave all together)">
- <compile
- files="pack/DefineInterface.java,
- pack/InterfaceDefinition.java,
- pack/MyInterface.java,
- Main.java"/>
- <run class="pack.InterfaceDefinition"/>
- <run class="Main"/>
- </ajc-test>
-
- <ajc-test dir="bugs/interfaceDefinition"
- pr="43972"
- title="Use class implementing interface via aspect (only one implementer)">
- <compile
- files="pack/DefineInterface.java,
- pack/InterfaceDefinition.java,
- pack/MyInterface.java"/>
- <run class="pack.InterfaceDefinition"/>
- <compile
- includeClassesDir="true"
- files="Main1.java"/>
- <run class="Main1"/>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="44587"
- title="Erroneous exception conversion">
- <compile files="ErroneousExceptionConversion.java">
- </compile>
- <run class="ErroneousExceptionConversion"/>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="34206"
- title="before():execution(new(..)) does not throw NoAspectBoundException">
- <compile files="ErroneousExceptionConversion1.java">
- </compile>
- <run class="ErroneousExceptionConversion1"/>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="38824"
- title="Anomalous handling of inter-type declarations to abstract base classes in aspectj 1.1">
- <compile files="AbstractBaseAndInterTypeInterface.java">
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs/caseSensitivity" pr="42515"
- title="NPE When compiling intertype declaration">
- <compile files="uniqueId/Numbered.java,uniqueId/Bug.aj">
- <message kind="error" line="4"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs"
- pr="49295"
- title="declare warning on subtype constructor">
- <compile files="SubtypeConstructorCW.java" >
- <message kind="warning" line="5" text="String as first"/>
- <message kind="warning" line="10" text="String as first"/>
- </compile>
- <run class="SubtypeConstructorCW"/>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="50570"
- title="CatchClauseSignature has broken operation">
- <compile files="HandlerSig.java"/>
- <run class="HandlerSig"/>
- </ajc-test>
-
-
- <ajc-test dir="new" pr="42668"
- title="after returning with parameter: matching rules">
- <compile files="AfterReturningParamMatching.java" />
- <run class="AfterReturningParamMatching"/>
- </ajc-test>
-
- <ajc-test dir="bugs/binaryCompat" pr="50641"
- title="binary compatibility of advice method names - expect no error">
- <compile files="Main.java,TraceV1.aj"/>
- <run class="Main"/>
- <compile files="TraceV2.aj"/>
- <run class="Main"/>
- </ajc-test>
-
- <ajc-test dir="bugs/binaryCompat" pr="50641"
- title="binary compatibility of advice method names - expect error">
- <compile files="Main.java,TraceV1.aj"/>
- <run class="Main"/>
- <compile files="TraceRE.aj"/>
- <run class="Main"/>
- </ajc-test>
-
- <ajc-test dir="bugs/binaryCompat" pr="50641"
- title="binary compatibility of advice method names - expect no error">
- <compile files="Main.java,TraceWithInnerV1.aj"/>
- <run class="Main"/>
- <compile files="TraceWithInnerV2.aj"/>
- <run class="Main"/>
- </ajc-test>
-
- <ajc-test dir="bugs/protectedvf"
- title="mail list VerifyError with protected access">
- <compile files="main/Driver.java,main/p2/AbstractTest.aj,main/p1/ConcreteTest.aj"/>
- <run class="main.Driver"/>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="51919"
- title="Polymorphic ITD fails in CVS HEAD (From ajdt 1.1.6)">
- <compile files="OverloadedITDNPE.java" />
- </ajc-test>
-
- <ajc-test dir="bugs" pr="51320"
- title="ClasscastException on concretization of if(false)">
- <compile files="DecwClassCastException.java">
-
- <!-- These are the illegal PCDs against a deow -->
- <message kind="error" line="27" text="if() pointcut designator cannot be used"/>
- <message kind="error" line="29" text="if() pointcut designator cannot be used"/>
-
- <message kind="error" line="31" text="cflow() pointcut designator cannot be used"/>
- <message kind="error" line="33" text="cflow() pointcut designator cannot be used"/>
-
- <message kind="error" line="35" text="cflowbelow() pointcut designator cannot be used"/>
- <message kind="error" line="37" text="cflowbelow() pointcut designator cannot be used"/>
-
- <message kind="error" line="39" text="this() pointcut designator cannot be used"/>
- <message kind="error" line="41" text="this() pointcut designator cannot be used"/>
-
- <message kind="error" line="43" text="target() pointcut designator cannot be used"/>
- <message kind="error" line="45" text="target() pointcut designator cannot be used"/>
-
- <message kind="error" line="47" text="args() pointcut designator cannot be used"/>
- <message kind="error" line="49" text="args() pointcut designator cannot be used"/>
-
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="51320"
- title="ClasscastException on concretization of if(false)">
- <compile files="DeclareSoftDynamicPCDs.java">
-
- <!-- These are the illegal PCDs against a deow -->
- <message kind="error" line="27" text="if() pointcut designator cannot be used"/>
- <message kind="error" line="29" text="if() pointcut designator cannot be used"/>
-
- <message kind="error" line="31" text="cflow() pointcut designator cannot be used"/>
- <message kind="error" line="33" text="cflow() pointcut designator cannot be used"/>
-
- <message kind="error" line="35" text="cflowbelow() pointcut designator cannot be used"/>
- <message kind="error" line="37" text="cflowbelow() pointcut designator cannot be used"/>
-
- <message kind="error" line="39" text="this() pointcut designator cannot be used"/>
- <message kind="error" line="41" text="this() pointcut designator cannot be used"/>
-
- <message kind="error" line="43" text="target() pointcut designator cannot be used"/>
- <message kind="error" line="45" text="target() pointcut designator cannot be used"/>
-
- <message kind="error" line="47" text="args() pointcut designator cannot be used"/>
- <message kind="error" line="49" text="args() pointcut designator cannot be used"/>
-
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs/abstractMethods" pr="49784"
- title="Introduced abstract method on interface not implemented by subtype (weave altogether)">
- <compile files="interface/C.java,interface/A.java,interface/B.java" />
- <run class="C"/>
- </ajc-test>
-
-
- <ajc-test dir="bugs/fieldsOnInterfaces"
- pr="52107"
- title="declare String field on interface">
- <compile files="StringFieldOnInterface.java">
- <message kind="warning" line="16" text="this affected type is not exposed"/>
- <message kind="warning" line="17" text="this affected type is not exposed"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs/fieldsOnInterfaces"
- pr="52107"
- title="declare int field on interface">
- <compile files="IntFieldOnInterface.java">
- <message kind="warning" line="27" text="this affected type is not exposed"/>
- <message kind="warning" line="28" text="this affected type is not exposed"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs/fieldsOnInterfaces"
- pr="52107"
- title="declare Object field on interface">
- <compile files="ObjectFieldOnInterface.java">
- <message kind="warning" line="20" text="this affected type is not exposed"/>
- <message kind="warning" line="21" text="this affected type is not exposed"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="50776"
- title="fail in compiling aspect with overriding method introduction with different throws clause ">
- <compile files="IntertypeDifferentThrows.java" />
- </ajc-test>
-
- <ajc-test dir="new"
- comment="in ajc 1.1.1, VerifyError Illegal use of nonvirtual function call"
- title="super call in anonymous class created in around advice">
- <compile files="SuperClosure.java" />
- <run class="SuperClosure" />
- </ajc-test>
-
- <ajc-test dir="bugs" pr="44272"
- title="retitle warning to circular {advice} dependency at ...">
- <compile files="CircularAdvicePrecedence.java">
- <message kind="error" line="4"/>
- <message kind="error" line="5"/>
- <message kind="error" line="6"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="51322"
- title="Introduce Unknown Type to class causes Null pointer exception" >
- <compile files="Pr51322.java">
- <message kind="error" line="5"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs"
- title="Private members introduced via an interface are visible to the class"
- pr="52928">
- <compile
- files="VisiblePrivateInterfaceITDs.java" >
- <message kind="error" line="13"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs/declarePrecedenceWithClasses" pr="53012"
- title="declare precedence on a class should be a compile-time error">
- <compile files="DeclarePrecedenceTestClass.java" >
- <message kind="error" line="10" text="Non-aspect types can only be specified"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs/declarePrecedenceWithClasses" pr="53012"
- title="declare precedence on a class should be a compile-time error">
- <compile files="Priority.aj" />
- </ajc-test>
-
- <ajc-test dir="bugs"
- pr="59440"
- title="NPE when binary weaving a ctor ITD">
- <compile files="CtorITD.aj">
- <message kind="error" line="2"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs"
- pr="59397"
- title="NPE in compiler when using (an unusual) declare warning against a ctor ITD">
- <compile files="DecwInitializationITD.java">
- <message kind="warning" line="16"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs/compileOrdering"
- pr="59778"
- title="InterTypeMethodDeclaration.java:104">
- <compile files="B.java,D.java" >
- <message kind="error" line="2" file="B.java"/>
- </compile>
- <compile files="D.java,B.java">
- <message kind="error" line="2" file="B.java"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs"
- pr="61538" title="nested uses of this() inside constructors not handled properly for initialization and preinitialization pointcuts">
- <compile files="ConstructorMain.java"/>
- <run class="ConstructorMain"/>
- </ajc-test>
-
- <ajc-test dir="bugs"
- pr="61568" title="wrong variable binding in || pointcuts">
- <compile files="DisjunctVarBinding.java">
- <message kind="error" line="17" text="ambiguous binding of parameter(s) a, b across '||' in pointcut"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs"
- pr="60936" title="error message for constructor-execution pcd">
- <compile files="InterfaceConstructor.java">
- <message kind="warning" line="10" text="no interface constructor-execution join point"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="43714"
- title="weaving using an empty jar in -injars" >
- <compile files="notAJar.jar" outjar="outJar.jar">
- <message kind="error" line="0"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs" pr="43714"
- title="weaving using an empty jar in -aspectpath" >
- <compile files="WeaveLocal.java" aspectpath="notAJar.jar" outjar="outJar.jar" >
- </compile>
- </ajc-test>
-
|