From 7a4f29727d8ea2b975b4a09c4ce8aec4b15aec5d Mon Sep 17 00:00:00 2001 From: emopers Date: Mon, 7 Mar 2016 13:22:37 -0600 Subject: [PATCH] Fixing usage of EndianSwitchableOutputStream --- .../com/flowpowered/nbt/stream/EndianSwitchableStreamTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/com/flowpowered/nbt/stream/EndianSwitchableStreamTest.java b/src/test/java/com/flowpowered/nbt/stream/EndianSwitchableStreamTest.java index a2a7e12..0befff7 100644 --- a/src/test/java/com/flowpowered/nbt/stream/EndianSwitchableStreamTest.java +++ b/src/test/java/com/flowpowered/nbt/stream/EndianSwitchableStreamTest.java @@ -44,6 +44,7 @@ public void testWriteLEUnsignedShort() throws IOException { EndianSwitchableOutputStream output = new EndianSwitchableOutputStream(rawOutput, ByteOrder.LITTLE_ENDIAN); output.writeShort(unsigned); output.writeChar(testChar); + output.flush(); EndianSwitchableInputStream input = new EndianSwitchableInputStream(new ByteArrayInputStream(rawOutput.toByteArray()), ByteOrder.LITTLE_ENDIAN); assertEquals(unsigned, input.readUnsignedShort());