diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-03-01 19:18:44 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-06-12 22:02:53 +0800 |
commit | e4b7b2160e0f98670d39c9651e7ceafd6b1aea32 (patch) | |
tree | f7ff7b4e17e4c61f41b776dde4d3f22d65072f94 /test | |
parent | ae2b5898503dd744c04ab605c479e1d2aa4e4d79 (diff) | |
download | dexon-solidity-e4b7b2160e0f98670d39c9651e7ceafd6b1aea32.tar.gz dexon-solidity-e4b7b2160e0f98670d39c9651e7ceafd6b1aea32.tar.zst dexon-solidity-e4b7b2160e0f98670d39c9651e7ceafd6b1aea32.zip |
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 + "'"); } } |