aboutsummaryrefslogtreecommitdiffstats
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
parent56fe3a6ab93116438ea52634e891c71b995d7c3f (diff)
downloaddexon-solidity-130f7419fb4b7d40a212454fe870e9e135813bf1.tar
dexon-solidity-130f7419fb4b7d40a212454fe870e9e135813bf1.tar.gz
dexon-solidity-130f7419fb4b7d40a212454fe870e9e135813bf1.tar.bz2
dexon-solidity-130f7419fb4b7d40a212454fe870e9e135813bf1.tar.lz
dexon-solidity-130f7419fb4b7d40a212454fe870e9e135813bf1.tar.xz
dexon-solidity-130f7419fb4b7d40a212454fe870e9e135813bf1.tar.zst
dexon-solidity-130f7419fb4b7d40a212454fe870e9e135813bf1.zip
Add tests
-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)