Disable exception catching in unit tests

This commit is contained in:
Vinnie Falco
2013-09-06 20:12:35 -07:00
parent 497c8aeabf
commit 2a362a99da

View File

@@ -78,6 +78,7 @@ ScopedPointer <UnitTest::Suite>& UnitTest::run (UnitTests* const runner)
initialise(); initialise();
#if 0
try try
{ {
runTest(); runTest();
@@ -86,6 +87,9 @@ ScopedPointer <UnitTest::Suite>& UnitTest::run (UnitTests* const runner)
{ {
failException (); failException ();
} }
#else
runTest ();
#endif
shutdown(); shutdown();
@@ -377,8 +381,10 @@ void UnitTests::logReport (StringArray const& report)
void UnitTests::runTest (UnitTest& test) void UnitTests::runTest (UnitTest& test)
{ {
#if 0
try try
{ {
#endif
ScopedPointer <UnitTest::Suite> suite (test.run (this).release ()); ScopedPointer <UnitTest::Suite> suite (test.run (this).release ());
m_results->cases += suite->cases.size (); m_results->cases += suite->cases.size ();
@@ -386,12 +392,14 @@ void UnitTests::runTest (UnitTest& test)
m_results->failures += suite->failures; m_results->failures += suite->failures;
m_results->suites.add (suite.release ()); m_results->suites.add (suite.release ());
#if 0
} }
catch (...) catch (...)
{ {
// Should never get here. // Should never get here.
Throw (std::runtime_error ("unhandled exception during unit tests")); Throw (std::runtime_error ("unhandled exception during unit tests"));
} }
#endif
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------