diff options
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'"); |