aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin/com/replaymod/gradle
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/kotlin/com/replaymod/gradle')
-rw-r--r--src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinInjections.kt23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinInjections.kt b/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinInjections.kt
index fd4c1cb..b473dbe 100644
--- a/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinInjections.kt
+++ b/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinInjections.kt
@@ -139,6 +139,29 @@ class TestMixinInjections {
}
@Test
+ fun `remaps method in constant`() {
+ TestData.remap("""
+ @org.spongepowered.asm.mixin.Mixin(a.pkg.A.class)
+ class MixinA {
+ private static final String TARGET = "aMethod";
+ @org.spongepowered.asm.mixin.injection.Inject(method = TARGET)
+ private void test1() {}
+ @org.spongepowered.asm.mixin.injection.Inject(method = TARGET)
+ private void test2() {}
+ }
+ """.trimIndent()) shouldBe """
+ @org.spongepowered.asm.mixin.Mixin(b.pkg.B.class)
+ class MixinA {
+ private static final String TARGET = "bMethod";
+ @org.spongepowered.asm.mixin.injection.Inject(method = TARGET)
+ private void test1() {}
+ @org.spongepowered.asm.mixin.injection.Inject(method = TARGET)
+ private void test2() {}
+ }
+ """.trimIndent()
+ }
+
+ @Test
fun `remaps @At target`() {
TestData.remap("""
import org.spongepowered.asm.mixin.injection.At;