aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/test/java/org/aspectj/systemtest/ajc174/ajc174.xml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/test/java/org/aspectj/systemtest/ajc174/ajc174.xml')
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/ajc174/ajc174.xml212
1 files changed, 212 insertions, 0 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc174/ajc174.xml b/tests/src/test/java/org/aspectj/systemtest/ajc174/ajc174.xml
new file mode 100644
index 000000000..456fb412f
--- /dev/null
+++ b/tests/src/test/java/org/aspectj/systemtest/ajc174/ajc174.xml
@@ -0,0 +1,212 @@
+<!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)"/>
+ </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.&lt;init&gt;(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>