void UnitTestRunner::runTests (const Array<UnitTest*>& tests, int64 randomSeed) { results.clear(); resultsUpdated(); if (randomSeed == 0) randomSeed = Random().nextInt (0x7ffffff); randomForTest = Random (randomSeed); logMessage ("Random seed: 0x" + String::toHexString (randomSeed)); for (int i = 0; i < tests.size(); ++i) { if (shouldAbortTests()) break; #if JUCE_EXCEPTIONS_DISABLED tests.getUnchecked(i)->performTest (this); #else try { tests.getUnchecked(i)->performTest (this); } catch (...) { addFail ("An unhandled exception was thrown!"); } #endif } endTest(); }
void UnitTests::runTests (TestList const& tests) { m_results = new Results; for (int i = 0; i < tests.size (); ++i) { if (shouldAbortTests()) break; runTest (*tests [i]); } m_results->secondsElapsed = RelativeTime ( Time::getCurrentTime () - m_results->whenStarted).inSeconds (); }
void UnitTests::runTests (TestList const& tests, int64 randomSeed) { if (randomSeed == 0) randomSeed = Random().nextInt (0x7fffffff); m_random = Random (randomSeed); m_results = new Results; for (int i = 0; i < tests.size (); ++i) { if (shouldAbortTests()) break; runTest (*tests [i]); } m_results->secondsElapsed = RelativeTime ( Time::getCurrentTime () - m_results->whenStarted).inSeconds (); }
void UnitTestRunner::runTests (const Array<UnitTest*>& tests) { results.clear(); resultsUpdated(); for (int i = 0; i < tests.size(); ++i) { if (shouldAbortTests()) break; try { tests.getUnchecked(i)->performTest (this); } catch (...) { addFail ("An unhandled exception was thrown!"); } } endTest(); }