Skip to content

Commit

Permalink
Add Bugs1921Tests::testGitHub_285
Browse files Browse the repository at this point in the history
This is an additional reproducer for regression bug #285.

Signed-off-by: Alexander Kriegisch <[email protected]>
  • Loading branch information
kriegaex committed Mar 2, 2024
1 parent 2fa6a86 commit 27f14f4
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/bugs1921/github_285/Unwoven.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
public class Unwoven {
public static void main(String[] args) {
System.out.println("Hello world");
}
}
5 changes: 5 additions & 0 deletions tests/bugs1921/github_285/aop.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<aspectj>
<weaver>
<include within="*"/>
</weaver>
</aspectj>
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public void testGitHub_279() {
runTest("same class woven concurrently in parallel-capable classloader");
}

public void testGitHub_285() {
runTest("shared cache negative test");
}

public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Bugs1921Tests.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,25 @@
<ant file="ant.xml" target="same class woven concurrently in parallel-capable classloader" verbose="true"/>
</ajc-test>

<!--
https://github.com/eclipse-aspectj/aspectj/issues/285, AspectJ 1.9.21.2
See also org.aspectj.systemtest.ajc171.NewFeatures::testSharedCache. This is a quasi negative test missing back in
1.7.2 when the shared cache was introduced.
-->
<ajc-test dir="bugs1921/github_285" title="shared cache negative test">
<compile files="Unwoven.java" options="-1.5"/>
<run class="Unwoven" ltw="aop.xml" usefullltw="true"
vmargs="-Daj.weaving.cache.enabled=true -Daj.weaving.cache.dir=./ -Daj.weaving.cache.impl=shared">
<stdout>
<line text="Hello world"/>
</stdout>
<!--
Nothing should be printed on stderr, especially no fatal NPE with message
'Cannot read the array length because "b" is null' and subsequent ajcore.*.txt
-->
<stderr/>
</run>
</ajc-test>

</suite>

0 comments on commit 27f14f4

Please sign in to comment.