diff --git a/src/commonTest/kotlin/bipack/BipackEncoderTest.kt b/src/commonTest/kotlin/bipack/BipackEncoderTest.kt index 43bb310..fe05346 100644 --- a/src/commonTest/kotlin/bipack/BipackEncoderTest.kt +++ b/src/commonTest/kotlin/bipack/BipackEncoderTest.kt @@ -183,4 +183,23 @@ class BipackEncoderTest { // println(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()) + } + } \ No newline at end of file