diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-14 02:10:26 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-01 03:47:14 +0800 |
commit | d4fecc7b11586a108578a1834b634981bc854f91 (patch) | |
tree | 579974aa17010ee8a3d5151cccff7e54c3e15f41 /test/libsolidity/InlineAssembly.cpp | |
parent | 95f790295564997705f455e3ed18b6c51546a847 (diff) | |
download | dexon-solidity-d4fecc7b11586a108578a1834b634981bc854f91.tar.gz dexon-solidity-d4fecc7b11586a108578a1834b634981bc854f91.tar.zst dexon-solidity-d4fecc7b11586a108578a1834b634981bc854f91.zip |
Warn on JUMP/JUMPI in inline assembly
Diffstat (limited to 'test/libsolidity/InlineAssembly.cpp')
-rw-r--r-- | test/libsolidity/InlineAssembly.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp index 7b760a1d..345ccfde 100644 --- a/test/libsolidity/InlineAssembly.cpp +++ b/test/libsolidity/InlineAssembly.cpp @@ -630,6 +630,14 @@ BOOST_AUTO_TEST_CASE(create2) BOOST_CHECK(successAssemble("{ pop(create2(10, 0x123, 32, 64)) }")); } +BOOST_AUTO_TEST_CASE(jump_warning) +{ + CHECK_PARSE_ERROR("{ 1 jump }", Warning, "Jump instructions"); + CHECK_PARSE_ERROR("{ 1 2 jumpi }", Warning, "Jump instructions"); + CHECK_PARSE_ERROR("{ a: jump(a) }", Warning, "Jump instructions"); + CHECK_PARSE_ERROR("{ a: jumpi(a, 2) }", Warning, "Jump instructions"); +} + BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END() |