aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ExecutionFramework.h11
-rw-r--r--test/liblll/EndToEndTest.cpp2
2 files changed, 12 insertions, 1 deletions
diff --git a/test/ExecutionFramework.h b/test/ExecutionFramework.h
index 6ec1a06b..6c5a5764 100644
--- a/test/ExecutionFramework.h
+++ b/test/ExecutionFramework.h
@@ -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)
{
diff --git a/test/liblll/EndToEndTest.cpp b/test/liblll/EndToEndTest.cpp
index 9025689e..b5e32e94 100644
--- a/test/liblll/EndToEndTest.cpp
+++ b/test/liblll/EndToEndTest.cpp
@@ -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()