add more tests and fixed more glitches

This commit is contained in:
sergeych committed 2023-03-15 10:43:06 +01:00
1 parent 2823692b03
commit d97de2c3ea
5 files changed
+37 -11

No files matched your search

@@ -23,10 +23,10 @@ interface DataSink {
for(d in data) writeByte(d)
}
fun writeVarUInt(value: UInt) { Varint.encodeUnsigned(value.toULong())}
fun writeVarInt(value: UInt) { Varint.encodeSigned(value.toLong())}
fun writeSmartUInt(value: UInt) { Smartint.encodeUnsigned(value.toULong())}
fun writeSmartInt(value: UInt) { Smartint.encodeSigned(value.toLong())}
fun writeVarUInt(value: UInt) { Varint.encodeUnsigned(value.toULong(), this)}
fun writeVarInt(value: UInt) { Varint.encodeSigned(value.toLong(), this)}
fun writeSmartUInt(value: UInt) { Smartint.encodeUnsigned(value.toULong(), this)}
fun writeSmartInt(value: UInt) { Smartint.encodeSigned(value.toLong(), this)}
}
inline fun <reified T:Any>DataSink.writeNumber(value: T) {