diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-06-24 08:15:24 +0200 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-06-26 13:48:27 +0700 |
commit | 1e2d9683b4b0d75dfd9830ebeb482e56cf40fd8d (patch) | |
tree | 2e4b723ff23c6095ae3905c68d181a2c91a8f333 /tests/src | |
parent | ba9ac235eea72de6b040166a098db183a5b04a6e (diff) | |
download | aspectj-1e2d9683b4b0d75dfd9830ebeb482e56cf40fd8d.tar.gz aspectj-1e2d9683b4b0d75dfd9830ebeb482e56cf40fd8d.zip |
Add failing test reproducing #246
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/test/java/org/aspectj/systemtest/ajc1920/Bugs1920Tests.java | 11 | ||||
-rw-r--r-- | tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml | 12 |
2 files changed, 21 insertions, 2 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc1920/Bugs1920Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc1920/Bugs1920Tests.java index fca9fee20..409a2e675 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc1920/Bugs1920Tests.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc1920/Bugs1920Tests.java @@ -15,8 +15,15 @@ import org.aspectj.testing.XMLBasedAjcTestCase; */ public class Bugs1920Tests extends XMLBasedAjcTestCase { - public void testDummyJava20() { - //runTest("dummy Java 20"); + /** + * Add correct annotations to multiple ITD methods with the same name and same number of arguments, i.e. copy the + * annotations correctly from the aspect into the target class instead of falsely always copying the annotations (if + * any) from the first ITD method found. + * <p> + * See <a href="https://github.com/eclipse-aspectj/aspectj/issues/246">GitHub issue 246</a>. + */ + public void test_GitHub_246() { + runTest("add correct annotations to multiple ITD methods with the same name and same number of arguments"); } public static Test suite() { diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml index 8f566b643..2026df491 100644 --- a/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml @@ -176,4 +176,16 @@ </run> </ajc-test> + <!-- https://github.com/eclipse-aspectj/aspectj/issues/246 --> + <ajc-test dir="bugs1920/github_246" vm="8" title="add correct annotations to multiple ITD methods with the same name and same number of arguments"> + <compile files="First.java Second.java App.java ITDAspect.aj" options="-8"/> + <run class="App"> + <stdout> + <line text="[@First(), @Second()] public void App.foo(java.lang.Object)"/> + <line text="[@First()] public void App.foo(java.lang.String)"/> + <line text="[@Second()] public int App.foo(int)"/> + </stdout> + </run> + </ajc-test> + </suite> |