From 26107cde7a9c47e444878736a9c34b64744c5f00 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Sat, 13 Nov 2021 09:49:17 +0100 Subject: Support multi-target mixin injectors --- .../gradle/remap/mapper/mixin/TestMixinInjections.kt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/test') diff --git a/src/test/kotlin/com/replaymod/gradle/remap/mapper/mixin/TestMixinInjections.kt b/src/test/kotlin/com/replaymod/gradle/remap/mapper/mixin/TestMixinInjections.kt index 0cba1ae..da68496 100644 --- a/src/test/kotlin/com/replaymod/gradle/remap/mapper/mixin/TestMixinInjections.kt +++ b/src/test/kotlin/com/replaymod/gradle/remap/mapper/mixin/TestMixinInjections.kt @@ -161,6 +161,23 @@ class TestMixinInjections { """.trimIndent() } + @Test + fun `remaps multiple methods`() { + TestData.remap(""" + @org.spongepowered.asm.mixin.Mixin(a.pkg.A.class) + class MixinA { + @org.spongepowered.asm.mixin.injection.Inject(method = { "aMethod", "aInterfaceMethod" }) + private void test() {} + } + """.trimIndent()) shouldBe """ + @org.spongepowered.asm.mixin.Mixin(b.pkg.B.class) + class MixinA { + @org.spongepowered.asm.mixin.injection.Inject(method = { "bMethod", "bInterfaceMethod" }) + private void test() {} + } + """.trimIndent() + } + @Test fun `remaps @At target`() { TestData.remap(""" -- cgit