Exemple #1
0
        public void TestAddNums()
        {
            //Ints
            Assert.AreEqual(SimpleMath.AddNums(2, 3), 5);
            Assert.AreEqual(SimpleMath.AddNums(0, 0), 0);
            Assert.AreEqual(SimpleMath.AddNums(0, -1), -1);
            Assert.AreEqual(SimpleMath.AddNums(-1, -1), -2);

            //Doubles
            Assert.AreEqual(SimpleMath.AddNums(.5, .2), .7, .0001);
        }