diff options
author | chriseth <c@ethdev.com> | 2017-02-20 18:42:23 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-02-20 18:42:23 +0800 |
commit | d794d35e503e85d6fa2730eea9250a1c22ce430f (patch) | |
tree | dffa52d7814c41940266de91d3f220dbc62e7a3c | |
parent | 354f92f813704158e53267412fea91fb9a6ca8a8 (diff) | |
download | dexon-solidity-d794d35e503e85d6fa2730eea9250a1c22ce430f.tar.gz dexon-solidity-d794d35e503e85d6fa2730eea9250a1c22ce430f.tar.zst dexon-solidity-d794d35e503e85d6fa2730eea9250a1c22ce430f.zip |
Also check imbalanced stack.
-rw-r--r-- | test/libsolidity/InlineAssembly.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp index aef2d59c..10a61777 100644 --- a/test/libsolidity/InlineAssembly.cpp +++ b/test/libsolidity/InlineAssembly.cpp @@ -286,7 +286,7 @@ BOOST_AUTO_TEST_CASE(string_literals) BOOST_AUTO_TEST_CASE(oversize_string_literals) { - BOOST_CHECK(!successAssemble("{ let x := \"123456789012345678901234567890123\" }")); + CHECK_ASSEMBLE_ERROR("{ let x := \"123456789012345678901234567890123\" }", TypeError, "String literal too long"); } BOOST_AUTO_TEST_CASE(assignment_after_tag) @@ -304,7 +304,8 @@ BOOST_AUTO_TEST_CASE(magic_variables) BOOST_AUTO_TEST_CASE(imbalanced_stack) { BOOST_CHECK(successAssemble("{ 1 2 mul pop }", false)); - BOOST_CHECK(!successAssemble("{ 1 }", false)); + CHECK_ASSEMBLE_ERROR("{ 1 }", Warning, "Inline assembly block is not balanced. It leaves"); + CHECK_ASSEMBLE_ERROR("{ pop }", Warning, "Inline assembly block is not balanced. It takes"); BOOST_CHECK(successAssemble("{ let x := 4 7 add }", false)); } |