forked from ReplayMod/remap
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
28 additions
and
21 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/test/kotlin/com/replaymod/gradle/remap/generic/TestGenericJavaCode.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.replaymod.gradle.remap.generic | ||
|
||
import com.replaymod.gradle.remap.util.TestData | ||
import io.kotest.matchers.shouldBe | ||
import org.junit.jupiter.api.Test | ||
|
||
class TestGenericJavaCode { | ||
@Test | ||
fun `remaps methods that have synthetic bridges that change the return type`() { | ||
TestData.remap(""" | ||
@org.spongepowered.asm.mixin.Mixin(a.pkg.A.class) | ||
abstract class MixinA { | ||
private void test() { | ||
final a.pkg.A value = null; | ||
value.aGeneratedSynthetic(); | ||
} | ||
} | ||
""".trimIndent()) shouldBe """ | ||
@org.spongepowered.asm.mixin.Mixin(b.pkg.B.class) | ||
abstract class MixinA { | ||
private void test() { | ||
final b.pkg.B value = null; | ||
value.bGeneratedSynthetic(); | ||
} | ||
} | ||
""".trimIndent() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters