mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-27 02:24:15 +03:00
fix parser tests
This commit is contained in:
parent
717fa49dbf
commit
1fee0d3101
@ -2,5 +2,5 @@
|
||||
namespace: ParseExpression
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> test: 1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^\n |\n = illegal spread in array initializer"
|
||||
- " --> test: 1:1\n |\n 1 | [...0; 1]\n | ^^^^^\n |\n = illegal spread in array initializer"
|
||||
- " --> test:1:1\n |\n 1 | [...0u8; 1]\n | ^^^^^^^\n |\n = illegal spread in array initializer"
|
||||
- " --> test:1:1\n |\n 1 | [...0; 1]\n | ^^^^^\n |\n = illegal spread in array initializer"
|
||||
|
@ -2,8 +2,8 @@
|
||||
namespace: ParseExpression
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> test: 1:2\n |\n 1 | [,]\n | ^\n |\n = expected 'expression', got ','"
|
||||
- " --> test: 1:2\n |\n 1 | [,,]\n | ^\n |\n = expected 'expression', got ','"
|
||||
- " --> test: 1:4\n |\n 1 | [0,,]\n | ^\n |\n = expected 'expression', got ','"
|
||||
- " --> test: 1:2\n |\n 1 | [,0]\n | ^\n |\n = expected 'expression', got ','"
|
||||
- " --> test: 1:2\n |\n 1 | [,0,]\n | ^\n |\n = expected 'expression', got ','"
|
||||
- " --> test:1:2\n |\n 1 | [,]\n | ^\n |\n = expected 'expression', got ','"
|
||||
- " --> test:1:2\n |\n 1 | [,,]\n | ^\n |\n = expected 'expression', got ','"
|
||||
- " --> test:1:4\n |\n 1 | [0,,]\n | ^\n |\n = expected 'expression', got ','"
|
||||
- " --> test:1:2\n |\n 1 | [,0]\n | ^\n |\n = expected 'expression', got ','"
|
||||
- " --> test:1:2\n |\n 1 | [,0,]\n | ^\n |\n = expected 'expression', got ','"
|
||||
|
@ -2,15 +2,15 @@
|
||||
namespace: ParseExpression
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> test: 1:3\n |\n 1 | x {\n | ^\n |\n = unexpected EOF"
|
||||
- " --> test:1:3\n |\n 1 | x {\n | ^\n |\n = unexpected EOF"
|
||||
- "did not consume all input: '}' @ 1:3-4\n"
|
||||
- " --> test: 1:4\n |\n 1 | x {,}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test: 1:5\n |\n 1 | x { , }\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test: 1:4\n |\n 1 | x {,,,}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test: 1:6\n |\n 1 | x {x,,}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test: 1:4\n |\n 1 | x {,,x}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test: 1:4\n |\n 1 | x {,x}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test: 1:8\n |\n 1 | x {x:y,,}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test: 1:4\n |\n 1 | x {,,x:y}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test: 1:4\n |\n 1 | x {,x:y}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test: 1:6\n |\n 1 | x {x:}\n | ^\n |\n = expected 'expression', got '}'"
|
||||
- " --> test:1:4\n |\n 1 | x {,}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test:1:5\n |\n 1 | x { , }\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test:1:4\n |\n 1 | x {,,,}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test:1:6\n |\n 1 | x {x,,}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test:1:4\n |\n 1 | x {,,x}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test:1:4\n |\n 1 | x {,x}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test:1:8\n |\n 1 | x {x:y,,}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test:1:4\n |\n 1 | x {,,x:y}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test:1:4\n |\n 1 | x {,x:y}\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test:1:6\n |\n 1 | x {x:}\n | ^\n |\n = expected 'expression', got '}'"
|
||||
|
@ -2,12 +2,12 @@
|
||||
namespace: Token
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> test: 1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'"
|
||||
- " --> test: 1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'"
|
||||
- " --> test: 1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'"
|
||||
- " --> test: 1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'"
|
||||
- " --> test: 1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'"
|
||||
- " --> test: 1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'"
|
||||
- " --> test: 1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'"
|
||||
- " --> test: 1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'"
|
||||
- " --> test: 1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'"
|
||||
- " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'"
|
||||
- " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6Z2eu975wnpz2925ntjccd5cfqxtyu8sta57J9'"
|
||||
- " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d'"
|
||||
- " --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'"
|
||||
- " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8st'"
|
||||
- " --> test:1:1\n |\n 1 | aleo1\n | ^^^^^\n |\n = invalid address literal: 'aleo1'"
|
||||
- " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1aleo1'"
|
||||
- " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d11'"
|
||||
- " --> test:1:1\n |\n 1 | aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = invalid address literal: 'aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8sta57d1x'"
|
||||
|
@ -2,12 +2,12 @@
|
||||
namespace: ParseExpression
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> test: 1:1\n |\n 1 | group\n | ^^^^^\n |\n = expected 'expression', got 'group'"
|
||||
- " --> test:1:1\n |\n 1 | group\n | ^^^^^\n |\n = expected 'expression', got 'group'"
|
||||
- "did not consume all input: 'group' @ 1:3-8\n"
|
||||
- "did not consume all input: 'group' @ 1:6-11\n"
|
||||
- " --> test: 1:2\n |\n 1 | (,)group\n | ^\n |\n = expected 'expression', got ','"
|
||||
- " --> test: 1:2\n |\n 1 | (+, -,)group\n | ^\n |\n = expected 'expression', got '+'"
|
||||
- " --> test: 1:2\n |\n 1 | (,+, -)group\n | ^\n |\n = expected 'expression', got ','"
|
||||
- " --> test:1:2\n |\n 1 | (,)group\n | ^\n |\n = expected 'expression', got ','"
|
||||
- " --> test:1:2\n |\n 1 | (+, -,)group\n | ^\n |\n = expected 'expression', got '+'"
|
||||
- " --> test:1:2\n |\n 1 | (,+, -)group\n | ^\n |\n = expected 'expression', got ','"
|
||||
- "did not consume all input: 'group' @ 1:6-11\n"
|
||||
- "did not consume all input: 'group' @ 1:12-17\n"
|
||||
- "did not consume all input: 'group' @ 1:15-20\n"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> test: 3:18\n |\n 3 | function x(const input) {\n | ^^^^^\n |\n = expected 'ident', got 'input'"
|
||||
- " --> test:3:18\n |\n 3 | function x(const input) {\n | ^^^^^\n |\n = expected 'ident', got 'input'"
|
||||
|
@ -2,4 +2,4 @@
|
||||
namespace: Parse
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> test: 3:17\n |\n 3 | function x(input: u32) {\n | ^\n |\n = expected ')' -- got ':'"
|
||||
- " --> test:3:17\n |\n 3 | function x(input: u32) {\n | ^\n |\n = expected ')' -- got ':'"
|
||||
|
@ -2,26 +2,26 @@
|
||||
namespace: ParseStatement
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> test: 1:0\n |\n 1 | let mut x = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | let mut x = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | let mut x = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | let mut x = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | let mut x = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | const mut x = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | const mut x = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | const mut x = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | const mut x = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | const mut x = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | let mut x: u32 = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | let mut x: u32 = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | let mut x: u32 = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | let mut x: u32 = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | let mut x: u32 = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | const mut x: u32 = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | const mut x: u32 = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | const mut x: u32 = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | const mut x: u32 = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:0\n |\n 1 | const mut x: u32 = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test: 1:10\n |\n 1 | let (x,y,,) = ();\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test: 1:6\n |\n 1 | let (,x,y) = ();\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test: 1:8\n |\n 1 | let (x,,y) = ();\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test:1:0\n |\n 1 | let mut x = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | let mut x = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | let mut x = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | let mut x = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | let mut x = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | const mut x = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | const mut x = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | const mut x = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | const mut x = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | const mut x = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | let mut x: u32 = expr;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | let mut x: u32 = ();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | let mut x: u32 = x+y;\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | let mut x: u32 = (x,y);\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | let mut x: u32 = x();\n |^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | const mut x: u32 = expr;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | const mut x: u32 = ();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | const mut x: u32 = x+y;\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | const mut x: u32 = (x,y);\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:0\n |\n 1 | const mut x: u32 = x();\n |^^^^^^^^^\n |\n = let mut = ... is deprecated. `let` keyword implies mutabality by default."
|
||||
- " --> test:1:10\n |\n 1 | let (x,y,,) = ();\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test:1:6\n |\n 1 | let (,x,y) = ();\n | ^\n |\n = expected 'ident', got ','"
|
||||
- " --> test:1:8\n |\n 1 | let (x,,y) = ();\n | ^\n |\n = expected 'ident', got ','"
|
||||
|
Loading…
Reference in New Issue
Block a user