diff options
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/InlineAssembly.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp index f155cba7..6ab2a12d 100644 --- a/test/libsolidity/InlineAssembly.cpp +++ b/test/libsolidity/InlineAssembly.cpp @@ -270,6 +270,17 @@ BOOST_AUTO_TEST_CASE(invalid_tuple_assignment) CHECK_PARSE_ERROR("{ 42 let x, y := 1 }", DeclarationError, "Variable count mismatch."); } +BOOST_AUTO_TEST_CASE(instruction_too_few_arguments) +{ + CHECK_PARSE_ERROR("{ mul() }", ParserError, "Expected 2 arguments, but received 0"); + CHECK_PARSE_ERROR("{ mul(1) }", ParserError, "Expected comma (MUL expects 2 arguments)"); +} + +BOOST_AUTO_TEST_CASE(instruction_too_many_arguments) +{ + CHECK_PARSE_ERROR("{ mul(1, 2, 3) }", ParserError, "Expected ')' (MUL expects 2 arguments)"); +} + BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE(Printing) |