diff options
author | chriseth <chris@ethereum.org> | 2018-01-06 07:02:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-06 07:02:21 +0800 |
commit | bca01f8f680c4f7d3a2da56fa014f587c5645c6a (patch) | |
tree | 0e5406e44ed53dc63b934314a7c59aae03cdc8d2 /test | |
parent | cf4fdab134366d36d2614fc549eadf149e8ee82b (diff) | |
parent | a91393f4d74352be022b9a83fc3007881f770ed7 (diff) | |
download | dexon-solidity-bca01f8f680c4f7d3a2da56fa014f587c5645c6a.tar.gz dexon-solidity-bca01f8f680c4f7d3a2da56fa014f587c5645c6a.tar.zst dexon-solidity-bca01f8f680c4f7d3a2da56fa014f587c5645c6a.zip |
Merge pull request #3382 from ethereum/julia-identifier-parser
Support some restricted tokens (return, byte, address) as identifier in Julia
Diffstat (limited to 'test')
-rw-r--r-- | test/libjulia/Parser.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libjulia/Parser.cpp b/test/libjulia/Parser.cpp index 9aa325a4..3ca62a90 100644 --- a/test/libjulia/Parser.cpp +++ b/test/libjulia/Parser.cpp @@ -196,6 +196,14 @@ BOOST_AUTO_TEST_CASE(empty_call) CHECK_ERROR("{ () }", ParserError, "Literal or identifier expected."); } +BOOST_AUTO_TEST_CASE(tokens_as_identifers) +{ + BOOST_CHECK(successParse("{ let return:u256 := 1:u256 }")); + BOOST_CHECK(successParse("{ let byte:u256 := 1:u256 }")); + BOOST_CHECK(successParse("{ let address:u256 := 1:u256 }")); + BOOST_CHECK(successParse("{ let bool:u256 := 1:u256 }")); +} + BOOST_AUTO_TEST_CASE(lacking_types) { CHECK_ERROR("{ let x := 1:u256 }", ParserError, "Expected token Identifier got 'Assign'"); |