Esempio n. 1
0
        public void MyPowTest_XLargerThanZero_NLargerThanZero()
        {
            var solution = new _050_Pow();
            var result = solution.MyPow(5, 1);
            Assert.AreEqual(5, result);

            result = solution.MyPow(2, 5);
            Assert.AreEqual(32, result);
        }
Esempio n. 2
0
        public void MyPowTest_XLargerThanZero_NLessThanZero()
        {
            var solution = new _050_Pow();
            var result = solution.MyPow(5, -1);
            Assert.AreEqual(0.2, result);

            result = solution.MyPow(2, -5);
            Assert.AreEqual(0.03125, result);
        }
Esempio n. 3
0
        public void MyPowTest_XEqualZero_NLessThanZero()
        {
            var solution = new _050_Pow();
            var result = solution.MyPow(0, -1);
            Assert.AreEqual(0, result);

            result = solution.MyPow(0, -5);
            Assert.AreEqual(0, result);
        }
Esempio n. 4
0
        public void MyPowTest_XLargerThanZero_NLessThanZero()
        {
            var solution = new _050_Pow();
            var result   = solution.MyPow(5, -1);

            Assert.AreEqual(0.2, result);

            result = solution.MyPow(2, -5);
            Assert.AreEqual(0.03125, result);
        }
Esempio n. 5
0
        public void MyPowTest_XLargerThanZero_NLargerThanZero()
        {
            var solution = new _050_Pow();
            var result   = solution.MyPow(5, 1);

            Assert.AreEqual(5, result);

            result = solution.MyPow(2, 5);
            Assert.AreEqual(32, result);
        }
Esempio n. 6
0
        public void MyPowTest_XEqualZero_NLessThanZero()
        {
            var solution = new _050_Pow();
            var result   = solution.MyPow(0, -1);

            Assert.AreEqual(0, result);

            result = solution.MyPow(0, -5);
            Assert.AreEqual(0, result);
        }
Esempio n. 7
0
        public void MyPowTest_XLessThanZero_NLargerThanZero()
        {
            var solution = new _050_Pow();
            var result = solution.MyPow(-5, 1);
            Assert.AreEqual(-5, result);

            result = solution.MyPow(-2, 5);
            Assert.AreEqual(-32, result);

            result = solution.MyPow(-2, 6);
            Assert.AreEqual(64, result);
        }
Esempio n. 8
0
        public void MyPowTest_XLessThanZero_NLargerThanZero()
        {
            var solution = new _050_Pow();
            var result   = solution.MyPow(-5, 1);

            Assert.AreEqual(-5, result);

            result = solution.MyPow(-2, 5);
            Assert.AreEqual(-32, result);

            result = solution.MyPow(-2, 6);
            Assert.AreEqual(64, result);
        }
Esempio n. 9
0
        public void MyPowTest_XEqualZero_NEqualZero()
        {
            var solution = new _050_Pow();
            var result   = solution.MyPow(0, 0);

            Assert.AreEqual(0, result);
        }
Esempio n. 10
0
        public void MyPowTest_XLessThanZero_NEqualZero()
        {
            var solution = new _050_Pow();
            var result   = solution.MyPow(-5, 0);

            Assert.AreEqual(1, result);
        }
Esempio n. 11
0
        public void MyPowTest_LargeN()
        {
            var solution = new _050_Pow();
            var result   = solution.MyPow(2.0, -2147483648);

            Assert.AreEqual(0, result);
        }
Esempio n. 12
0
 public void MyPowTest_XLessThanZero_NEqualZero()
 {
     var solution = new _050_Pow();
     var result = solution.MyPow(-5, 0);
     Assert.AreEqual(1, result);
 }
Esempio n. 13
0
 public void MyPowTest_XEqualZero_NEqualZero()
 {
     var solution = new _050_Pow();
     var result = solution.MyPow(0, 0);
     Assert.AreEqual(0, result);
 }