aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/InlineAssembly.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-06-13 23:41:52 +0800
committerGitHub <noreply@github.com>2017-06-13 23:41:52 +0800
commit6b052249dac2bce9d3a87f21cbde3a6429428fc0 (patch)
treed114e3c9fddb70aee8bfe7855bcb56d7b41b3c36 /test/libsolidity/InlineAssembly.cpp
parent40f5690f68961130073028526f8b923ed0793c8a (diff)
parent8775e77305f84117827f1e6165c4d3776c51f667 (diff)
downloaddexon-solidity-6b052249dac2bce9d3a87f21cbde3a6429428fc0.tar
dexon-solidity-6b052249dac2bce9d3a87f21cbde3a6429428fc0.tar.gz
dexon-solidity-6b052249dac2bce9d3a87f21cbde3a6429428fc0.tar.bz2
dexon-solidity-6b052249dac2bce9d3a87f21cbde3a6429428fc0.tar.lz
dexon-solidity-6b052249dac2bce9d3a87f21cbde3a6429428fc0.tar.xz
dexon-solidity-6b052249dac2bce9d3a87f21cbde3a6429428fc0.tar.zst
dexon-solidity-6b052249dac2bce9d3a87f21cbde3a6429428fc0.zip
Merge pull request #2275 from ethereum/returndata_lll
Add RETURNDATACOPY and RETURNDATASIZE to assembly (and LLL)
Diffstat (limited to 'test/libsolidity/InlineAssembly.cpp')
-rw-r--r--test/libsolidity/InlineAssembly.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp
index d2d320db..435c3dad 100644
--- a/test/libsolidity/InlineAssembly.cpp
+++ b/test/libsolidity/InlineAssembly.cpp
@@ -542,6 +542,26 @@ BOOST_AUTO_TEST_CASE(keccak256)
BOOST_CHECK(successAssemble("{ pop(sha3(0, 0)) }"));
}
+BOOST_AUTO_TEST_CASE(returndatasize)
+{
+ BOOST_CHECK(successAssemble("{ let r := returndatasize }"));
+}
+
+BOOST_AUTO_TEST_CASE(returndatasize_functional)
+{
+ BOOST_CHECK(successAssemble("{ let r := returndatasize() }"));
+}
+
+BOOST_AUTO_TEST_CASE(returndatacopy)
+{
+ BOOST_CHECK(successAssemble("{ 64 32 0 returndatacopy }"));
+}
+
+BOOST_AUTO_TEST_CASE(returndatacopy_functional)
+{
+ BOOST_CHECK(successAssemble("{ returndatacopy(0, 32, 64) }"));
+}
+
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE_END()