Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix test
  • Loading branch information
xerial committed May 12, 2021
commit 111fe8e21e515caee0b8d39a096240578545a6ca
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ class MessageBufferPackerTest extends MessagePackSpec {

test("clear unflushed") {
val packer = MessagePack.newDefaultBufferPacker
packer.packInt(1);
packer.clear();
packer.packInt(2);
packer.packInt(1)
packer.clear()
packer.packInt(2)

packer.toByteArray shouldBe Array(2)
packer.toByteArray shouldBe Array[Byte](2)
val buffer = packer.toBufferList().get(0)
buffer.toByteArray() shouldBe Array(2)
buffer.toByteArray() shouldBe Array[Byte](2)
val array = Arrays.copyOf(buffer.sliceAsByteBuffer().array(), buffer.size())
array shouldBe Array(2)
array shouldBe Array[Byte](2)
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ class MessageUnpackerTest extends AirSpec with Timer {
}

test("parse int data") {

debug(intSeq.mkString(", "))

for (unpacker <- unpackers(testData2)) {
Expand All @@ -323,10 +322,9 @@ class MessageUnpackerTest extends AirSpec with Timer {
}
}

ib.result shouldBe intSeq
ib.result shouldBe intSeq.toSeq
unpacker.getTotalReadBytes shouldBe testData2.length
}

}

test("read data at the buffer boundary") {
Expand Down