[Test] Migrate Parcelize tests to new test infrastructure
This commit is contained in:
committed by
TeamCityServer
parent
a68c4ec7be
commit
df47bffabb
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
@@ -14,4 +14,4 @@ class User(
|
||||
val binderArrayList: ArrayList<IBinder> // should be serialized using our strategy, not using Parcel.writeBinderList()
|
||||
// There is no readStrongInterface method in Parcel.
|
||||
// val intf: IInterface?
|
||||
) : Parcelable
|
||||
) : Parcelable
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel
|
||||
// WITH_RUNTIME
|
||||
|
||||
// Test to ensure that we are using the correct class loader
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT describeContents
|
||||
// CURIOUS_ABOUT: describeContents
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
@@ -7,4 +7,4 @@ import android.os.Parcelable
|
||||
@Parcelize
|
||||
class User(val firstName: String, val lastName: String, val age: Int, val isProUser: Boolean) : Parcelable {
|
||||
override fun describeContents() = 100
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel, <clinit>
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel, <clinit>
|
||||
// WITH_RUNTIME
|
||||
|
||||
package test
|
||||
@@ -8,4 +8,4 @@ import android.os.*
|
||||
import android.accounts.Account
|
||||
|
||||
@Parcelize
|
||||
class Foo(val kp: Account): Parcelable
|
||||
class Foo(val kp: Account): Parcelable
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@ public final class test/Foo$Creator : java/lang/Object, android/os/Parcelable$Cr
|
||||
|
||||
public java.lang.Object createFromParcel(android.os.Parcel p0) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (9)
|
||||
LINENUMBER (40)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
INVOKEVIRTUAL (test/Foo$Creator, createFromParcel, (Landroid/os/Parcel;)Ltest/Foo;)
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel, <clinit>
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel, <clinit>
|
||||
// WITH_RUNTIME
|
||||
|
||||
// FILE: KotlinParcelable.kt
|
||||
@@ -37,4 +37,4 @@ import android.os.*
|
||||
import k.*
|
||||
|
||||
@Parcelize
|
||||
class Foo(val kp: KotlinParcelable): Parcelable
|
||||
class Foo(val kp: KotlinParcelable): Parcelable
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel, newArray
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel, newArray
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
@@ -16,4 +16,4 @@ class User(val firstName: String, val lastName: String, val age: Int) : Parcelab
|
||||
|
||||
override fun create(parcel: Parcel) = User(parcel.readString(), parcel.readString(), parcel.readInt())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT newArray
|
||||
// CURIOUS_ABOUT: newArray
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
@@ -18,4 +18,4 @@ class User(val firstName: String, val lastName: String, val age: Int) : Parcelab
|
||||
|
||||
override fun newArray(size: Int) = arrayOfNulls<User>(size) as Array<User>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT describeContents
|
||||
// CURIOUS_ABOUT: describeContents
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
@@ -9,4 +9,4 @@ abstract class AbstractUser : Parcelable {
|
||||
}
|
||||
|
||||
@Parcelize
|
||||
class User(val firstName: String, val lastName: String, val age: Int, val isProUser: Boolean) : AbstractUser()
|
||||
class User(val firstName: String, val lastName: String, val age: Int, val isProUser: Boolean) : AbstractUser()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT <clinit>
|
||||
// CURIOUS_ABOUT: <clinit>
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
@@ -11,4 +11,4 @@ class User(val firstName: String) : Parcelable {
|
||||
@JvmStatic
|
||||
private val test = StringBuilder()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel, <clinit>
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel, <clinit>
|
||||
// WITH_RUNTIME
|
||||
//FILE: test.kt
|
||||
package test
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel
|
||||
// RENDER_ANNOTATIONS
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel
|
||||
// WITH_RUNTIME
|
||||
|
||||
package test
|
||||
@@ -7,4 +7,4 @@ import kotlinx.parcelize.*
|
||||
import android.os.Parcelable
|
||||
|
||||
@Parcelize
|
||||
class SomeClass : Parcelable
|
||||
class SomeClass : Parcelable
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// CURIOUS_ABOUT writeToParcel
|
||||
// CURIOUS_ABOUT: writeToParcel
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
import android.os.Parcelable
|
||||
|
||||
@Parcelize
|
||||
class Test(val names: List<List<ArrayList<String>>>): Parcelable
|
||||
class Test(val names: List<List<ArrayList<String>>>): Parcelable
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel
|
||||
// CURIOUS_ABOUT: writeToParcel
|
||||
// WITH_RUNTIME
|
||||
|
||||
import android.util.Size
|
||||
@@ -9,4 +9,4 @@ import android.os.Parcelable
|
||||
class TestNullable(val a: Size?): Parcelable
|
||||
|
||||
@Parcelize
|
||||
class TestNotNull(val a: Size): Parcelable
|
||||
class TestNotNull(val a: Size): Parcelable
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ public final class test/Foo$Creator : java/lang/Object, android/os/Parcelable$Cr
|
||||
|
||||
public java.lang.Object createFromParcel(android.os.Parcel p0) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (8)
|
||||
LINENUMBER (37)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
INVOKEVIRTUAL (test/Foo$Creator, createFromParcel, (Landroid/os/Parcel;)Ltest/Foo;)
|
||||
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel, <clinit>
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel, <clinit>
|
||||
// WITH_RUNTIME
|
||||
|
||||
//FILE: test/JavaClass.java
|
||||
@@ -34,4 +34,4 @@ import kotlinx.parcelize.*
|
||||
import android.os.Parcelable
|
||||
|
||||
@Parcelize
|
||||
class Foo(val parcelable: Parcelable): Parcelable
|
||||
class Foo(val parcelable: Parcelable): Parcelable
|
||||
|
||||
+1
-1
@@ -324,4 +324,4 @@ public final class ParcelableCreatorKt : java/lang/Object {
|
||||
LINENUMBER (28)
|
||||
RETURN
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT test1, test2, test3
|
||||
// CURIOUS_ABOUT: test1, test2, test3
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel
|
||||
// WITH_RUNTIME
|
||||
|
||||
// The JVM backend doesn't support ShortArray
|
||||
// IGNORE_BACKEND: JVM
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
/*
|
||||
* Serializing of short arrays is not properly supported in old frontend, so this
|
||||
* test is on only for JVM IR backend
|
||||
*/
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
import android.os.Parcelable
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel, <clinit>
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel, <clinit>
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
@@ -8,4 +8,4 @@ import java.io.Serializable
|
||||
class SerializableSimple(val a: String, val b: String) : Serializable
|
||||
|
||||
@Parcelize
|
||||
class User(val notNull: SerializableSimple, val nullable: SerializableSimple) : Parcelable
|
||||
class User(val notNull: SerializableSimple, val nullable: SerializableSimple) : Parcelable
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel, <clinit>, describeContents
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel, <clinit>, describeContents
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel, <clinit>, describeContents
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel, <clinit>, describeContents
|
||||
// WITH_RUNTIME
|
||||
// LOCAL_VARIABLE_TABLE
|
||||
|
||||
@@ -6,4 +6,4 @@ import kotlinx.parcelize.*
|
||||
import android.os.Parcelable
|
||||
|
||||
@Parcelize
|
||||
class User(val firstName: String, val lastName: String, val age: Int, val isProUser: Boolean) : Parcelable
|
||||
class User(val firstName: String, val lastName: String, val age: Int, val isProUser: Boolean) : Parcelable
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// CURIOUS_ABOUT writeToParcel
|
||||
// CURIOUS_ABOUT: writeToParcel
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
import android.os.Parcelable
|
||||
|
||||
@Parcelize
|
||||
class Test(val names: List<String>): Parcelable
|
||||
class Test(val names: List<String>): Parcelable
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
@@ -10,4 +10,4 @@ import android.util.SizeF
|
||||
data class Test(val size: Size, val nullable: Size?) : Parcelable
|
||||
|
||||
@Parcelize
|
||||
data class TestF(val size: SizeF, val nullable: SizeF?) : Parcelable
|
||||
data class TestF(val size: SizeF, val nullable: SizeF?) : Parcelable
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel
|
||||
// CURIOUS_ABOUT: writeToParcel, createFromParcel
|
||||
// WITH_RUNTIME
|
||||
// IGNORE_BACKEND: JVM
|
||||
|
||||
|
||||
Reference in New Issue
Block a user