예제 #1
0
        public static void TestImmediately()
        {
            ClearDebugLog();
            UUnitTestSuite suite = new UUnitTestSuite();

            suite.FindAndAddAllTestCases(typeof(UUnitTestCase));
            suite.RunAllTests();
            UUnitTestResult result = suite.GetResults();

            if (!result.AllTestsPassed())
            {
                Debug.LogWarning(result.Summary());
                throw new Exception("Not all tests passed.");
            }
            else
            {
                Debug.Log(result.Summary());
            }
        }
예제 #2
0
 /// <summary>
 /// Return that tests were run, and all of them reported success
 /// </summary>
 public bool AllTestsPassed()
 {
     return(testResult.AllTestsPassed());
 }