aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-01-26 00:27:01 +0800
committerchriseth <c@ethdev.com>2017-01-26 00:27:01 +0800
commit946a63c26f0c03c31c6342acc65d099ffdc3691f (patch)
treeaacb5b1d610a1d8d14de20d966695f68ba799b73 /test
parenta5696e1f0a87a2912cc64d2538751836658e7c63 (diff)
downloaddexon-solidity-946a63c26f0c03c31c6342acc65d099ffdc3691f.tar.gz
dexon-solidity-946a63c26f0c03c31c6342acc65d099ffdc3691f.tar.zst
dexon-solidity-946a63c26f0c03c31c6342acc65d099ffdc3691f.zip
Add test for assignment.
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/InlineAssembly.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp
index c2dac287..9ee84867 100644
--- a/test/libsolidity/InlineAssembly.cpp
+++ b/test/libsolidity/InlineAssembly.cpp
@@ -182,12 +182,18 @@ BOOST_AUTO_TEST_CASE(error_tag)
BOOST_CHECK(successAssemble("{ invalidJumpLabel }"));
}
-BOOST_AUTO_TEST_CASE(inline_assembly_shadowed_instruction)
+BOOST_AUTO_TEST_CASE(inline_assembly_shadowed_instruction_declaration)
{
// Error message: "Cannot use instruction names for identifier names."
BOOST_CHECK(!successAssemble("{ let gas := 1 }"));
}
+BOOST_AUTO_TEST_CASE(inline_assembly_shadowed_instruction_assignment)
+{
+ // Error message: "Cannot use instruction names for identifier names."
+ BOOST_CHECK(!successAssemble("{ 2 =: gas }"));
+}
+
BOOST_AUTO_TEST_SUITE_END()
}