123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 |
- <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
-
- <!-- AspectJ v1.5.3 Tests -->
- <suite>
-
- <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/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"/>
- </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"/>
- <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"/>
- <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"/>
- <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"/>
- </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/pr145018" title="ataj crashing with cflow, if and args">
- <compile files="Broken.aj" options="-1.5"/>
- <run class="Broken">
- <stderr>
- <line text="ahhh"/>
- </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:13)"/>
- <!--line text="hello.HelloWorld.println(HelloWorld.java)"/-->
- <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.println(HelloWorld.java:1)"/-->
- <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"/>
- <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>
-
- </suite>
|