Example #1
0
        public void TestSub()
        {
            int result = Calculator.Sub(3, 2);

            Assert.AreEqual(1, result);

            result = Calculator.Sub(0, 2);
            Assert.AreEqual(-2, result);

            result = Calculator.Sub(12, -2);
            Assert.AreEqual(14, result);

            result = Calculator.Sub(-3, -2);
            Assert.AreEqual(-1, result);

            result = Calculator.Sub(0, 0);
            Assert.AreEqual(0, result);
        }