test for inner class CrcProtection bug
This commit is contained in:
parent
8aa82bb42f
commit
e4f2644169
@ -183,4 +183,23 @@ class BipackEncoderTest {
|
|||||||
// println(d.decodeFromBipack<Types1>())
|
// println(d.decodeFromBipack<Types1>())
|
||||||
assertEquals(t1, d.decodeFromBipack())
|
assertEquals(t1, d.decodeFromBipack())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
// @CrcProtected
|
||||||
|
// @Framed
|
||||||
|
data class Inner(val bar: String, val foo: Int)
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
// @Framed
|
||||||
|
@CrcProtected
|
||||||
|
data class Outer(val i1: Inner,val i2: Inner)
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testNEstedProtected() {
|
||||||
|
val x = Outer(Inner("foo", 42), Inner("bar", 117))
|
||||||
|
val d = BipackEncoder.encode(x)
|
||||||
|
println(d.toDump())
|
||||||
|
assertEquals(x, d.decodeFromBipack())
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user