diff options
author | chriseth <c@ethdev.com> | 2017-02-20 19:32:31 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-02-20 19:33:22 +0800 |
commit | 5cd01ab7d1efc108c3dc711ca76b4f75be4ac5c6 (patch) | |
tree | 9b391c5c65ca0ee95f52f2d7881d5434ebf6e491 /test | |
parent | 419ab9260ed817088f7e3b58a2ff01c47a3f7b9c (diff) | |
download | dexon-solidity-5cd01ab7d1efc108c3dc711ca76b4f75be4ac5c6.tar dexon-solidity-5cd01ab7d1efc108c3dc711ca76b4f75be4ac5c6.tar.gz dexon-solidity-5cd01ab7d1efc108c3dc711ca76b4f75be4ac5c6.tar.bz2 dexon-solidity-5cd01ab7d1efc108c3dc711ca76b4f75be4ac5c6.tar.lz dexon-solidity-5cd01ab7d1efc108c3dc711ca76b4f75be4ac5c6.tar.xz dexon-solidity-5cd01ab7d1efc108c3dc711ca76b4f75be4ac5c6.tar.zst dexon-solidity-5cd01ab7d1efc108c3dc711ca76b4f75be4ac5c6.zip |
Test for unbalanced stack due to loading two values from outside.
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 507d9057..a1ebc300 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -4852,6 +4852,19 @@ BOOST_AUTO_TEST_CASE(inline_assembly_unbalanced_negative_stack) CHECK_WARNING(text, "Inline assembly block is not balanced"); } +BOOST_AUTO_TEST_CASE(inline_assembly_unbalanced_two_stack_load) +{ + char const* text = R"( + contract c { + uint8 x; + function f() { + assembly { x pop } + } + } + )"; + CHECK_WARNING(text, "Inline assembly block is not balanced"); +} + BOOST_AUTO_TEST_CASE(inline_assembly_in_modifier) { char const* text = R"( |