Simplify testCrc32 slightly

Signed-off-by: Graham <gpe@openrs2.org>
pull/132/head
Graham 3 years ago
parent c70cfcfb30
commit f2f3da3281
  1. 9
      buffer/src/test/kotlin/org/openrs2/buffer/ByteBufExtensionsTest.kt

@ -421,12 +421,9 @@ object ByteBufExtensionsTest {
}
// Tests the nioBufferCount() == 1 case.
copiedBuffer(s).use { buf ->
ByteBufAllocator.DEFAULT.directBuffer().use { directBuf ->
directBuf.writeBytes(buf)
assertEquals(0x414FA339, directBuf.crc32(2, directBuf.writerIndex() - 3))
}
ByteBufAllocator.DEFAULT.directBuffer().use { directBuf ->
directBuf.writeCharSequence(s, Charsets.UTF_8)
assertEquals(0x414FA339, directBuf.crc32(2, directBuf.writerIndex() - 3))
}
// Tests the nioBufferCount() > 1 case.

Loading…
Cancel
Save