File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
msgpack-core/src/test/scala/org/msgpack/core Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ class MessageUnpackerTest extends MessagePackSpec {
147147 val mapLen = unpacker.unpackMapHeader()
148148 debug(s " map size: $mapLen" )
149149 case ValueType .INTEGER =>
150- val i = unpacker.unpackInt ()
150+ val i = unpacker.unpackLong ()
151151 debug(s " int value: $i" )
152152 case ValueType .STRING =>
153153 val s = unpacker.unpackString()
@@ -296,7 +296,23 @@ class MessageUnpackerTest extends MessagePackSpec {
296296
297297 new SplitTest {val data = testData}.run
298298 new SplitTest {val data = testData3(30 )}.run
299+ }
300+
301+ " read numeric data at buffer boundary" taggedAs(" boundary2" ) in {
302+ val packer = MessagePack .newDefaultBufferPacker()
303+ (0 until 1170 ).foreach{i =>
304+ packer.packLong(0x0011223344556677L)
305+ packer.packString(" hello" )
306+ }
307+ packer.close
308+ val data = packer.toByteArray
299309
310+ val unpacker = MessagePack .newDefaultUnpacker(new InputStreamBufferInput (new ByteArrayInputStream (data), 8192 ))
311+ (0 until 1170 ).foreach { i =>
312+ unpacker.unpackLong() shouldBe 0x0011223344556677L
313+ unpacker.unpackString() shouldBe " hello"
314+ }
315+ unpacker.close()
300316 }
301317
302318 " be faster then msgpack-v6 skip" taggedAs (" cmp-skip" ) in {
You can’t perform that action at this time.
0 commit comments