Package com.esotericsoftware.kryo.io

Examples of com.esotericsoftware.kryo.io.Input.readFloat()


    assertEquals(read.readFloat(1000, false), 32767f);
    assertEquals(read.readFloat(1000, false), -64f);
    assertEquals(read.readFloat(1000, true), -64f);
    assertEquals(read.readFloat(1000, false), -65f);
    assertEquals(read.readFloat(1000, true), -65f);
    assertEquals(read.readFloat(1000, false), -8192f);
    assertEquals(read.readFloat(1000, true), -8192f);
  }

  public void testDoubles () throws IOException {
    runDoubleTest(new UnsafeOutput(4096));
View Full Code Here


    assertEquals(read.readFloat(1000, false), -64f);
    assertEquals(read.readFloat(1000, true), -64f);
    assertEquals(read.readFloat(1000, false), -65f);
    assertEquals(read.readFloat(1000, true), -65f);
    assertEquals(read.readFloat(1000, false), -8192f);
    assertEquals(read.readFloat(1000, true), -8192f);
  }

  public void testDoubles () throws IOException {
    runDoubleTest(new UnsafeOutput(4096));
    runDoubleTest(new UnsafeOutput(new ByteArrayOutputStream()));
View Full Code Here

    assertEquals(5, write.writeFloat(-65, 1000, true));
    assertEquals(4, write.writeFloat(-8192, 1000, false));
    assertEquals(5, write.writeFloat(-8192, 1000, true));

    Input read = new Input(write.toBytes());
    assertEquals(read.readFloat(), 0f);
    assertEquals(read.readFloat(), 63f);
    assertEquals(read.readFloat(), 64f);
    assertEquals(read.readFloat(), 127f);
    assertEquals(read.readFloat(), 128f);
    assertEquals(read.readFloat(), 8192f);
View Full Code Here

    assertEquals(4, write.writeFloat(-8192, 1000, false));
    assertEquals(5, write.writeFloat(-8192, 1000, true));

    Input read = new Input(write.toBytes());
    assertEquals(read.readFloat(), 0f);
    assertEquals(read.readFloat(), 63f);
    assertEquals(read.readFloat(), 64f);
    assertEquals(read.readFloat(), 127f);
    assertEquals(read.readFloat(), 128f);
    assertEquals(read.readFloat(), 8192f);
    assertEquals(read.readFloat(), 16384f);
View Full Code Here

    assertEquals(5, write.writeFloat(-8192, 1000, true));

    Input read = new Input(write.toBytes());
    assertEquals(read.readFloat(), 0f);
    assertEquals(read.readFloat(), 63f);
    assertEquals(read.readFloat(), 64f);
    assertEquals(read.readFloat(), 127f);
    assertEquals(read.readFloat(), 128f);
    assertEquals(read.readFloat(), 8192f);
    assertEquals(read.readFloat(), 16384f);
    assertEquals(read.readFloat(), 32767f);
View Full Code Here

    Input read = new Input(write.toBytes());
    assertEquals(read.readFloat(), 0f);
    assertEquals(read.readFloat(), 63f);
    assertEquals(read.readFloat(), 64f);
    assertEquals(read.readFloat(), 127f);
    assertEquals(read.readFloat(), 128f);
    assertEquals(read.readFloat(), 8192f);
    assertEquals(read.readFloat(), 16384f);
    assertEquals(read.readFloat(), 32767f);
    assertEquals(read.readFloat(), -63f);
View Full Code Here

    Input read = new Input(write.toBytes());
    assertEquals(read.readFloat(), 0f);
    assertEquals(read.readFloat(), 63f);
    assertEquals(read.readFloat(), 64f);
    assertEquals(read.readFloat(), 127f);
    assertEquals(read.readFloat(), 128f);
    assertEquals(read.readFloat(), 8192f);
    assertEquals(read.readFloat(), 16384f);
    assertEquals(read.readFloat(), 32767f);
    assertEquals(read.readFloat(), -63f);
    assertEquals(read.readFloat(), -64f);
View Full Code Here

    assertEquals(read.readFloat(), 0f);
    assertEquals(read.readFloat(), 63f);
    assertEquals(read.readFloat(), 64f);
    assertEquals(read.readFloat(), 127f);
    assertEquals(read.readFloat(), 128f);
    assertEquals(read.readFloat(), 8192f);
    assertEquals(read.readFloat(), 16384f);
    assertEquals(read.readFloat(), 32767f);
    assertEquals(read.readFloat(), -63f);
    assertEquals(read.readFloat(), -64f);
    assertEquals(read.readFloat(), -127f);
View Full Code Here

    assertEquals(read.readFloat(), 63f);
    assertEquals(read.readFloat(), 64f);
    assertEquals(read.readFloat(), 127f);
    assertEquals(read.readFloat(), 128f);
    assertEquals(read.readFloat(), 8192f);
    assertEquals(read.readFloat(), 16384f);
    assertEquals(read.readFloat(), 32767f);
    assertEquals(read.readFloat(), -63f);
    assertEquals(read.readFloat(), -64f);
    assertEquals(read.readFloat(), -127f);
    assertEquals(read.readFloat(), -128f);
View Full Code Here

    assertEquals(read.readFloat(), 64f);
    assertEquals(read.readFloat(), 127f);
    assertEquals(read.readFloat(), 128f);
    assertEquals(read.readFloat(), 8192f);
    assertEquals(read.readFloat(), 16384f);
    assertEquals(read.readFloat(), 32767f);
    assertEquals(read.readFloat(), -63f);
    assertEquals(read.readFloat(), -64f);
    assertEquals(read.readFloat(), -127f);
    assertEquals(read.readFloat(), -128f);
    assertEquals(read.readFloat(), -8192f);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.