aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin/com/replaymod/gradle/remap/mapper/TestMixinOverride.kt
blob: 6caaebae89977f904f671fb429376768bef31883 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 TestMixinOverride {
    @Test
    fun `remaps overridden method`() {
        TestData.remap("""
            @org.spongepowered.asm.mixin.Mixin(a.pkg.A.class)
            abstract class MixinA extends a.pkg.AParent {
                @Override
                public a.pkg.AParent aParentMethod() {
                    return this;
                }
            }
        """.trimIndent()) shouldBe """
            @org.spongepowered.asm.mixin.Mixin(b.pkg.B.class)
            abstract class MixinA extends b.pkg.BParent {
                @Override
                public b.pkg.BParent bParentMethod() {
                    return this;
                }
            }
        """.trimIndent()
    }
}