diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-12 23:33:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-12 23:33:26 +0800 |
commit | d1e7e9ef5e3dfbf49045976da91a6a88dd28bbd3 (patch) | |
tree | 1ba75f1db43bc443449fa34ee3de5b9134d8c235 /test | |
parent | e2f4a9fcf409df1108d355824de12ff43682a728 (diff) | |
parent | e4b7b2160e0f98670d39c9651e7ceafd6b1aea32 (diff) | |
download | dexon-solidity-d1e7e9ef5e3dfbf49045976da91a6a88dd28bbd3.tar dexon-solidity-d1e7e9ef5e3dfbf49045976da91a6a88dd28bbd3.tar.gz dexon-solidity-d1e7e9ef5e3dfbf49045976da91a6a88dd28bbd3.tar.bz2 dexon-solidity-d1e7e9ef5e3dfbf49045976da91a6a88dd28bbd3.tar.lz dexon-solidity-d1e7e9ef5e3dfbf49045976da91a6a88dd28bbd3.tar.xz dexon-solidity-d1e7e9ef5e3dfbf49045976da91a6a88dd28bbd3.tar.zst dexon-solidity-d1e7e9ef5e3dfbf49045976da91a6a88dd28bbd3.zip |
Merge pull request #3627 from ethereum/additional-keywords
[BREAKING] Add new reserved keywords.
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityParser.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index 0797b53b..1ffbd771 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -491,28 +491,46 @@ BOOST_AUTO_TEST_CASE(keyword_is_reserved) auto keywords = { "abstract", "after", + "alias", + "apply", + "auto", "case", "catch", + "copyof", "default", + "define", "final", + "immutable", + "implements", "in", "inline", "let", + "macro", "match", + "mutable", "null", "of", + "override", + "partial", + "promise", + "reference", "relocatable", + "sealed", + "sizeof", "static", + "supports", "switch", "try", "type", - "typeof" + "typedef", + "typeof", + "unchecked" }; for (const auto& keyword: keywords) { auto text = std::string("contract ") + keyword + " {}"; - CHECK_PARSE_ERROR(text.c_str(), "Expected identifier but got reserved keyword"); + CHECK_PARSE_ERROR(text.c_str(), string("Expected identifier but got reserved keyword '") + keyword + "'"); } } |