diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-14 19:20:19 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-14 21:08:28 +0800 |
commit | 600e3ad240042a9673e4227e51cb96c4ec28d90a (patch) | |
tree | aeb6ec290bff41b6e04966b4bf9609c630139bf1 /test/liblll | |
parent | 0b99c81f8536aa7888f26ac349ab233825350efc (diff) | |
download | dexon-solidity-600e3ad240042a9673e4227e51cb96c4ec28d90a.tar dexon-solidity-600e3ad240042a9673e4227e51cb96c4ec28d90a.tar.gz dexon-solidity-600e3ad240042a9673e4227e51cb96c4ec28d90a.tar.bz2 dexon-solidity-600e3ad240042a9673e4227e51cb96c4ec28d90a.tar.lz dexon-solidity-600e3ad240042a9673e4227e51cb96c4ec28d90a.tar.xz dexon-solidity-600e3ad240042a9673e4227e51cb96c4ec28d90a.tar.zst dexon-solidity-600e3ad240042a9673e4227e51cb96c4ec28d90a.zip |
Support shl/shr in LLL
Diffstat (limited to 'test/liblll')
-rw-r--r-- | test/liblll/EndToEndTest.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/liblll/EndToEndTest.cpp b/test/liblll/EndToEndTest.cpp index 7f1924c2..9021fa43 100644 --- a/test/liblll/EndToEndTest.cpp +++ b/test/liblll/EndToEndTest.cpp @@ -328,6 +328,26 @@ BOOST_AUTO_TEST_CASE(sha3_one_arg) fromHex("b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6"))); } +BOOST_AUTO_TEST_CASE(shift_left) +{ + char const* sourceCode = R"( + (returnlll + (return (shl 1 8))) + )"; + compileAndRun(sourceCode); + BOOST_CHECK(callFallback() == encodeArgs(u256(256))); +} + +BOOST_AUTO_TEST_CASE(shift_right) +{ + char const* sourceCode = R"( + (returnlll + (return (shr 65536 8))) + )"; + compileAndRun(sourceCode); + BOOST_CHECK(callFallback() == encodeArgs(u256(256))); +} + BOOST_AUTO_TEST_SUITE_END() } |