diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/cmdlineTests.sh | 12 | ||||
-rw-r--r-- | test/libsolidity/SyntaxTest.cpp | 13 | ||||
-rw-r--r-- | test/tools/isoltest.cpp | 27 |
3 files changed, 15 insertions, 37 deletions
diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index 74b6a5a7..e8ff69de 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -37,10 +37,6 @@ FULLARGS="--optimize --ignore-missing --combined-json abi,asm,ast,bin,bin-runtim echo "Checking that the bug list is up to date..." "$REPO_ROOT"/scripts/update_bugs_by_version.py -echo "Checking that StandardToken.sol, owned.sol and mortal.sol produce bytecode..." -output=$("$REPO_ROOT"/build/solc/solc --bin "$REPO_ROOT"/std/*.sol 2>/dev/null | grep "ffff" | wc -l) -test "${output//[[:blank:]]/}" = "3" - function printTask() { echo "$(tput bold)$(tput setaf 2)$1$(tput sgr0)"; } function printError() { echo "$(tput setaf 1)$1$(tput sgr0)"; } @@ -113,14 +109,6 @@ do done ) -printTask "Compiling all files in std and examples..." - -for f in "$REPO_ROOT"/std/*.sol -do - echo "$f" - compileWithoutWarning "$f" -done - printTask "Compiling all examples from the documentation..." TMPDIR=$(mktemp -d) ( diff --git a/test/libsolidity/SyntaxTest.cpp b/test/libsolidity/SyntaxTest.cpp index 1c2355d5..430073a0 100644 --- a/test/libsolidity/SyntaxTest.cpp +++ b/test/libsolidity/SyntaxTest.cpp @@ -268,9 +268,16 @@ int SyntaxTest::registerTests( [fullpath] { BOOST_REQUIRE_NO_THROW({ - stringstream errorStream; - if (!SyntaxTest(fullpath.string()).run(errorStream)) - BOOST_ERROR("Test expectation mismatch.\n" + errorStream.str()); + try + { + stringstream errorStream; + if (!SyntaxTest(fullpath.string()).run(errorStream)) + BOOST_ERROR("Test expectation mismatch.\n" + errorStream.str()); + } + catch (boost::exception const& _e) + { + BOOST_ERROR("Exception during syntax test: " << boost::diagnostic_information(_e)); + } }); }, _path.stem().string(), diff --git a/test/tools/isoltest.cpp b/test/tools/isoltest.cpp index 100fcbf0..d4b99e9d 100644 --- a/test/tools/isoltest.cpp +++ b/test/tools/isoltest.cpp @@ -150,39 +150,22 @@ SyntaxTestTool::Result SyntaxTestTool::process() m_test = unique_ptr<SyntaxTest>(new SyntaxTest(m_path.string())); success = m_test->run(outputMessages, " ", m_formatted); } - catch(CompilerError const& _e) + catch(boost::exception const& _e) { FormattedScope(cout, m_formatted, {BOLD, RED}) << - "Exception: " << SyntaxTest::errorMessage(_e) << endl; - return Result::Exception; - } - catch(InternalCompilerError const& _e) - { - FormattedScope(cout, m_formatted, {BOLD, RED}) << - "InternalCompilerError: " << SyntaxTest::errorMessage(_e) << endl; - return Result::Exception; - } - catch(FatalError const& _e) - { - FormattedScope(cout, m_formatted, {BOLD, RED}) << - "FatalError: " << SyntaxTest::errorMessage(_e) << endl; - return Result::Exception; - } - catch(UnimplementedFeatureError const& _e) - { - FormattedScope(cout, m_formatted, {BOLD, RED}) << - "UnimplementedFeatureError: " << SyntaxTest::errorMessage(_e) << endl; + "Exception during syntax test: " << boost::diagnostic_information(_e) << endl; return Result::Exception; } catch (std::exception const& _e) { - FormattedScope(cout, m_formatted, {BOLD, RED}) << "Exception: " << _e.what() << endl; + FormattedScope(cout, m_formatted, {BOLD, RED}) << + "Exception during syntax test: " << _e.what() << endl; return Result::Exception; } catch(...) { FormattedScope(cout, m_formatted, {BOLD, RED}) << - "Unknown Exception" << endl; + "Unknown exception during syntax test." << endl; return Result::Exception; } |