Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class MessageUnpackerTest extends MessagePackSpec {
val mapLen = unpacker.unpackMapHeader()
debug(s"map size: $mapLen")
case ValueType.INTEGER =>
val i = unpacker.unpackInt()
val i = unpacker.unpackLong()
debug(s"int value: $i")
case ValueType.STRING =>
val s = unpacker.unpackString()
Expand Down Expand Up @@ -301,6 +301,24 @@ class MessageUnpackerTest extends MessagePackSpec {

}

"read numeric data at buffer boundary" taggedAs("boundary2") in {
val out = new ByteArrayOutputStream
val packer = MessagePack.newDefaultPacker(out)
(0 until 1170).foreach{i =>
packer.packLong(0x0011223344556677L)
packer.packString("hello")
}
packer.close
val data = out.toByteArray

val unpacker = new MessageUnpacker(new InputStreamBufferInput(new ByteArrayInputStream(data), 8192))
(0 until 1170).foreach { i =>
unpacker.unpackLong() shouldBe 0x0011223344556677L
unpacker.unpackString() shouldBe "hello"
}
unpacker.close()
}

"be faster then msgpack-v6 skip" taggedAs ("cmp-skip") in {

val data = testData3(10000)
Expand Down