Browse Source

Use aspect file/line matching for weave messages in some tests

Instead of creating dedicated ITs for #218, just use the new matching
capabilities like this for good measure:

<message kind="weave" aspectFile="MyAspect.java" aspectLine="8" .../>

Tests affected:
  - Ajc165Tests::testFunkyPointcut_pr272233_2
  - Bugs1920Tests::test_GitHub_214

Relates to #218.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
pull/138/merge
Alexander Kriegisch 2 weeks ago
parent
commit
c6e5f902da

+ 10
- 10
tests/src/test/resources/org/aspectj/systemtest/ajc165/ajc165.xml View File

@@ -87,16 +87,16 @@
<message kind="warning" text="advice defined in Iffy2 has not been applied [Xlint:adviceDidNotMatch]" line="39"/>
<message kind="warning" text="advice defined in Iffy2 has not been applied [Xlint:adviceDidNotMatch]" line="48"/>

<message kind="weave" text="method-execution(void Iffy2.myVoid())' in Type 'Iffy2' (Iffy2.java:50) advised by before advice from 'Iffy2' (Iffy2.java:23)"/>
<message kind="weave" text="method-execution(java.util.Collection[] Iffy2.getCollectionArray())' in Type 'Iffy2' (Iffy2.java:52) advised by before advice from 'Iffy2' (Iffy2.java:35)"/>
<message kind="weave" text="method-execution(java.util.Collection[] Iffy2.getCollectionArray())' in Type 'Iffy2' (Iffy2.java:52) advised by before advice from 'Iffy2' (Iffy2.java:31)"/>
<message kind="weave" text="method-execution(java.util.Collection[] Iffy2.getCollectionArray())' in Type 'Iffy2' (Iffy2.java:52) advised by before advice from 'Iffy2' (Iffy2.java:27)"/>
<message kind="weave" text="method-execution(java.util.Collection[] Iffy2.getCollectionArray())' in Type 'Iffy2' (Iffy2.java:52) advised by before advice from 'Iffy2' (Iffy2.java:23)"/>
<message kind="weave" text="method-execution(java.util.Collection[] Iffy2.getCollectionArray())' in Type 'Iffy2' (Iffy2.java:52) advised by before advice from 'Iffy2' (Iffy2.java:10)"/>
<message kind="weave" text="method-execution(java.util.Collection[] Iffy2.getIntegerCollectionArray())' in Type 'Iffy2' (Iffy2.java:56) advised by before advice from 'Iffy2' (Iffy2.java:43)"/>
<message kind="weave" text="method-execution(java.util.Collection[] Iffy2.getIntegerCollectionArray())' in Type 'Iffy2' (Iffy2.java:56) advised by before advice from 'Iffy2' (Iffy2.java:27)"/>
<message kind="weave" text="method-execution(java.util.Collection[] Iffy2.getIntegerCollectionArray())' in Type 'Iffy2' (Iffy2.java:56) advised by before advice from 'Iffy2' (Iffy2.java:23)"/>
<message kind="weave" text="method-execution(java.util.Collection[] Iffy2.getIntegerCollectionArray())' in Type 'Iffy2' (Iffy2.java:56) advised by before advice from 'Iffy2' (Iffy2.java:10)"/>
<message kind="weave" aspectFile="Iffy2.java" aspectLine="23" text="method-execution(void Iffy2.myVoid())' in Type 'Iffy2' (Iffy2.java:50) advised by before advice"/>
<message kind="weave" aspectFile="Iffy2.java" aspectLine="35" text="method-execution(java.util.Collection[] Iffy2.getCollectionArray())' in Type 'Iffy2' (Iffy2.java:52) advised by before advice"/>
<message kind="weave" aspectFile="Iffy2.java" aspectLine="31" text="method-execution(java.util.Collection[] Iffy2.getCollectionArray())' in Type 'Iffy2' (Iffy2.java:52) advised by before advice"/>
<message kind="weave" aspectFile="Iffy2.java" aspectLine="27" text="method-execution(java.util.Collection[] Iffy2.getCollectionArray())' in Type 'Iffy2' (Iffy2.java:52) advised by before advice"/>
<message kind="weave" aspectFile="Iffy2.java" aspectLine="23" text="method-execution(java.util.Collection[] Iffy2.getCollectionArray())' in Type 'Iffy2' (Iffy2.java:52) advised by before advice"/>
<message kind="weave" aspectFile="Iffy2.java" aspectLine="10" text="method-execution(java.util.Collection[] Iffy2.getCollectionArray())' in Type 'Iffy2' (Iffy2.java:52) advised by before advice"/>
<message kind="weave" aspectFile="Iffy2.java" aspectLine="43" text="method-execution(java.util.Collection[] Iffy2.getIntegerCollectionArray())' in Type 'Iffy2' (Iffy2.java:56) advised by before advice"/>
<message kind="weave" aspectFile="Iffy2.java" aspectLine="27" text="method-execution(java.util.Collection[] Iffy2.getIntegerCollectionArray())' in Type 'Iffy2' (Iffy2.java:56) advised by before advice"/>
<message kind="weave" aspectFile="Iffy2.java" aspectLine="23" text="method-execution(java.util.Collection[] Iffy2.getIntegerCollectionArray())' in Type 'Iffy2' (Iffy2.java:56) advised by before advice"/>
<message kind="weave" aspectFile="Iffy2.java" aspectLine="10" text="method-execution(java.util.Collection[] Iffy2.getIntegerCollectionArray())' in Type 'Iffy2' (Iffy2.java:56) advised by before advice"/>

</compile>
</ajc-test>

+ 2
- 2
tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml View File

@@ -379,8 +379,8 @@
<message kind="warning" text="can not build thisJoinPoint lazily for this advice since it has no suitable guard [Xlint:noGuardForLazyTjp]"/>
<message kind="warning" text="at this shadow method-execution(void Application.greet(java.lang.String)) no precedence is specified between advice applying from aspect FirstAspect and aspect SecondAspect [Xlint:unorderedAdviceAtShadow]"/>
<message kind="warning" text="can not implement lazyTjp at joinpoint method-execution(void Application.greet(java.lang.String)) because of advice conflicts, see secondary locations to find conflicting advice [Xlint:multipleAdviceStoppingLazyTjp]"/>
<message kind="weave" text="method-execution(void Application.greet(java.lang.String))' in Type 'Application' (Application.java:4) advised by around advice from 'SecondAspect'"/>
<message kind="weave" text="method-execution(void Application.greet(java.lang.String))' in Type 'Application' (Application.java:4) advised by before advice from 'FirstAspect'"/>
<message kind="weave" aspectFile="SecondAspect.java" aspectLine="8" text="method-execution(void Application.greet(java.lang.String))' in Type 'Application' (Application.java:4) advised by around advice"/>
<message kind="weave" aspectFile="FirstAspect.class" aspectLine="0" text="method-execution(void Application.greet(java.lang.String))' in Type 'Application' (Application.java:4) advised by before advice"/>
</compile>
<run class="Application" classpath="$sandbox/second-aspect.jar,$sandbox/first-aspect.jar">
<stdout>

Loading…
Cancel
Save