aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinShadow.kt
diff options
context:
space:
mode:
authorJonas Herzig <jonas@spark-squared.com>2021-11-11 20:37:10 +0100
committerJonas Herzig <jonas@spark-squared.com>2021-11-12 15:23:25 +0100
commit1aa8b425982a6d30a177bc25a70a325652209ee0 (patch)
treed2566206ab2fd4580608d0b2a00a1929ab2e34b2 /src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinShadow.kt
parent42abaaa0994ee5d0cc900e1f819605b88185f64f (diff)
downloadRemap-1aa8b425982a6d30a177bc25a70a325652209ee0.tar.gz
Remap-1aa8b425982a6d30a177bc25a70a325652209ee0.tar.bz2
Remap-1aa8b425982a6d30a177bc25a70a325652209ee0.zip
Fix methods in mixin being remapped when they should not be
Diffstat (limited to 'src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinShadow.kt')
-rw-r--r--src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinShadow.kt26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinShadow.kt b/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinShadow.kt
new file mode 100644
index 0000000..bc4ebe6
--- /dev/null
+++ b/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinShadow.kt
@@ -0,0 +1,26 @@
+package com.replaymod.gradle.remap.mapper
+
+import com.replaymod.gradle.remap.util.TestData
+import io.kotest.matchers.shouldBe
+import org.junit.jupiter.api.Test
+
+class TestMixinShadow {
+ @Test
+ fun `remaps shadow method and references to it`() {
+ TestData.remap("""
+ @org.spongepowered.asm.mixin.Mixin(a.pkg.A.class)
+ abstract class MixinA {
+ @org.spongepowered.asm.mixin.Shadow
+ protected abstract a.pkg.A getA();
+ private void test() { this.getA(); }
+ }
+ """.trimIndent()) shouldBe """
+ @org.spongepowered.asm.mixin.Mixin(b.pkg.B.class)
+ abstract class MixinA {
+ @org.spongepowered.asm.mixin.Shadow
+ protected abstract b.pkg.B getB();
+ private void test() { this.getB(); }
+ }
+ """.trimIndent()
+ }
+} \ No newline at end of file