Ejemplo n.º 1
0
        private void PositiveAbsTest(long a, int testNumber)
        {
            long result   = CalcClass.ABS(a);
            long expected = Math.Abs(a);

            Log.CreateLog(logger, "CalcClass.Abs", testNumber, a.ToString(), expected.ToString(), result.ToString());
            Assert.AreEqual(result, expected);
        }
Ejemplo n.º 2
0
        private void NegativeAbsTest(long a, string exeption, int testNumber)
        {
            long   result = CalcClass.ABS(a);
            string exep   = CalcClass.lastError;

            if (result == 0 && exep.Contains(exeption))
            {
                Log.CreateLog(logger, component, testNumber, a.ToString(), "0 " + exeption, result.ToString() + " " + exep);
                Assert.AreEqual(result, 0);
            }
            else
            {
                Log.CreateBugReport(logger, component, testNumber, a.ToString(), "0 " + exeption, result.ToString() + " " + exep, "");
            }
        }