Example #1
0
        public void Xor()
        {
            int a = 5;
            int b = 7;

            SqlInt32 x = new SqlInt32(a);
            SqlInt32 y = new SqlInt32(b);
            SqlInt32 z = x ^ y;

            Assert.Equal(z.Value, a ^ b);
            z = SqlInt32.Xor(x, y);
            Assert.Equal(z.Value, a ^ b);
        }
Example #2
0
        public void Xor()
        {
            int a = 5;
            int b = 7;

            SqlInt32 x = new SqlInt32(a);
            SqlInt32 y = new SqlInt32(b);
            SqlInt32 z = x ^ y;

            Assert.AreEqual(z.Value, a ^ b, "Xor operator does not work correctly");
            z = SqlInt32.Xor(x, y);
            Assert.AreEqual(z.Value, a ^ b, "Xor function does not work correctly");
        }