now for SolidityEndToEndTest we can use compileRequireThrow<typename>

This commit is contained in:
Liana Husikyan 2015-06-17 12:06:29 +02:00
parent dd1e770009
commit 3f1042d23b
2 changed files with 4 additions and 3 deletions

View File

@ -4668,7 +4668,7 @@ BOOST_AUTO_TEST_CASE(dev_title_at_function_error)
" function mul(uint a, uint second) returns(uint d) { return a * 7 + second; }\n"
"}\n";
compileRequireThrow(sourceCode);
compileRequireThrow<DocstringParsingError>(sourceCode);
}
BOOST_AUTO_TEST_CASE(dev_documenting_nonexistant_param)
@ -4680,7 +4680,7 @@ BOOST_AUTO_TEST_CASE(dev_documenting_nonexistant_param)
" function mul(uint a, uint second) returns(uint d) { return a * 7 + second; }\n"
"}\n";
compileRequireThrow(sourceCode);
compileRequireThrow<DocstringParsingError>(sourceCode);
}

View File

@ -58,11 +58,12 @@ public:
return m_output;
}
template <class Exceptiontype>
void compileRequireThrow(std::string const& _sourceCode)
{
m_compiler.reset(false, m_addStandardSources);
m_compiler.addSource("", _sourceCode);
BOOST_REQUIRE_THROW(m_compiler.compile(m_optimize, m_optimizeRuns), DocstringParsingError);
BOOST_REQUIRE_THROW(m_compiler.compile(m_optimize, m_optimizeRuns), Exceptiontype);
}
bytes const& compileAndRun(