aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-06-17 18:06:29 +0800
committerLiana Husikyan <liana@ethdev.com>2015-07-16 19:57:56 +0800
commit3f1042d23bc9bb359b43ef23b924dd2376e28045 (patch)
treeefe690b94342c35dbace35b6fe59d31ccdc01884 /libsolidity
parentdd1e770009ad9ff0111e4588232aa1ab499ad4e8 (diff)
downloaddexon-solidity-3f1042d23bc9bb359b43ef23b924dd2376e28045.tar.gz
dexon-solidity-3f1042d23bc9bb359b43ef23b924dd2376e28045.tar.zst
dexon-solidity-3f1042d23bc9bb359b43ef23b924dd2376e28045.zip
now for SolidityEndToEndTest we can use compileRequireThrow<typename>
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/SolidityEndToEndTest.cpp4
-rw-r--r--libsolidity/solidityExecutionFramework.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/libsolidity/SolidityEndToEndTest.cpp b/libsolidity/SolidityEndToEndTest.cpp
index 70de7be5..d4454514 100644
--- a/libsolidity/SolidityEndToEndTest.cpp
+++ b/libsolidity/SolidityEndToEndTest.cpp
@@ -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);
}
diff --git a/libsolidity/solidityExecutionFramework.h b/libsolidity/solidityExecutionFramework.h
index c09d80a6..f4dbbcb9 100644
--- a/libsolidity/solidityExecutionFramework.h
+++ b/libsolidity/solidityExecutionFramework.h
@@ -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(