Esempio n. 1
0
        public void CavemanPackerPacksShort()
        {
            ushort packable       = 0xabcd;
            var    serialisedData = new byte[] { 0xab, 0xcd };

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

            Assert.Equal(serialisedData, CavemanPacker.Pack(packable).ToArray());
        }
Esempio n. 3
0
        public void CavemanPackerPacksByte()
        {
            byte packable       = 0xab;
            var  serialisedData = new byte[] { 0xab };

            Assert.Equal(serialisedData, CavemanPacker.Pack(packable).ToArray());
        }