aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-10-08 07:03:56 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-10-20 03:44:15 +0800
commit0a3faf48d472a6f0e49f56ac9d547ce8073f40fd (patch)
tree60db74cca6c3a8adef275b84247106fe104ab4ab /test/libsolidity
parent9616470f67675d7cd4a2a3df001302d87417b03f (diff)
downloaddexon-solidity-0a3faf48d472a6f0e49f56ac9d547ce8073f40fd.tar.gz
dexon-solidity-0a3faf48d472a6f0e49f56ac9d547ce8073f40fd.tar.zst
dexon-solidity-0a3faf48d472a6f0e49f56ac9d547ce8073f40fd.zip
Add tests for magic variables in inline assembly
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/InlineAssembly.cpp7
1 files changed, 7 insertions, 0 deletions
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()
}