diff options
Diffstat (limited to 'src/test/kotlin/com/replaymod/gradle/remap/util/TestData.kt')
-rw-r--r-- | src/test/kotlin/com/replaymod/gradle/remap/util/TestData.kt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/kotlin/com/replaymod/gradle/remap/util/TestData.kt b/src/test/kotlin/com/replaymod/gradle/remap/util/TestData.kt index 0f83373..adb6f52 100644 --- a/src/test/kotlin/com/replaymod/gradle/remap/util/TestData.kt +++ b/src/test/kotlin/com/replaymod/gradle/remap/util/TestData.kt @@ -41,9 +41,15 @@ object TestData { findClasspathEntry("org.spongepowered.asm.mixin.Mixin"), findClasspathEntry("a.pkg.A"), ) + patternAnnotation = "remap.Pattern" } - fun remap(content: String): String = transformer.remap(mapOf("test.java" to content))["test.java"]!!.first + fun remap(content: String, patternsBefore: String = "", patternsAfter: String = ""): String = transformer.remap(mapOf( + "test.java" to content, + "pattern.java" to "class Patterns {\n$patternsBefore\n}", + ), mapOf( + "pattern.java" to "class Patterns {\n$patternsAfter\n}", + ))["test.java"]!!.first fun remapWithErrors(content: String) = transformer.remap(mapOf("test.java" to content))["test.java"]!! fun remapKt(content: String): String = transformer.remap(mapOf("test.kt" to content))["test.kt"]!!.first |