From 62e3c5a678f10fc810605053289700014a16acd5 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Wed, 10 Nov 2021 20:33:45 +0100 Subject: Add test for anonymous inner class mixin target To ensure the mixin target is being remapped, even though the corresponding PsiClass cannot be found. --- .../com/replaymod/gradle/remap/mapper/TestMixinAnnotation.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/test/kotlin/com/replaymod/gradle/remap') diff --git a/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinAnnotation.kt b/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinAnnotation.kt index 1f9a3a2..595b65f 100644 --- a/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinAnnotation.kt +++ b/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinAnnotation.kt @@ -49,4 +49,15 @@ class TestMixinAnnotation { class MixinA { @Shadow private int bField; } """.trimIndent() } + + @Test + fun `remaps with anonymous inner class target`() { + TestData.remap(""" + @org.spongepowered.asm.mixin.Mixin(targets = "a.pkg.A${'$'}1") + class MixinA {} + """.trimIndent()) shouldBe """ + @org.spongepowered.asm.mixin.Mixin(targets = "b.pkg.B${'$'}1") + class MixinA {} + """.trimIndent() + } } \ No newline at end of file -- cgit