mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add callFallback to ExectionFramework
This commit is contained in:
parent
85ebe4e5c4
commit
94cae63390
@ -73,6 +73,17 @@ public:
|
||||
return m_output;
|
||||
}
|
||||
|
||||
bytes const& callFallbackWithValue(u256 const& _value)
|
||||
{
|
||||
sendMessage(bytes(), false, _value);
|
||||
return m_output;
|
||||
}
|
||||
|
||||
bytes const & callFallback()
|
||||
{
|
||||
return callFallbackWithValue(0);
|
||||
}
|
||||
|
||||
template <class... Args>
|
||||
bytes const& callContractFunctionWithValue(std::string _sig, u256 const& _value, Args const&... _arguments)
|
||||
{
|
||||
|
@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE(smoke_test)
|
||||
{
|
||||
char const* sourceCode = "(returnlll { (return \"test\") })";
|
||||
compileAndRun(sourceCode);
|
||||
BOOST_CHECK(callContractFunction("") == encodeArgs(string("test", 4)));
|
||||
BOOST_CHECK(callFallback() == encodeArgs(string("test", 4)));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
Loading…
Reference in New Issue
Block a user