public void Xor_Int64Value() { long target = 0x0F0F0F0F00000000; long updateValue = 0x0FFFFFFF0F0F0F0F; long expected = 0x00F0F0F00F0F0F0F; //Act var actual = Interlock.Xor(ref target, updateValue); //Assert actual.Should().Be(expected); }
public void Xor_Int32Value() { int target = 0x0F0F0F0F; int updateValue = 0x0F00000F; int expected = 0x000F0F00; //Act var actual = Interlock.Xor(ref target, updateValue); //Assert actual.Should().Be(expected); }