123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
-
- <suite>
-
- <ajc-test dir="bugs174/ajdt_markers" title="ajdt markers">
- <compile files="Code.java" options="-1.5 -showWeaveInfo">
- </compile>
- </ajc-test>
-
-
- <ajc-test dir="bugs174/extra_inserts" title="extra inserts">
- <compile files="Code.java" options="-1.5">
- <message kind="warning" line="8" text="Call to foo made inside class Bar"/>
- <message kind="warning" line="15" text="Call to foo made inside class Boo"/>
- <message kind="warning" line="8" text="Call to foo made inside member booble"/>
- <message kind="warning" line="15" text="Call to foo made inside member m"/>
- <message kind="warning" line="8" text="Call to foo made inside member void Bar.booble()"/>
- <message kind="warning" line="15" text="Call to foo made inside member void Boo.m()"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs174/pr419279" title="more configurable lint">
- <compile files="Code.java" options="-1.5">
- <message kind="warning" text="advice defined in Code has not been applied [Xlint:adviceDidNotMatch]"/>
- </compile>
- <compile files="Code.java" options="-1.5 -Xlint:adviceDidNotMatch=ignore">
- </compile>
- <compile files="Code.java" options="-1.5 -Xlint:adviceDidNotMatch=error">
- <message kind="error" text="advice defined in Code has not been applied [Xlint:adviceDidNotMatch]"/>
- </compile>
- <compile files="Code.java" options="-1.5 -Xlint:foo=bar">
- <message kind="error" text="invalid Xlint key: foo"/>
- </compile>
- <compile files="Code.java" options="-1.5 -Xlint:adviceDidNotMatch=wibble">
- <message kind="error" text="invalid Xlint message kind (must be one of ignore, warning, error): wibble"/>
- </compile>
- <compile files="Code.java" options="-1.5 -Xlint:adviceDidNotMatch=ignore{adviceDidNotMatch=error">
- <message kind="error" text="advice defined in Code has not been applied [Xlint:adviceDidNotMatch]"/>
- </compile>
- <compile files="Code.java" options="-1.5 -Xlint:adviceDidNotMatch=error{noGuardForLazyTjp=error">
- <message kind="error" text="advice defined in Code has not been applied [Xlint:adviceDidNotMatch]"/>
- <message kind="error" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard [Xlint:noGuardForLazyTjp]"/>
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs174/pr418129" title="annotated itd">
- <compile files="Target.java" options="-1.5 -showWeaveInfo">
- <message kind="weave" text="Type 'Behavior' (Target.java) has intertyped method from 'Trait' (Target.java:'java.lang.String Behavior.hello()')"/>
- <message kind="weave" text="Type 'Target' (Target.java) has intertyped method from 'Trait' (Target.java:'java.lang.String Behavior.hello()')"/>
- <message kind="weave" text="'public java.lang.String Target.hello()' (Target.java) is annotated with @Tagged method annotation from 'Target$A' (Target.java:18)"/>
- </compile>
- <run class="Target">
- <stdout>
- <line text="@Tagged()"/>
- </stdout>
- </run>
- </ajc-test>
-
- <!-- declared with throws exception -->
- <ajc-test dir="bugs174/pr418129" title="annotated itd 2">
- <compile files="Target2.java" options="-1.5 -showWeaveInfo">
- <message kind="weave" text="Type 'Behavior' (Target2.java) has intertyped method from 'Trait' (Target2.java:'java.lang.String Behavior.hello()')"/>
- <message kind="weave" text="Type 'Target2' (Target2.java) has intertyped method from 'Trait' (Target2.java:'java.lang.String Behavior.hello()')"/>
- <message kind="weave" text="'public java.lang.String Target2.hello()' (Target2.java) is annotated with @Tagged method annotation from 'Target2$A' (Target2.java:18)"/>
- </compile>
- <run class="Target2">
- <stdout>
- <line text="@Tagged()"/>
- </stdout>
- </run>
- </ajc-test>
-
- <!-- already annotated with another annotation -->
- <ajc-test dir="bugs174/pr418129" title="annotated itd 3">
- <compile files="Target3.java" options="-1.5 -showWeaveInfo">
- <message kind="weave" text="Type 'Behavior' (Target3.java) has intertyped method from 'Trait' (Target3.java:'java.lang.String Behavior.hello()')"/>
- <message kind="weave" text="Type 'Target3' (Target3.java) has intertyped method from 'Trait' (Target3.java:'java.lang.String Behavior.hello()')"/>
- <message kind="weave" text="'public java.lang.String Target3.hello()' (Target3.java) is annotated with @Tagged method annotation from 'Target3$A' (Target3.java:16)"/>
- </compile>
- <run class="Target3">
- <stdout>
- <line text="2"/>
- <line text="@Wibble()"/>
- <line text="@Tagged()"/>
- </stdout>
- </run>
- </ajc-test>
-
- <!-- already annotated with the same annotation -->
- <ajc-test dir="bugs174/pr418129" title="annotated itd 4">
- <compile files="Target4.java" options="-1.5 -showWeaveInfo">
- <message kind="weave" text="Type 'Behavior' (Target4.java) has intertyped method from 'Trait' (Target4.java:'java.lang.String Behavior.hello()')"/>
- <message kind="weave" text="Type 'Target4' (Target4.java) has intertyped method from 'Trait' (Target4.java:'java.lang.String Behavior.hello()')"/>
- <!-- warning turned off as it gets confusing - when the itd on the interface is hit by a deca -->
- <!--
- <message kind="warning" text="java.lang.String Target4.hello() - already has an annotation of type Tagged, cannot add a second instance [Xlint:elementAlreadyAnnotated]"/>
- -->
- </compile>
- <run class="Target4">
- <stdout>
- <line text="1"/>
- <line text="@Tagged(value=31)" vm="1.5,1.6,1.7,1.8,9,10,11,12,13"/>
- <line text="@Tagged(31)" vm="14+"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs174/pr413378" title="super itd ctor">
- <compile files="Code.java" options="-1.5 -showWeaveInfo">
- <message kind="weave" text="Type 'Child' (Code.java) has intertyped constructor from 'MyTest' (Code.java:'void Child.<init>(java.lang.String, int)')"/>
- </compile>
- <run class="Code">
- <stdout>
- <line text="Get Age:50"/>
- <line text="Child Name:Andy"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs174/pr368046" title="classloader exclusion - 1">
- <compile files="Azpect.java" outjar="foo.jar" options="-1.4"/>
- <compile files="Code.java" classpath="$sandbox/foo.jar"/>
- <run class="Code" classpath="$sandbox/foo.jar" ltw="aop1.xml">
- <stdout>
- <line text="advice"/>
- <line text="running"/>
- </stdout>
- <stderr>
- <line text="AspectJ Weaver"/>
- <line text="register classloader"/>
- <line text="using configuration"/>
- <line text="register aspect"/>
- <line text="processing reweavable"/>
- </stderr>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs174/pr368046" title="classloader exclusion - 2">
- <compile files="Azpect.java" outjar="foo.jar" options="-1.4"/>
- <compile files="Code.java" classpath="$sandbox/foo.jar"/>
- <run class="Code" classpath="$sandbox/foo.jar" ltw="aop1.xml">
- <stdout>
- <line text="advice"/>
- <line text="running"/>
- </stdout>
- <stderr>
- <line text="AspectJ Weaver"/>
- <line text="register classloader"/>
- <line text="using configuration"/>
- <line text="no longer creating weavers for these classloaders: [foo]"/>
- <line text="register aspect"/>
- <line text="processing reweavable"/>
- </stderr>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs174/pr368046" title="classloader exclusion - 3">
- <compile files="Azpect.java" outjar="foo.jar" options="-1.4"/>
- <compile files="Code.java" classpath="$sandbox/foo.jar"/>
- <run class="Code" classpath="$sandbox/foo.jar" ltw="aop1.xml">
- <stdout>
- <line text="advice"/>
- <line text="running"/>
- </stdout>
- <stderr>
- <line text="AspectJ Weaver"/>
- <line text="register classloader"/>
- <line text="using configuration"/>
- <line text="register aspect"/>
- <line text="processing reweavable"/>
- </stderr>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs174/pr368046" title="classloader exclusion - 4">
- <compile files="Azpect.java" outjar="foo.jar" options="-1.4"/>
- <compile files="Code.java" classpath="$sandbox/foo.jar"/>
- <run class="Code" classpath="$sandbox/foo.jar" ltw="aop2.xml">
- <stdout>
- <line text="advice"/>
- <line text="running"/>
- </stdout>
- <stderr>
- <line text="AspectJ Weaver"/>
- <line text="register classloader"/>
- <line text="using configuration"/>
- <line text="no longer creating weavers for these classloaders: [com.foo.Bar]"/>
- <line text="register aspect"/>
- <line text="processing reweavable"/>
- </stderr>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs174/pr368046" title="classloader exclusion - 5">
- <compile files="Azpect.java" outjar="foo.jar" options="-1.4"/>
- <compile files="Code.java" classpath="$sandbox/foo.jar"/>
- <run class="Code" classpath="$sandbox/foo.jar" ltw="aop3.xml">
- <stdout>
- <line text="advice"/>
- <line text="running"/>
- </stdout>
- <stderr>
- <line text="AspectJ Weaver"/>
- <line text="register classloader"/>
- <line text="using configuration"/>
- <line text="no longer creating weavers for these classloaders: [org.aspectj.weaver.loadtime.WeavingURLClassLoader]"/>
- <line text="register aspect"/>
- <line text="processing reweavable"/>
- </stderr>
- </run>
- </ajc-test>
-
- </suite>
|