Allow test cases to indicate fatal errors.

This commit is contained in:
Daniel Kirchner
2019-05-07 18:12:21 +02:00
parent 0a99519142
commit 76b88bdfd8
19 changed files with 75 additions and 59 deletions
+11 -2
View File
@@ -106,8 +106,17 @@ int registerTests(
stringstream errorStream;
auto testCase = _testCaseCreator(config);
if (testCase->validateSettings(dev::test::Options::get().evmVersion()))
if (!testCase->run(errorStream))
BOOST_ERROR("Test expectation mismatch.\n" + errorStream.str());
switch (testCase->run(errorStream))
{
case TestCase::TestResult::Success:
break;
case TestCase::TestResult::Failure:
BOOST_ERROR("Test expectation mismatch.\n" + errorStream.str());
break;
case TestCase::TestResult::FatalError:
BOOST_ERROR("Fatal error during test.\n" + errorStream.str());
break;
}
}
catch (boost::exception const& _e)
{