MCPcopy Create free account
hub / github.com/cuberite/cuberite / TestRead

Method TestRead

src/ByteBuffer.cpp:60–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 }
59
60 void TestRead(void)
61 {
62 cByteBuffer buf(50);
63 buf.Write("\x05\xac\x02\x00", 4);
64 UInt32 v1;
65 assert_test(buf.ReadVarInt(v1) && (v1 == 5));
66 UInt32 v2;
67 assert_test(buf.ReadVarInt(v2) && (v2 == 300));
68 UInt32 v3;
69 assert_test(buf.ReadVarInt(v3) && (v3 == 0));
70 }
71
72 void TestWrite(void)
73 {

Callers

nothing calls this directly

Calls 2

WriteMethod · 0.45
ReadVarIntMethod · 0.45

Tested by

no test coverage detected