mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-17 17:45:52 +00:00
Disable exception catching in unit tests
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user