Parcelize: Fix test code

On Android, we would need to call `setDataPosition(0)` after
unmarshalling a parcel. The reason why the test code is currently
working is purely because the Robolectric test framework is more
permissive.
This commit is contained in:
Steven Schäfer
2020-05-13 16:30:04 +02:00
committed by Yan Zhulanow
parent d93e5d3dc0
commit 9b7a95b05c
40 changed files with 40 additions and 0 deletions
@@ -17,6 +17,7 @@ fun box() = parcelTest { parcel ->
val bytes = parcel.marshall()
parcel.unmarshall(bytes, 0, bytes.size)
parcel.setDataPosition(0)
val test2 = readFromParcel<User>(parcel)