Exemple #1
0
 static public bool Equals(bool equal, string message)
 {
     try
     {
         //Equals is identical to Compare, except that Equals doesn't throw.
         //This way if We still want to throw the exception so we get the logging and comapre block
         //but the test wants to continue to do other things.
         return(CError.Compare(equal, message));
     }
     catch (Exception e)
     {
         CTestBase.HandleException(e);
         return(false);
     }
 }
Exemple #2
0
        static public bool Warning(object actual, object expected, string message, Exception inner)
        {
            //See if these are equal
            bool equal = InternalEquals(actual, expected);

            if (equal)
            {
                return(true);
            }

            try
            {
                //Throw a warning exception
                throw new CTestException(CTestBase.TEST_WARNING, message, actual, expected, inner);
            }
            catch (Exception e)
            {
                //Warning should continue - not halt test progress
                CTestBase.HandleException(e);
                return(false);
            }
        }