13
0
geforkt von Mirrors/Velocity

Make sure to check not only the entire array but also how much was written

Dieser Commit ist enthalten in:
Andrew Steinborn 2021-05-04 16:32:37 -04:00
Ursprung 3dc8e25ec7
Commit 7c76ae9a27

Datei anzeigen

@ -83,7 +83,7 @@ public class ProtocolUtilsTest {
writeVarIntOld(varintOld, i);
ProtocolUtils.writeVarInt(varintNew, i);
assertArrayEquals(varintOld.array(), varintNew.array(),
assertArrayEquals(ByteBufUtil.getBytes(varintOld), ByteBufUtil.getBytes(varintNew),
"Encoding of " + i + " was invalid");
assertEquals(i, oldReadVarIntSafely(varintNew));