From 0a3faf48d472a6f0e49f56ac9d547ce8073f40fd Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Sat, 8 Oct 2016 00:03:56 +0100 Subject: Add tests for magic variables in inline assembly --- test/libsolidity/InlineAssembly.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/libsolidity') diff --git a/test/libsolidity/InlineAssembly.cpp b/test/libsolidity/InlineAssembly.cpp index 45eceb34..f8655c0c 100644 --- a/test/libsolidity/InlineAssembly.cpp +++ b/test/libsolidity/InlineAssembly.cpp @@ -162,6 +162,13 @@ BOOST_AUTO_TEST_CASE(assignment_after_tag) BOOST_CHECK(successParse("{ let x := 1 { tag: =: x } }")); } +BOOST_AUTO_TEST_CASE(magic_variables) +{ + BOOST_CHECK(!successAssemble("{ this }")); + BOOST_CHECK(!successAssemble("{ ecrecover }")); + BOOST_CHECK(successAssemble("{ let ecrecover := 1 ecrecover }")); +} + BOOST_AUTO_TEST_SUITE_END() } -- cgit