Junfeic / kryo

Automatically exported from code.google.com/p/kryo
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Varint is broken in UnsafeOutput in 2.22-SNAPSHOT #122

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

    @Test
    public void test() {
        final int value = 39117;
        final Output out = new UnsafeOutput(1024);
        out.writeVarInt(value, true);
        final Input in = new UnsafeInput(out.toBytes());
        final int actualValue = in.readVarInt(true);
        assertEquals(value, actualValue);
    }

java.lang.AssertionError: 
Expected :39117
Actual   :55501

Original issue reported on code.google.com by denis.af...@gmail.com on 5 Aug 2013 at 6:46

GoogleCodeExporter commented 9 years ago
And it works with "Output".

Original comment by denis.af...@gmail.com on 5 Aug 2013 at 6:48

GoogleCodeExporter commented 9 years ago
Fixed in  trunk.

Original comment by romixlev on 5 Aug 2013 at 10:59