Пример #1
0
        public void ByteAdditionTest4()
        {
            char[] data   = { 'Z', 'X', ' ', 'S', 'p', 'e', 'c', 't', 'r', 'u', 'm' };
            int    offset = 1;
            int    len    = data.Length;

            Checksum.ByteAddition(data, offset, len);
        }
Пример #2
0
        public void ByteAdditionTest1()
        {
            string data     = "ZX Spectrum";
            int    expected = 0xDB;
            int    actual;

            actual = Checksum.ByteAddition(data);
            Assert.AreEqual(expected, actual);
        }
Пример #3
0
        public void ByteAdditionTest3()
        {
            char[] data     = { 'Z', 'X', ' ', 'S', 'p', 'e', 'c', 't', 'r', 'u', 'm' };
            int    offset   = 1;
            int    len      = 0;
            int    expected = 0;
            int    actual;

            actual = Checksum.ByteAddition(data, offset, len);
            Assert.AreEqual(expected, actual);
        }