Пример #1
0
        public void Should_do_logical_xor_for_masks_with_the_same_size_and_offset()
        {
            var m1 = new BranchMask()
            {
                Data = "01111", Offset = 2
            };
            var m2 = new BranchMask()
            {
                Data = "11001", Offset = 2
            };

            var result = BranchMask.Xor(m1, m2);

            Assert.Equal("001011", result.Data);
            Assert.Equal(0, result.Offset);
        }
Пример #2
0
        public void Should_do_logical_xor_for_masks_with_different_sizes_and_offsets()
        {
            var m1 = new BranchMask()
            {
                Data = "00111", Offset = 6
            };
            var m2 = new BranchMask()
            {
                Data = "001010", Offset = 5
            };

            var result = BranchMask.Xor(m1, m2);

            Assert.Equal("00000101101", result.Data);
            Assert.Equal(0, result.Offset);
        }