aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/InlineAssembly.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-05-24 20:23:53 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-05-24 20:35:52 +0800
commit130f7419fb4b7d40a212454fe870e9e135813bf1 (patch)
tree224b840cadce4671bf7d456f390c1320eb045201 /test/libsolidity/InlineAssembly.cpp
parent56fe3a6ab93116438ea52634e891c71b995d7c3f (diff)
downloaddexon-solidity-130f7419fb4b7d40a212454fe870e9e135813bf1.tar.gz
dexon-solidity-130f7419fb4b7d40a212454fe870e9e135813bf1.tar.zst
dexon-solidity-130f7419fb4b7d40a212454fe870e9e135813bf1.zip
Add tests
Diffstat (limited to 'test/libsolidity/InlineAssembly.cpp')
-rw-r--r--test/libsolidity/InlineAssembly.cpp11
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)