readme fix
This commit is contained in:
parent
988974230d
commit
a4cf3fe8ee
@ -30,6 +30,7 @@ data class Foobar2(val bar: Int, val foo: Int, val other: Int = -1)
|
||||
@Framed
|
||||
data class FoobarF1(val bar: Int, val foo: Int = 117)
|
||||
|
||||
@Suppress("unused")
|
||||
@Serializable
|
||||
@Framed
|
||||
@SerialName("bipack.FoobarF1")
|
||||
@ -440,4 +441,21 @@ class BipackEncoderTest {
|
||||
println(y)
|
||||
}
|
||||
|
||||
|
||||
@Serializable
|
||||
data class T1(@Fixed val i: Byte)
|
||||
|
||||
@Test
|
||||
fun testFixedByte() {
|
||||
fun t1(i: Int) {
|
||||
val packed = BipackEncoder.encode(T1(i.toByte()))
|
||||
println(packed.toDump())
|
||||
assertEquals(1, packed.size)
|
||||
assertEquals(i, BipackDecoder.decode<T1>(packed).i.toInt())
|
||||
}
|
||||
t1(127)
|
||||
t1(-127)
|
||||
t1(1)
|
||||
t1(-1)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user