Exemplo n.º 1
0
        public void CouldUseIDiffableMethods()
        {
            var first = new LongDiffable {
                Value = 123
            };
            var second = new LongDiffable {
                Value = 456
            };

            var diff = 456 - 123;

            Assert.AreEqual(diff, Unsafe.DiffLongConstrained(ref first, ref second));
            Assert.AreEqual(second, Unsafe.AddLongConstrained(ref first, diff));
        }