Merge pull request #8884 from mijovic/isolTestEnforceCompileViaYul

isoltest: WhiskersError and YulException treated differently when enforcing viaYul
This commit is contained in:
chriseth
2020-05-11 11:05:06 +02:00
committed by GitHub
+13
View File
@@ -13,6 +13,8 @@
*/
#include <test/libsolidity/SemanticTest.h>
#include <libsolutil/Whiskers.h>
#include <libyul/Exceptions.h>
#include <test/Common.h>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/predicate.hpp>
@@ -27,6 +29,7 @@
using namespace std;
using namespace solidity;
using namespace solidity::yul;
using namespace solidity::util;
using namespace solidity::util::formatting;
using namespace solidity::frontend::test;
@@ -201,6 +204,16 @@ TestCase::TestResult SemanticTest::run(ostream& _stream, string const& _linePref
return TestResult::Failure;
}
}
catch (WhiskersError const&)
{
// this is an error in Whiskers template, so should be thrown anyway
throw;
}
catch (YulException const&)
{
// this should be an error in yul compilation or translation
throw;
}
catch (boost::exception const&)
{
if (compileViaYul && !m_runWithYul)