public void CavemanPackerPacksShort() { ushort packable = 0xabcd; var serialisedData = new byte[] { 0xab, 0xcd }; Assert.Equal(serialisedData, CavemanPacker.Pack(packable).ToArray()); }
public void CavemanPackerPacksInt() { uint packable = 0xabcd1234; var serialisedData = new byte[] { 0xab, 0xcd, 0x12, 0x34 }; Assert.Equal(serialisedData, CavemanPacker.Pack(packable).ToArray()); }
public void CavemanPackerPacksByte() { byte packable = 0xab; var serialisedData = new byte[] { 0xab }; Assert.Equal(serialisedData, CavemanPacker.Pack(packable).ToArray()); }