Пример #1
0
        public void Or_Int64Value()
        {
            long target      = 0x0F0F0F0F00000000;
            long updateValue = 0x000000000F0F0F0F;
            long expected    = 0x0F0F0F0F0F0F0F0F;

            //Act
            var actual = Interlock.Or(ref target, updateValue);

            //Assert
            actual.Should().Be(expected);
        }
Пример #2
0
        public void Or_Int32Value()
        {
            int target      = 0x0F0F0F0F;
            int updateValue = 0x0FFF0000;
            int expected    = 0x0FFF0F0F;

            //Act
            var actual = Interlock.Or(ref target, updateValue);

            //Assert
            actual.Should().Be(expected);
        }