aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/InlineAssembly.cpp6
-rw-r--r--test/libsolidity/SolidityParser.cpp14
2 files changed, 6 insertions, 14 deletions
diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp
index 64073edc..c2dac287 100644
--- a/test/libsolidity/InlineAssembly.cpp
+++ b/test/libsolidity/InlineAssembly.cpp
@@ -182,6 +182,12 @@ BOOST_AUTO_TEST_CASE(error_tag)
BOOST_CHECK(successAssemble("{ invalidJumpLabel }"));
}
+BOOST_AUTO_TEST_CASE(inline_assembly_shadowed_instruction)
+{
+ // Error message: "Cannot use instruction names for identifier names."
+ BOOST_CHECK(!successAssemble("{ let gas := 1 }"));
+}
+
BOOST_AUTO_TEST_SUITE_END()
}
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp
index 22766358..e5362e78 100644
--- a/test/libsolidity/SolidityParser.cpp
+++ b/test/libsolidity/SolidityParser.cpp
@@ -1479,20 +1479,6 @@ BOOST_AUTO_TEST_CASE(function_type_state_variable)
BOOST_CHECK(successParse(text));
}
-BOOST_AUTO_TEST_CASE(inline_assembly_shadowed_instruction)
-{
- char const* text = R"(
- contract A {
- function f() {
- assembly {
- let gas := 1
- }
- }
- }
- )";
- CHECK_PARSE_ERROR(text, "Cannot shadow instructions with variable declaration.");
-}
-
BOOST_AUTO_TEST_SUITE_END()
}