123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886 |
- <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
-
- <!-- AspectJ v1.5.3 Tests -->
- <suite>
- <ajc-test dir="bugs153/pr149908" title="ensure no npe due to missing type">
- <compile files="A.aj,C1.java,Tracing.aj" inpath="simple.jar">
- <message kind="error" text="can't find type MyStringBuilder"/>
- <message kind="error" text="can't determine superclass of missing type MyStringBuilder"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr149908" title="ensure no npe due to missing member">
- <compile files="A.aj,C1.java,Tracing.aj" inpath="simple.jar,stringBuilder.jar">
- <message kind="warning" text="can not resolve this member: append [Xlint:unresolvableMember]"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr164340" title="formal comments are set for constructor ipes">
- <compile files="C.java" options="-emacssym -XjavadocsInModel -Xset:minimalModel=false"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice">
- <compile files="Foo.java" options="-1.5"/>
- <run class="Foo">
- <stdout>
- <line text="In if(), is there a caller? yes"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr162657" title="complex pointcut">
- <compile files="TestAspect.aj" options="-1.4"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr164633" title="incompatibleclasschange">
- <compile files="Model.java"/>
- <run class="test.Model"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice - 2">
- <compile files="Foo2.java" options="-1.5"/>
- <run class="Foo2"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice - 3">
- <compile files="Foo3.java" options="-1.5"/>
- <run class="Foo3"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice - 4">
- <compile files="Foo4.java" options="-1.5"/>
- <run class="Foo4"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice - 5">
- <compile files="Foo5.java" options="-1.5"/>
- <run class="Foo5"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice - 6">
- <compile files="Foo6.java" options="-1.5"/>
- <run class="Foo6">
- <stdout>
- <line text="ProceedingJoinPoint is call(java.lang.RuntimeException(String))"/>
- <line text="caller is notnull"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice - 7">
- <compile files="Real.java" options="-1.5"/>
- <run class="a.b.c.Real">
- <stdout>
- <line text="advice running"/>
- <line text="newmessage"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr159143" title="declare method annotations">
- <compile files="DeclareMethodAnnotation.java" options="-1.5">
- <message line="16" kind="warning" text="all"/>
- <message line="17" kind="warning" text="all"/>
- <message line="18" kind="warning" text="all"/>
- <message line="22" kind="warning" text="all"/>
- <message line="23" kind="warning" text="all"/>
- <message line="24" kind="warning" text="all"/>
- <message line="27" kind="warning" text="all"/>
- <message line="28" kind="warning" text="all"/>
- <message line="29" kind="warning" text="all"/>
- <message line="33" kind="warning" text="all"/>
- <message line="34" kind="warning" text="all"/>
- <message line="35" kind="warning" text="all"/>
- <message line="39" kind="warning" text="all"/>
- <message line="40" kind="warning" text="all"/>
- <message line="41" kind="warning" text="all"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr148908" title="ensure getSourceSignature correct with static field">
- <compile files="BadInterface.java" options="-1.5 -emacssym -Xset:minimalModel=false"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr161502" title="generics in pointcuts">
- <compile files="Main.java" options="-1.5 -showWeaveInfo">
- <message kind="weave" text="Join point 'method-call(java.util.List Main.getElements())' in Type 'Main' (Main.java:31) advised by around advice from 'Main$Concrete' (Main.java:18)"/>
- </compile>
- <run class="Main"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr161502" title="generics in pointcuts - 2">
- <compile files="Main2.java" options="-1.5 -showWeaveInfo">
- <message kind="warning" text="advice defined in Main2$Base has not been applied"/>
- </compile>
- <run class="Main2"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr158624" title="generics and arrays">
- <compile files="ValueChange.java" options="-1.5"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr153845" title="IllegalStateException at GenericSignatureParser.java">
- <compile files="GenericType.java,Aspect.java,Aspect2.java,Interface.java" options="-1.5" outjar="blob.jar"/>
- <compile files="Nothing.java" aspectpath="blob.jar" options="-1.5" outjar="bang.jar"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr158412" title="annotation style pointcut npe">
- <compile files="layering/Layering.aj,layering/SystemArchitektur.java" options="-1.5"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr153464" title="negated annotation matching problem">
- <compile files="Bug.java" options="-1.5">
- <message kind="warning" line="99"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr158412" title="annotation style pointcut npe - 2">
- <compile files="layering/Layering.aj,layering/SystemArchitektur.java,dao/Foo.java" options="-1.5">
- <message kind="warning" line="3" text="Whatever"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="features153/ptw" title="basic usage of getWithinTypeName">
- <compile files="CaseOne.java"/>
- <run class="CaseOne">
- <stdout>
- <line text="AClass has an aspect instance"/>
- <line text="The aspect instance thinks it is for type name AClass"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="features153/ptw" title="basic usage of getWithinTypeName - annotation style">
- <compile files="CaseFive.java" options="-1.5"/>
- <run class="CaseFive">
- <stdout>
- <line text="AClass has an aspect instance"/>
- <line text="The aspect instance thinks it is for type name AClass"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="features153/ptw" title="basic usage of getWithinTypeName - multiple types">
- <compile files="CaseTwo.java"/>
- <run class="CaseTwo">
- <stdout>
- <line text="BClass aspect instance gives a within type name of BClass"/>
- <line text="CClass aspect instance gives a within type name of CClass"/>
- <line text="AClass aspect instance gives a within type name of AClass"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="features153/ptw" title="basic usage of getWithinTypeName - non matching types">
- <compile files="CaseThree.java"/>
- <run class="CaseThree">
- <stdout>
- <line text="BClass aspect instance gives a within type name of <null>"/>
- <line text="CClass aspect instance gives a within type name of CClass"/>
- <line text="AClass aspect instance gives a within type name of AClass"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="features153/ptw" title="basic usage of getWithinTypeName - types in packages">
- <compile files="CaseFour.java"/>
- <run class="a.b.CaseFour">
- <stdout>
- <line text="BClass aspect instance gives a within type name of a.b.BClass"/>
- <line text="CClass aspect instance gives a within type name of a.b.CClass"/>
- <line text="AClass aspect instance gives a within type name of a.b.AClass"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr158126" title="annotations, call and constructors problem">
- <compile files="A.java,B.java,MyAnnotation.java,MyAspect.java" options="-1.5 -showWeaveInfo">
- <message kind="weave" text="Join point 'constructor-call(void B.<init>())' in Type 'A' (A.java:5) advised by before advice from 'MyAspect' (MyAspect.java:3)"/>
- <message kind="weave" text="Join point 'constructor-call(void B.<init>(int))' in Type 'A' (A.java:10) advised by before advice from 'MyAspect' (MyAspect.java:3)"/>
- <message kind="weave" text="Join point 'constructor-call(void A.<init>())' in Type 'A' (A.java:14) advised by before advice from 'MyAspect' (MyAspect.java:3)"/>
- <message kind="weave" text="Join point 'constructor-call(void A.<init>(int))' in Type 'A' (A.java:15) advised by before advice from 'MyAspect' (MyAspect.java:3)"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr156058" title="no IllegalStateException with generic inner aspect">
- <compile files="Bug.java" options="-1.5">
- <message kind="warning" line="2" text="advice defined in MyAspect has not been applied [Xlint:adviceDidNotMatch]"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr156058" title="no IllegalStateException with generic inner aspect - 2">
- <compile files="Bug2.java" options="-1.5 -showWeaveInfo">
- <message kind="weave" text="Join point 'method-call(MyClass Bug2.callit())' in Type 'Bug2' (Bug2.java:15) advised by before advice from 'MyAspect' (Bug2.java:2)"/>
- <message kind="warning" line="24" text="advice defined in MyAspect2 has not been applied [Xlint:adviceDidNotMatch]"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr153490" title="no illegal state exception from AsmDelegate - 1">
- <compile files="Foo.java" options="-1.5" classpath="jarForFoo.jar" />
- </ajc-test>
-
- <ajc-test dir="bugs153/pr153490" title="no illegal state exception from AsmDelegate - 2">
- <compile files="Bar.java" options="-1.5" classpath="jarForBar.jar" />
- </ajc-test>
-
- <ajc-test dir="bugs153/pr153490" title="no illegal state exception from AsmDelegate - 3">
- <compile files="Goo.java" options="-1.5" classpath="jarForGoo.jar" />
- </ajc-test>
-
- <ajc-test dir="bugs153/pr156962" title="Test Annot Method">
- <compile files="Sample.java, WarnDeprecatedMethod.aj" options="-1.5">
- <message kind="warning" line="2" text="deprecated method"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr156962" title="Test Annot Method Has Member">
- <compile files="Sample.java, LiftDeprecation.aj" options="-1.5 -XhasMember -showWeaveInfo -Xlint:ignore">
- <message kind="weave" text="'Sample' (Sample.java:1) is annotated with @Deprecated type annotation from 'LiftDeprecation' (LiftDeprecation.aj:2)"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr152848" title="mixing generics">
- <compile files="PairGeneric.java" options="-1.5" outjar="pair1.jar"/>
- <compile files="BaseType.java" options="-1.5" outjar="basetype.jar" classpath="pair1.jar"/>
- <compile files="PairNormal.java" outjar="pair2.jar"/>
- <compile files="AnAspect.java" options="-1.5 -Xset:runMinimalMemory=true" inpath="basetype.jar,pair2.jar"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr152871" title="parsing bytecode less">
- <compile files="MyClass.java" options="-1.5"/>
- <compile files="MyAspect.java" options="-1.5 -Xlint:ignore"/>
- <run class="a.MyClass" ltw="aop.xml">
- <stdout>
- <line text="advice running"/>
- <line text="hello"/>
- <line text="advice running"/>
- <line text="world"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr160674" title="turning off bcel caching">
- <compile files="MyClass.java" options="-1.5"/>
- <compile files="MyAspect.java" options="-1.5 -Xlint:ignore"/>
- <run class="a.MyClass" ltw="aop.xml">
- <stdout>
- <line text="advice running"/>
- <line text="hello"/>
- <line text="advice running"/>
- <line text="world"/>
- </stdout>
- <stderr>
- <line text="info AspectJ Weaver Version"/>
- <line text="info register classloader"/>
- <line text="info using"/>
- <line text="info [bcelRepositoryCaching=false] AspectJ will not"/>
- <line text="info register aspect"/>
- <line text="info processing"/>
- <line text="info successfully"/>
- </stderr>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr153380/case1" title="pipelining decps">
- <compile files="Ann.java,Base.java,BaseImpl.java,I1.java,Mixin.java,Runner.java,X.aj" options="-1.5">
- <message kind="error" line="1" text="The import java.lang.retention cannot be resolved"/>
- <message kind="error" line="3" text="Retention cannot be resolved to a type"/>
- <message kind="error" line="3" text="RetentionPolicy cannot be resolved to a variable"/>
- <!-- With 1.8 don't seem to get this now - assume it is because the annotation isn't being found
- <message kind="error" line="3" text="The attribute value is undefined for the annotation type Retention"/>
- -->
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr154332" title="incorrect deprecated annotation processing">
- <compile files="Annot.java" options="-1.5">
- <message kind="warning" line="5" text="marker"/>
- <message kind="warning" line="31" text="marker"/>
- <message kind="warning" line="5" text="deprecated"/>
- <message kind="warning" line="31" text="deprecated"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr148381" title="argNames and javac">
- <!--compile files="C.java" options="-1.5"/>
- <compile files="A.java" options="-1.5"/-->
- <compile files="Main.java,Monitor.java" options="-1.5" outjar="foo.jar" classpath="code.jar"/>
- <run class="test.Main" classpath="$sandbox/code.jar" ltw="aop.xml">
- <stderr>
- <line text="goo"/>
- </stderr>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/PR148219" title="unwanted warning for pointcut">
- <compile files="MyMessages.java" options="-1.5 -Xlint:ignore -warn:+unusedArgument"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr148737" title="illegalstateexception for non generic type">
- <compile files="A.java" options="-source 5 -target 5">
- <message kind="warning" line="18" text="advice defined in TestAspect has not been applied"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr149096" title="cflow xml concrete aspect">
- <compile files="SimpleTracing.aj" outjar="out.jar"/>
- <compile files="TestMain.aj"/>
- <run class="TestMain" ltw="aop-pr149096.xml"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr149305/case1" title="ataj inheritance - 1">
- <compile files="AbstractOzonator.java,IdentityOzonator.java,User.java" options="-1.5"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr149305/case2" title="ataj inheritance - 2">
- <compile files="com/codesrc/ozonator/identity/IdentityOzonator.java,com/codesrc/ozonator/identity/User.java,com/codesrc/ozonator/AbstractOzonator.java" options="-1.5"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr149305/case2" title="ataj inheritance - 3">
- <compile files="com/codesrc/ozonator/AbstractOzonator.java,com/codesrc/ozonator/identity/IdentityOzonator.java,com/codesrc/ozonator/identity/User.java" options="-1.5"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr148693" title="verification problem">
- <compile files="MyAspect.java" options="-1.5 -XterminateAfterCompilation=true"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr148537" title="incorrect annotation value">
- <compile files="MyClass.java" options="-1.5">
- <message kind="error" line="5" text="Type mismatch: cannot convert from RetentionPolicy[] to RetentionPolicy"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr145693" title="verifyErrNoTypeCflowField">
- <compile files="Event.java" outjar="cpath.jar"/>
- <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar" options="-1.4"/>
- <compile files="Sample.java" options="-Xlint:ignore" aspectpath="apath.jar" outjar="run.jar">
- <message kind="warning" line="8" text="Unable to determine match at this join point because the type 'Event' cannot be found"/>
- </compile>
- <run class="Sample" classpath="run.jar,apath.jar">
- <stderr>
- <line text="method running"/>
- </stderr>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr145693" title="verifyErrInpathNoTypeCflowField">
- <compile files="Event.java" outjar="cpath.jar"/>
- <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar" options="-1.4"/>
- <compile files="Sample.java" options="-Xlint:ignore" inpath="cpath.jar" aspectpath="apath.jar" outjar="run.jar"/>
- <run class="Sample" classpath="run.jar,apath.jar"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr145693" title="cpathNoTypeCflowField">
- <compile files="Event.java" outjar="cpath.jar"/>
- <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar" options="-1.4"/>
- <compile files="Sample.java" options="-Xlint:ignore" classpath="cpath.jar" aspectpath="apath.jar" outjar="run.jar"/>
- <run class="Sample" classpath="run.jar,apath.jar"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr148409" title="generic signature problem">
- <compile files="Blurgh.java" options="-1.5"/>
- <compile files="X.java" options="-1.5 -Xlint:ignore"/>
- <run class="Blurgh" options="-1.5" ltw="aop.xml"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr149071" title="visibility problem">
- <compile files="AspectItd.java"/>
- <run class="AspectItd"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr147841" title="advice not woven on aspectpath">
- <compile files="A.java" options="-Xlint:ignore" outjar="apath.jar"/>
- <!--compile files="C.java" outjar="cpa.jar" classpath="cpath.jar"/-->
- <compile files="C.java" options="-showWeaveInfo" aspectpath="apath.jar">
- <message kind="weave" text="foo"/>
- </compile>
- <run class="C">
- <stderr>
- <line text="foo"/>
- </stderr>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr150095" title="generics, inheritance and decp">
- <compile files="Foo.java" options="-1.5"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr121805" title="ambiguous binding">
- <compile files="Complex.java"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace before">
- <compile files="hello/HelloWorld.java hello/ThrowExceptionBefore.aj"/>
- <run class="hello.HelloWorld">
- <stderr>
- <line text="hello.HelloWorld.println(HelloWorld.java:14)"/>
- <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
- <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
- </stderr>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace before - binary">
- <compile inpath="helloworld.jar" files="hello/ThrowExceptionBefore.aj"/>
- <run class="hello.HelloWorld">
- <stderr>
- <line text="hello.HelloWorld.println(HelloWorld.java:14)"/>
- <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
- <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
- </stderr>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace after">
- <compile files="hello/HelloWorld.java hello/ThrowExceptionAfter.aj"/>
- <run class="hello.HelloWorld">
- <stderr>
- <line text="hello.HelloWorld.println(HelloWorld.java:15)"/>
- <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
- <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
- </stderr>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace around">
- <compile files="hello/HelloWorld.java hello/ThrowExceptionAround.aj" options="-XnoInline"/>
- <run class="hello.HelloWorld">
- <stderr>
- <line text="hello.HelloWorld.println(HelloWorld.java:13)"/>
- <line text="hello.HelloWorld.testStackTrace(HelloWorld.java:19)"/>
- <line text="hello.HelloWorld.main(HelloWorld.java:41)"/>
- </stderr>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr149322" title="can't find type on interface call 1">
- <compile files="Interface.java"/>
- <compile
- files="Missing.java"
- outjar="missing.jar"
- />
- <compile files="TestWithMissing.java" classpath="missing.jar"/>
- <compile files="Aspect1.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
- <message kind="weave" text="void Interface.interfaceMethod()"/>
- <message kind="weave" text="void Missing.interfaceMethod()"/>
- </compile>
- <compile files="Aspect1.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
- <message kind="weave" text="void Interface.interfaceMethod()"/>
- <!--
- <message kind="warning" text="can't determine superclass of missing type Missing"/>
- -->
- </compile>
- <run class="TestWithMissing">
- <stdout>
- <line text="Aspect1.before() interfaceMethod"/>
- <line text="Missing.interfaceMethod()"/>
- <!--
- <line text="Aspect1.before() interfaceMethod"/>
- -->
- <line text="Missing.interfaceMethod()"/>
- <line text="Missing.missingMethod()"/>
- </stdout>
- </run>
- </ajc-test>
- <ajc-test dir="bugs153/pr149322" title="can't find type on interface call 2">
- <compile files="Interface.java"/>
- <compile
- files="Missing.java"
- outjar="missing.jar"
- />
- <compile files="TestWithMissing.java" classpath="missing.jar"/>
- <compile files="Aspect2.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
- <message kind="weave" text="void Interface.interfaceMethod()"/>
- <message kind="weave" text="void Missing.interfaceMethod()"/>
- </compile>
- <compile files="Aspect2.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
- <message kind="weave" text="void Interface.interfaceMethod()"/>
- <message kind="warning" text="can't determine whether missing type Missing is an instance of Interface"/>
- <message kind="warning" text="can't determine superclass of missing type Missing"/>
- </compile>
- <run class="TestWithMissing">
- <stdout>
- <line text="Aspect2.before() interfaceMethod"/>
- <line text="Missing.interfaceMethod()"/>
- <!--
- <line text="Aspect2.before() interfaceMethod"/>
- -->
- <line text="Missing.interfaceMethod()"/>
- <line text="Missing.missingMethod()"/>
- </stdout>
- </run>
- </ajc-test>
- <ajc-test dir="bugs153/pr149322" title="can't find type on interface call 3">
- <compile files="Interface.java"/>
- <compile
- files="Missing.java"
- outjar="missing.jar"
- />
- <compile files="TestWithMissing.java" classpath="missing.jar"/>
- <compile files="Aspect3.aj" options="-showWeaveInfo -inpath ." classpath="missing.jar">
- <message kind="weave" text="void Interface.interfaceMethod()"/>
- <message kind="weave" text="void Missing.interfaceMethod()"/>
- </compile>
- <compile files="Aspect3.aj" options="-Xlint:warning -showWeaveInfo -inpath .">
- <message kind="weave" text="void Interface.interfaceMethod()"/>
- <message kind="warning" text="can't determine whether missing type Missing is an instance of Interface"/>
- <message kind="warning" text="can't determine superclass of missing type Missing"/>
- </compile>
- <run class="TestWithMissing">
- <stdout>
- <line text="Aspect3.before() interfaceMethod"/>
- <line text="Missing.interfaceMethod()"/>
- <!--
- <line text="Aspect3.before() interfaceMethod"/>
- -->
- <line text="Missing.interfaceMethod()"/>
- <line text="Missing.missingMethod()"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153" title="match volatile field">
- <compile files="pr150671.aj" options="-Xset:activateLightweightDelegates=false">
- <message kind="error" line="7" text="Changing state"/>
- <message kind="error" line="8" text="test"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="java5/ataspectj" title="Duplicate JVMTI agents">
- <compile files="HelloWorld.java"/>
- <compile files="MessageHandler.java"/>
- <!-- <compile files="Aspect.aj" options="-outxml"/> -->
- <compile files="Aspect.aj" options="-outxml -outjar aspects.jar -1.4"/>
- <ant file="ajc-ant.xml" target="Duplicate JVMTI agents" verbose="true"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr151978" title="generics problem">
- <compile files="IMessage.java" options="-1.5">
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr152631" title="decp and cflowadder munger clash">
- <compile files="EMA.java" options="-1.5"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr153572" title="LTWWorld with annotation matching">
- <compile
- files="Configurable.java, AnnotationMatcher.aj"
- options="-1.5"
- outjar="aspectlib.jar"
- outxmlfile="META-INF/aop.xml"/>
- <compile files="Configurable.java,Annotated.java,Main.java" options="-1.5" outjar="myapp.jar"/>
- <run class="Main" ltw="">
- <stdout>
- <line text="annotated type initialized"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr149560" title="incorrect staticinitialization weaving - codestyle">
- <compile files="CodeStyle.java" options="-1.5 -showWeaveInfo">
- <message kind="weave" text="Join point 'staticinitialization(void MyAspect.<clinit>())' in Type 'MyAspect' (CodeStyle.java:3) advised by after advice from 'MyAspect' (CodeStyle.java:4)"/>
- <message kind="weave" text="Join point 'staticinitialization(void CodeStyle.<clinit>())' in Type 'CodeStyle' (CodeStyle.java:9) advised by after advice from 'MyAspect' (CodeStyle.java:4)"/>
- </compile>
- <run class="CodeStyle">
- <stdout>
- <line text="after initialization staticinitialization(MyAspect.<clinit>)"/>
- <line text="after initialization staticinitialization(CodeStyle.<clinit>)"/>
- <line text="InstanceExists?true"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr149560" title="incorrect staticinitialization weaving - annstyle">
- <compile files="AnnStyle.java" options="-1.5 -showWeaveInfo">
- <message kind="weave" text="Join point 'staticinitialization(void MyAspect.<clinit>())' in Type 'MyAspect' (AnnStyle.java:5) advised by after advice from 'MyAspect' (AnnStyle.java:7)"/>
- <message kind="weave" text="Join point 'staticinitialization(void AnnStyle.<clinit>())' in Type 'AnnStyle' (AnnStyle.java:12) advised by after advice from 'MyAspect' (AnnStyle.java:7)"/>
- </compile>
- <run class="AnnStyle">
- <stdout>
- <line text="after initialization staticinitialization(MyAspect.<clinit>)"/>
- <line text="after initialization staticinitialization(AnnStyle.<clinit>)"/>
- <line text="InstanceExists?true"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="ltw" title="reweavableAspectNotRegistered error">
- <compile files="HelloWorldWithException.java, ExceptionHandler.aj" options="-showWeaveInfo">
- <message kind="weave" text="Join point 'method-execution(void HelloWorldWithException.main(java.lang.String[]))' in Type 'HelloWorldWithException' (HelloWorldWithException.java:3) advised by around advice from 'ExceptionHandler' (ExceptionHandler.aj:2)"/>
- </compile>
- <compile files="EmptyAspect.aj">
- </compile>
- <run class="HelloWorldWithException" ltw="aop-missingaspect.xml">
- <stdout>
- <line text="Hello World!"/>
- </stdout>
- <stderr>
- <line text="error aspect 'ExceptionHandler' woven into 'HelloWorldWithException' must be defined to the weaver (placed on the aspectpath, or defined in an aop.xml file if using LTW)."/>
- </stderr>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr155972" title="NPE in ConstructorSignatureImpl">
- <compile files="ConstructorTest.java, SignatureImplAspect.aj" options="-Xlint:ignore"/>
- <run class="ConstructorTest">
- <stdout>
- <line text="ConstructorTest"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr155972" title="NPE in FieldSignatureImpl">
- <compile files="FieldTest.java, SignatureImplAspect.aj" options="-Xlint:ignore"/>
- <run class="FieldTest">
- <stdout>
- <line text="intField"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr155972" title="NPE in InitializerSignatureImpl">
- <compile files="InitializerTest.java, SignatureImplAspect.aj" options="-Xlint:ignore"/>
- <run class="InitializerTest">
- <stdout>
- <line text="InitializerTest"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr155763" title="ensure LineNumberTable correct with generics, for each and continue">
- <compile files="Test.java" options="-1.5">
- <message kind="warning" line="27" text="adviceDidNotMatch"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr157474" title="TestServer with duplicate configuration" keywords="ltw,server">
- <compile files="AbstractTracing.aj" options="-outjar library.jar -outxml"/>
- <compile files="HelloWorld.java" options="-outjar application.jar"/>
- <ant file="ant-server.xml" target="TestServer with duplicate configuration" verbose="true">
- <stdout>
- <line text="Starting ..."/>
- <line text="Running HelloWorld"/>
- <line text="? main"/>
- <line text="Hello World!"/>
- <line text="Stopping ..."/>
- </stdout>
- </ant>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr151772" title="ensure declare soft doesn't allow undeclared exception in anonymous inner class">
- <compile files="Softener.aj"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr151772" title="ensure declare soft doesn't allow undeclared exception in anonymous inner class - 2">
- <compile files="Softener2.aj">
- <message kind="error" line="18" text="Unhandled exception type SQLException"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr125981" title="declare soft and inner classes">
- <compile files="SampleTest.java"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr156904/inSameFile" title="ensure no invalidAbsoluteTypeName when do match - 1">
- <compile files="A.aj"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr156904/inDiffPkgAndImport" title="ensure no invalidAbsoluteTypeName when do match - 2">
- <compile files="A.aj,Outer.java"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr156904/inSamePkg" title="ensure no invalidAbsoluteTypeName when do match - 3">
- <compile files="A.aj,Outer.java"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr156904/inDiffPkgWithoutImport" title="ensure no invalidAbsoluteTypeName when do match - 4">
- <compile files="A.aj,Outer.java" options="-1.4">
- <message kind="warning" line="5" text="no match for this type name: Outer [Xlint:invalidAbsoluteTypeName]"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="ltw" title="NPE with custom agent" keywords="ltw">
- <compile files="java/net/URLClassLoader.java"/>
- <compile files="HelloWorldWithException.java" options="-outjar hello.jar"/>
- <compile files="ExceptionHandler.aj" options="-outxml -outjar handler.jar"/>
- <compile files="NullSecurityManager.java" options="-outjar security.jar"/>
- <ant file="ant.xml" target="NPE with custom agent" verbose="true">
- <stdout>
- <line text="Hello World!"/>
- </stdout>
- </ant>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr158957" title="NPE with LTW, pointcut library and missing aspect dependency" keywords="ltw">
- <compile files="HelloWorld.java" options="-outjar hello.jar"/>
- <compile files="Missing.java" options="-outjar missing.jar"/>
- <compile files="Tracing.aj, PointcutLibrary.aj" options="-Xlint:ignore -1.5 -outxml -outjar tracing.jar" classpath="hello.jar,missing.jar"/>
- <!--
- <run class="HelloWorld" ltw="aop.xml">
- <stdout>
- <line text="? main"/>
- <line text="Hello World!"/>
- </stdout>
- </run>
- -->
- <ant file="ant.xml" target="NPE with LTW, pointcut library and missing aspect dependency" verbose="true">
- <stdout>
- <line text="? main"/>
- <line text="Hello World!"/>
- </stdout>
- </ant>
-
- </ajc-test>
-
- <ajc-test dir="bugs153/pr132080"
- title="Weave concrete sub-aspect with advice"
- keywords="aop.xml">
- <compile
- files="HelloWorld.java"
- >
- </compile>
- <compile files="AbstractSuperAspect.aj" options="-1.4"/>
- <compile files="TestAdvice.aj" options="-1.4"/>
- <run class="HelloWorld" ltw="aop-advice.xml">
- <stdout>
- <line text="? ConcreteAspectWithAdvice()"/>
- <line text="? void HelloWorld.main(String[])"/>
- <line text="? HelloWorld()"/>
- <line text="Hello World!"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr132080"
- title="Weave concrete sub-aspect with ITD"
- keywords="aop.xml">
- <!--
- <compile files="AbstractSuperAspectWithInterface.aj, TestInterface.java" options="-verbose"/>
- <compile files="HelloWorld.java, TestITD.aj, ConcreteAspectWithITD.aj" options="-verbose">
- <message line="3" kind="warning" text="this affected type is not exposed to the weaver: AbstractSuperAspectWithInterface"/>
- </compile>
- <run class="HelloWorld">
- <stdout>
- <line text="? void TestITD.interfaceMethod()"/>
- <line text="? void HelloWorld.main(String[])"/>
- <line text="Hello World!"/>
- </stdout>
- </run>
- -->
- <compile files="HelloWorld.java"/>
- <compile files="AbstractSuperAspectWithInterface.aj, TestInterface.java"/>
- <compile files="TestITD.aj">
- <message line="3" kind="warning" text="this affected type is not exposed to the weaver: AbstractSuperAspectWithInterface"/>
- </compile>
- <run class="HelloWorld" ltw="aop-itd.xml">
- <stdout>
- <line text="? void TestITD.interfaceMethod()"/>
- <line text="? void HelloWorld.main(String[])"/>
- <line text="Hello World!"/>
- </stdout>
- </run>
-
- </ajc-test>
-
- <ajc-test dir="bugs153/pr132080" title="Weave concrete sub-aspect with around closure"
- keywords="aop.xml">
-
- <compile files="HelloWorld.java"/>
- <compile files="AbstractSuperAspect.aj" options="-1.4"/>
- <compile files="TestAroundClosure.aj" options="-1.4"/>
- <run class="HelloWorld" ltw="aop-aroundclosure.xml">
- <stdout>
- <line text="> ConcreteAspectWithAroundClosure()"/>
- <line text="< ConcreteAspectWithAroundClosure()"/>
- <line text="? void HelloWorld.main(String[])"/>
- <line text="> HelloWorld()"/>
- <line text="< HelloWorld()"/>
- <line text="Hello World!"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr149096" title="Weave concrete sub-aspect with cflow">
- <compile files="SimpleTracing.aj" outjar="out.jar"/>
- <compile files="TestMain.aj"/>
- <run class="TestMain" ltw="aop-pr149096.xml"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr158957" title="NPE with LTW, pointcut library and missing aspect dependency" keywords="ltw">
- <compile files="HelloWorld.java" options="-outjar hello.jar"/>
- <compile files="Missing.java" options="-outjar missing.jar"/>
- <compile files="Tracing.aj, PointcutLibrary.aj" options="-Xlint:ignore -1.5 -outxml -outjar tracing.jar" classpath="hello.jar,missing.jar"/>
- <!--
- <run class="HelloWorld" ltw="aop.xml">
- <stdout>
- <line text="? main"/>
- <line text="Hello World!"/>
- </stdout>
- </run>
- -->
- <ant file="ant.xml" target="NPE with LTW, pointcut library and missing aspect dependency" verbose="true">
- <stdout>
- <line text="? println"/>
- <line text="Hello World!"/>
- </stdout>
- </ant>
-
- </ajc-test>
-
- <ajc-test dir="bugs153/pr161217" title="NPE with thrown exception warning and at aspectj">
- <compile files="AtAspectJAspect.java, C.java" options="-warn:+unusedThrown -1.5"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr164384" title="binary weaving into java 6 library">
- <compile files="MainClass.java, WorldAspect.aj" inpath="library.jar" options="-1.5 -showWeaveInfo">
- <message kind="weave" text="Join point 'method-execution(void pkg.Hello.sayHello())' in Type 'pkg.Hello' (Hello.java:7) advised by afterReturning advice from 'pack.WorldAspect' (WorldAspect.aj:9)"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr164356" title="javadoc comments are set if have normal comments">
- <compile files="C.java" options="-emacssym -XjavadocsInModel -Xset:minimalModel=false"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr164384" title="compliance java 6 throws usage error">
- <compile files="MainClass.java,Hello.java,MyAnnotation.java" options="-1.6">
- <!--
- <message kind="error" text="-1.6"/>
- <message kind="error" text="no sources specified"/>
- <message kind="abort" text="AspectJ Compiler"/>
- -->
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr164384" title="source level java 6 throws usage error">
- <compile files="MainClass.java,Hello.java,MyAnnotation.java" options="-1.6">
- <!--
- <message kind="error" text="-1.6"/>
- <message kind="error" text="no sources specified"/>
- <message kind="abort" text="AspectJ Compiler"/>
- -->
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/pr164384" title="target level java 6 throws usage error">
- <compile files="MainClass.java,Hello.java,MyAnnotation.java" options="-1.6">
- <!--
- <message kind="error" text="-1.6"/>
- <message kind="error" text="no sources specified"/>
- <message kind="abort" text="AspectJ Compiler"/>
- -->
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs153/StaticImport" title="ensure static import reference have static modifier set">
- <compile files="StaticImport.java,C.java" options="-1.5 -emacssym -Xset:minimalModel=false"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/GenericMethod" title="ensure getSourceSignature correct with generic method">
- <compile files="C.java" options="-1.5 -emacssym -Xset:minimalModel=false"/>
- </ajc-test>
-
- <ajc-test dir="bugs153/Annotation" title="ensure Annotations are added to import list">
- <compile files="C.java, Anno.aj, A.java" options="-1.5 -emacssym"/>
- </ajc-test>
- </suite>
|