Exemple #1
0
        public void testwithnegativeN5()
        {
            double expected = -0.5;
            double actual   = Mypower.power(-2, -1);

            Assert.AreEqual(expected, actual);
        }
Exemple #2
0
        public void testwithpositiveN2()
        {
            double expected = 27;
            double actual   = Mypower.power(3, 3);

            Assert.AreEqual(expected, actual);
        }
Exemple #3
0
        public void testwithpositiveN3()
        {
            double expected = 4;
            double actual   = Mypower.power(-2, 2);

            Assert.AreEqual(expected, actual);
        }
Exemple #4
0
        public void testwithN0()
        {
            double expected = 1;
            double actual   = Mypower.power(5, 0);

            Assert.AreEqual(expected, actual);
        }