aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/kotlin/com/replaymod/gradle/remap/mapper/kotlin/TestKotlinSyntheticProperties.kt16
-rw-r--r--src/test/resources/mappings.srg1
2 files changed, 17 insertions, 0 deletions
diff --git a/src/test/kotlin/com/replaymod/gradle/remap/mapper/kotlin/TestKotlinSyntheticProperties.kt b/src/test/kotlin/com/replaymod/gradle/remap/mapper/kotlin/TestKotlinSyntheticProperties.kt
index 20b65b9..65459f2 100644
--- a/src/test/kotlin/com/replaymod/gradle/remap/mapper/kotlin/TestKotlinSyntheticProperties.kt
+++ b/src/test/kotlin/com/replaymod/gradle/remap/mapper/kotlin/TestKotlinSyntheticProperties.kt
@@ -103,9 +103,15 @@ class TestKotlinSyntheticProperties {
TestData.remapKt("""
import a.pkg.A
val v = A().getConflictingFieldWithoutConflict()
+ class C : A() {
+ val v = getProtectedFieldWithoutConflict()
+ }
""".trimIndent()) shouldBe """
import b.pkg.B
val v = B().getConflictingField()
+ class C : B() {
+ val v = getProtectedField()
+ }
""".trimIndent()
}
@@ -114,9 +120,11 @@ class TestKotlinSyntheticProperties {
TestData.remapKt("""
import a.pkg.A
val v = A().getA()
+ val v = A().getProtectedFieldWithoutConflict()
""".trimIndent()) shouldBe """
import b.pkg.B
val v = B().b
+ val v = B().protectedField
""".trimIndent()
}
@@ -125,9 +133,15 @@ class TestKotlinSyntheticProperties {
TestData.remapKt("""
import a.pkg.A
val v = A().conflictingFieldWithoutConflict
+ class C : A() {
+ val v = protectedFieldWithoutConflict
+ }
""".trimIndent()) shouldBe """
import b.pkg.B
val v = B().getConflictingField()
+ class C : B() {
+ val v = getProtectedField()
+ }
""".trimIndent()
}
@@ -136,9 +150,11 @@ class TestKotlinSyntheticProperties {
TestData.remapKt("""
import a.pkg.A
val v = A().a
+ val v = A().protectedFieldWithoutConflict
""".trimIndent()) shouldBe """
import b.pkg.B
val v = B().b
+ val v = B().protectedField
""".trimIndent()
}
diff --git a/src/test/resources/mappings.srg b/src/test/resources/mappings.srg
index f8255aa..65cad17 100644
--- a/src/test/resources/mappings.srg
+++ b/src/test/resources/mappings.srg
@@ -17,6 +17,7 @@ MD: a/pkg/A/getterBooleanA ()Z; b/pkg/B/isNonSyntheticBooleanB ()Z;
MD: a/pkg/A/setterBooleanA (Z)V; b/pkg/B/setNonSyntheticBooleanB (Z)V;
FD: a/pkg/A/conflictingField b/pkg/B/conflictingField
MD: a/pkg/A/getConflictingFieldWithoutConflict ()I; b/pkg/B/getConflictingField ()I;
+MD: a/pkg/A/getProtectedFieldWithoutConflict ()I b/pkg/B/getProtectedField ()I
MD: a/pkg/A/aOverloaded ()V b/pkg/B/bOverloaded ()V
MD: a/pkg/A/aOverloaded (I)V b/pkg/B/bOverloaded (I)V
MD: a/pkg/A/aOverloaded (Z)V b/pkg/B/bOverloaded (Z)V