Parcelize: Improve testing infrarstructure
- Support newer android versions - Allow testing against Java files using android APIs - Update test expectations - Auto-generate ParcelBoxTests - Create tests for the JVM IR backend
This commit is contained in:
committed by
Alexander Udalov
parent
d62b353ab5
commit
1f97486fdd
+5
-2
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND: JVM
|
||||
// See KT-38107
|
||||
// The JVM backend is missing support for custom parcelers in List<String>
|
||||
// WITH_RUNTIME
|
||||
|
||||
@file:JvmName("TestKt")
|
||||
@@ -46,6 +49,6 @@ fun box() = parcelTest { parcel ->
|
||||
}
|
||||
|
||||
with (test2) {
|
||||
assert(a == "Abc" && b == "3" && c == listOf("A", "bc") && d == listOf("A,bc") && e == listOf("A,bc"))
|
||||
assert(a == "Abc" && b == "3" && c == listOf("1", "2") && d == listOf("A,bc") && e == listOf("A,bc"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND: JVM
|
||||
// See KT-38105
|
||||
// Throws IllegalAccessError, since the code tries to access the private companion field directly from the generated User$Creator class.
|
||||
// WITH_RUNTIME
|
||||
|
||||
@file:JvmName("TestKt")
|
||||
@@ -31,4 +34,4 @@ fun box() = parcelTest { parcel ->
|
||||
assert(user.firstName == user2.firstName)
|
||||
assert(user.secondName == user2.secondName)
|
||||
assert(user2.age == 0)
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
// IGNORE_BACKEND: JVM
|
||||
// See KT-38106
|
||||
// This feature regressed with the fix for KT-22576
|
||||
// WITH_RUNTIME
|
||||
|
||||
@file:JvmName("TestKt")
|
||||
@@ -42,4 +45,4 @@ fun box() = parcelTest { parcel ->
|
||||
assert(first.parcelableEnum == ParcelableEnum.THREE)
|
||||
assert(first2.parcelableEnum == ParcelableEnum.ONE)
|
||||
assert(first != first2)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user