Exemple #1
0
        public void AddWithoutPlusXorAndZero()
        {
            int a = 0;
            int b = 0;

            Assert.AreEqual(AddWithoutArithmeticOperators.AddWithoutPlusXorAnd(a, b), a + b);
        }
Exemple #2
0
        public void AddWithoutPlusXorAndBothNegative()
        {
            int a = -56;
            int b = -15;

            Assert.AreEqual(AddWithoutArithmeticOperators.AddWithoutPlusXorAnd(a, b), a + b);
        }
Exemple #3
0
        public void AddWithoutPlusXorAndPosNeg()
        {
            int a = 67;
            int b = -35;

            Assert.AreEqual(AddWithoutArithmeticOperators.AddWithoutPlusXorAnd(a, b), a + b);
        }
Exemple #4
0
        public void AddWithoutPlusXorAndBothPos()
        {
            int a = 3;
            int b = 5;

            Assert.AreEqual(AddWithoutArithmeticOperators.AddWithoutPlusXorAnd(a, b), a + b);
        }