aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin/com/replaymod/gradle/remap/mapper
diff options
context:
space:
mode:
authorJonas Herzig <jonas@spark-squared.com>2021-11-10 20:33:45 +0100
committerJonas Herzig <jonas@spark-squared.com>2021-11-10 20:33:45 +0100
commit62e3c5a678f10fc810605053289700014a16acd5 (patch)
tree68503b428c7783f1ea3b9b4c764b4815144146b1 /src/test/kotlin/com/replaymod/gradle/remap/mapper
parent971ee3e3186f1515e382985ab23a8d32899c5a07 (diff)
downloadRemap-62e3c5a678f10fc810605053289700014a16acd5.tar.gz
Remap-62e3c5a678f10fc810605053289700014a16acd5.tar.bz2
Remap-62e3c5a678f10fc810605053289700014a16acd5.zip
Add test for anonymous inner class mixin target
To ensure the mixin target is being remapped, even though the corresponding PsiClass cannot be found.
Diffstat (limited to 'src/test/kotlin/com/replaymod/gradle/remap/mapper')
-rw-r--r--src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinAnnotation.kt11
1 files changed, 11 insertions, 0 deletions
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