Skip to content

Commit

Permalink
Use aspect file/line matching for weave messages in some tests
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kriegaex committed Apr 13, 2024
1 parent a3f62b5 commit c6e5f90
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions tests/src/test/resources/org/aspectj/systemtest/ajc165/ajc165.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit c6e5f90

Please sign in to comment.