@Test
public void testReadFloat()
{
byte[] barr = FloatSerializer.INSTANCE.serialize(0.0f);
assertEquals(0.0f, FloatSerializer.INSTANCE.readFloat(new ByteArrayInputStream(barr)).floatValue(), 0.00001f);
assertEquals(0.0f, FloatSerializer.INSTANCE.readFloat(new ByteArrayRandomAccess(barr)).floatValue(), 0.00001f);
barr = FloatSerializer.INSTANCE.serialize(1.0f);
assertEquals(1.0f, FloatSerializer.INSTANCE.readFloat(new ByteArrayInputStream(barr)).floatValue(), 0.00001f);
assertEquals(1.0f, FloatSerializer.INSTANCE.readFloat(new ByteArrayRandomAccess(barr)).floatValue(), 0.00001f);
barr = FloatSerializer.INSTANCE.serialize(-1.2034f);
assertEquals(-1.2034f, FloatSerializer.INSTANCE.readFloat(new ByteArrayInputStream(barr)).floatValue(), 0.00001f);
assertEquals(-1.2034f, FloatSerializer.INSTANCE.readFloat(new ByteArrayRandomAccess(barr)).floatValue(), 0.00001f);
barr = FloatSerializer.INSTANCE.serialize(Float.MAX_VALUE);
assertEquals(Float.MAX_VALUE, FloatSerializer.INSTANCE.readFloat(new ByteArrayInputStream(barr)).floatValue(), 0.00001f);
assertEquals(Float.MAX_VALUE, FloatSerializer.INSTANCE.readFloat(new ByteArrayRandomAccess(barr)).floatValue(), 0.00001f);
barr = FloatSerializer.INSTANCE.serialize(Float.MIN_VALUE);
assertEquals(Float.MIN_VALUE, FloatSerializer.INSTANCE.readFloat(new ByteArrayInputStream(barr)).floatValue(), 0.00001f);
assertEquals(Float.MIN_VALUE, FloatSerializer.INSTANCE.readFloat(new ByteArrayRandomAccess(barr)).floatValue(), 0.00001f);
}