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

Method TestWrite

src/ByteBuffer.cpp:72–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 }
71
72 void TestWrite(void)
73 {
74 cByteBuffer buf(50);
75 buf.WriteVarInt(5);
76 buf.WriteVarInt(300);
77 buf.WriteVarInt(0);
78 AString All;
79 buf.ReadAll(All);
80 assert_test(All.size() == 4);
81 assert_test(memcmp(All.data(), "\x05\xac\x02\x00", All.size()) == 0);
82 }
83
84 void TestWrap(void)
85 {

Callers

nothing calls this directly

Calls 3

ReadAllMethod · 0.80
sizeMethod · 0.80
WriteVarIntMethod · 0.45

Tested by

no test coverage detected