aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-05-03 02:49:36 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-05-04 20:31:56 +0800
commit840ed1e88a8d70bdbc541a1330654cb1e730e298 (patch)
tree77a05bc9250d870977460a235fed476ca9f55876 /test/libjulia
parentcc108390737dfb8d774622d76e69e94485b0f7b5 (diff)
downloaddexon-solidity-840ed1e88a8d70bdbc541a1330654cb1e730e298.tar.gz
dexon-solidity-840ed1e88a8d70bdbc541a1330654cb1e730e298.tar.zst
dexon-solidity-840ed1e88a8d70bdbc541a1330654cb1e730e298.zip
Update parser test expectations
Diffstat (limited to 'test/libjulia')
-rw-r--r--test/libjulia/Parser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/libjulia/Parser.cpp b/test/libjulia/Parser.cpp
index 9d66658e..96261dec 100644
--- a/test/libjulia/Parser.cpp
+++ b/test/libjulia/Parser.cpp
@@ -212,10 +212,10 @@ BOOST_AUTO_TEST_CASE(tokens_as_identifers)
BOOST_AUTO_TEST_CASE(lacking_types)
{
- CHECK_ERROR("{ let x := 1:u256 }", ParserError, "Expected token Identifier got 'Assign'");
- CHECK_ERROR("{ let x:u256 := 1 }", ParserError, "Expected token Colon got 'RBrace'");
- CHECK_ERROR("{ function f(a) {} }", ParserError, "Expected token Colon got 'RParen'");
- CHECK_ERROR("{ function f(a:u256) -> b {} }", ParserError, "Expected token Colon got 'LBrace'");
+ CHECK_ERROR("{ let x := 1:u256 }", ParserError, "Expected identifier but got '='");
+ CHECK_ERROR("{ let x:u256 := 1 }", ParserError, "Expected ':' but got '}'");
+ CHECK_ERROR("{ function f(a) {} }", ParserError, "Expected ':' but got ')'");
+ CHECK_ERROR("{ function f(a:u256) -> b {} }", ParserError, "Expected ':' but got '{'");
}
BOOST_AUTO_TEST_CASE(invalid_types)
@@ -294,7 +294,7 @@ BOOST_AUTO_TEST_CASE(if_statement)
BOOST_AUTO_TEST_CASE(if_statement_invalid)
{
CHECK_ERROR("{ if let x:u256 {} }", ParserError, "Literal or identifier expected.");
- CHECK_ERROR("{ if true:bool let x:u256 := 3:u256 }", ParserError, "Expected token LBrace");
+ CHECK_ERROR("{ if true:bool let x:u256 := 3:u256 }", ParserError, "Expected '{' but got reserved keyword 'let'");
// TODO change this to an error once we check types.
BOOST_CHECK(successParse("{ if 42:u256 { } }"));
}