From: Alexander Kriegisch Date: Mon, 9 Jan 2023 16:53:30 +0000 (+0100) Subject: Expand regression tests for GitHub bug #24 X-Git-Tag: V1_9_20~57 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9198f15f9bef7becb7dbce7c1a73e1e04b60cd18;p=aspectj.git Expand regression tests for GitHub bug #24 More test cases were added for - multi-dimensional arrays, - primitive type arrays. Relates to https://github.com/eclipse/org.aspectj/issues/24. Signed-off-by: Alexander Kriegisch --- diff --git a/tests/bugs1919/github_24/ExactlyMatchingAspect.aj b/tests/bugs1919/github_24/ExactlyMatchingAspect.aj index 8a78394c3..a884d00fc 100644 --- a/tests/bugs1919/github_24/ExactlyMatchingAspect.aj +++ b/tests/bugs1919/github_24/ExactlyMatchingAspect.aj @@ -6,4 +6,20 @@ public aspect ExactlyMatchingAspect { after() : execution(public MaybeMissingClass[] MaybeMissingClass.*()) { System.out.println(thisJoinPoint); } + + after() : execution(public MaybeMissingClass[][] MaybeMissingClass.*()) { + System.out.println(thisJoinPoint); + } + + after() : execution(public int MaybeMissingClass.*()) { + System.out.println(thisJoinPoint); + } + + after() : execution(public int[] MaybeMissingClass.*()) { + System.out.println(thisJoinPoint); + } + + after() : execution(public int[][] MaybeMissingClass.*()) { + System.out.println(thisJoinPoint); + } } diff --git a/tests/bugs1919/github_24/FuzzilyMatchingAspect.aj b/tests/bugs1919/github_24/FuzzilyMatchingAspect.aj index 999282873..d7c32a70a 100644 --- a/tests/bugs1919/github_24/FuzzilyMatchingAspect.aj +++ b/tests/bugs1919/github_24/FuzzilyMatchingAspect.aj @@ -6,4 +6,20 @@ public aspect FuzzilyMatchingAspect { after() : execution(public MaybeMissing*[] MaybeMissing*.*()) { System.out.println(thisJoinPoint); } + + after() : execution(public MaybeMissing*[][] MaybeMissing*.*()) { + System.out.println(thisJoinPoint); + } + + after() : execution(public in* MaybeMissing*.*()) { + System.out.println(thisJoinPoint); + } + + after() : execution(public in*[] MaybeMissing*.*()) { + System.out.println(thisJoinPoint); + } + + after() : execution(public in*[][] MaybeMissing*.*()) { + System.out.println(thisJoinPoint); + } } diff --git a/tests/bugs1919/github_24/MaybeMissingClass.java b/tests/bugs1919/github_24/MaybeMissingClass.java index 3fa5fa274..17952583b 100644 --- a/tests/bugs1919/github_24/MaybeMissingClass.java +++ b/tests/bugs1919/github_24/MaybeMissingClass.java @@ -2,6 +2,10 @@ public class MaybeMissingClass { public static void main(String[] args) { f1(); f2(); + f3(); + f4(); + f5(); + f6(); } public static MaybeMissingClass f1() { @@ -13,4 +17,24 @@ public class MaybeMissingClass { System.out.println("MaybeMissingClass.f2"); return null; } + + public static MaybeMissingClass[][] f3() { + System.out.println("MaybeMissingClass.f3"); + return null; + } + + public static int f4() { + System.out.println("MaybeMissingClass.f4"); + return 0; + } + + public static int[] f5() { + System.out.println("MaybeMissingClass.f5"); + return new int[2]; + } + + public static int[][] f6() { + System.out.println("MaybeMissingClass.f6"); + return new int[2][2]; + } } diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc1919/ajc1919.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc1919/ajc1919.xml index 67c0b6328..15f5d18d6 100644 --- a/tests/src/test/resources/org/aspectj/systemtest/ajc1919/ajc1919.xml +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc1919/ajc1919.xml @@ -229,8 +229,12 @@ - - + + + + + + @@ -238,6 +242,14 @@ + + + + + + + + @@ -248,17 +260,17 @@ --> - - - - - - + + + + + + @@ -266,6 +278,14 @@ + + + + + + + + @@ -277,8 +297,12 @@ - - + + + + + + @@ -286,6 +310,14 @@ + + + + + + + + @@ -297,12 +329,15 @@ - - - + + + + + + @@ -310,6 +345,14 @@ + + + + + + + +