aboutsummaryrefslogtreecommitdiffstats
path: root/test/liblll
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-09-26 19:52:29 +0800
committerchriseth <chris@ethereum.org>2018-11-13 20:47:29 +0800
commita4d2e17a045a5b9ca50b8340242ce40a6be73ec9 (patch)
tree45269d148411c062d2d5ae0e30ffecfb6d286bde /test/liblll
parentd2e65a3ac4b74bbc2666a6b5e59fcf18c7d357ac (diff)
downloaddexon-solidity-a4d2e17a045a5b9ca50b8340242ce40a6be73ec9.tar.gz
dexon-solidity-a4d2e17a045a5b9ca50b8340242ce40a6be73ec9.tar.zst
dexon-solidity-a4d2e17a045a5b9ca50b8340242ce40a6be73ec9.zip
LLL: add test which has a sub assembly without a forced STOP
Diffstat (limited to 'test/liblll')
-rw-r--r--test/liblll/EndToEndTest.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/liblll/EndToEndTest.cpp b/test/liblll/EndToEndTest.cpp
index ceaf450e..60aef7b0 100644
--- a/test/liblll/EndToEndTest.cpp
+++ b/test/liblll/EndToEndTest.cpp
@@ -986,6 +986,20 @@ BOOST_AUTO_TEST_CASE(shift_right)
BOOST_CHECK(callFallback() == encodeArgs(u256(256)));
}
+BOOST_AUTO_TEST_CASE(sub_assemblies)
+{
+ char const* sourceCode = R"(
+ (returnlll
+ (return (create 0 (returnlll (sstore 1 1)))))
+ )";
+ compileAndRun(sourceCode);
+ bytes ret = callFallback();
+ BOOST_REQUIRE(ret.size() == 32);
+ u256 rVal = u256(toHex(ret, 2, HexPrefix::Add));
+ BOOST_CHECK(rVal != 0);
+ BOOST_CHECK(rVal < u256("0x10000000000000000000000000000000000000000"));
+}
+
BOOST_AUTO_TEST_SUITE_END()
}