Skip to content

Commit

Permalink
Regen expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
d0cd committed Apr 13, 2024
1 parent 004484b commit d8216a4
Show file tree
Hide file tree
Showing 33 changed files with 359 additions and 387 deletions.
4 changes: 2 additions & 2 deletions tests/expectations/parser/expression/cast_fail.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace: ParseExpression
expectation: Fail
outputs:
- "did not consume all input: 'aas' @ 1:5-8\n'u8' @ 1:9-11\n"
- "Error [EPAR0370005]: expected 'address', 'bool', 'field', 'group', 'scalar', 'signature', 'string', 'i8', 'i16', 'i32', 'i64', 'i128', 'u8', 'u16', 'u32', 'u64', 'u128' -- found '{'\n --> test:1:10\n |\n 1 | 1u128 as { foo: u8 }\n | ^"
- "Error [EPAR0370005]: expected 'address', 'bool', 'field', 'Future', 'group', 'scalar', 'signature', 'string', 'i8', 'i16', 'i32', 'i64', 'i128', 'u8', 'u16', 'u32', 'u64', 'u128' -- found '{'\n --> test:1:10\n |\n 1 | 1u128 as { foo: u8 }\n | ^"
- "did not consume all input: ';' @ 1:14-15\n"
- "Error [EPAR0370005]: expected 'address', 'bool', 'field', 'group', 'scalar', 'signature', 'string', 'i8', 'i16', 'i32', 'i64', 'i128', 'u8', 'u16', 'u32', 'u64', 'u128' -- found 'bar'\n --> test:1:8\n |\n 1 | 1u8 as bar;\n | ^^^"
- "Error [EPAR0370005]: expected 'address', 'bool', 'field', 'Future', 'group', 'scalar', 'signature', 'string', 'i8', 'i16', 'i32', 'i64', 'i128', 'u8', 'u16', 'u32', 'u64', 'u128' -- found 'bar'\n --> test:1:8\n |\n 1 | 1u8 as bar;\n | ^^^"
- "did not consume all input: 'asu8' @ 1:5-9\n"
160 changes: 82 additions & 78 deletions tests/expectations/parser/finalize/finalize.out
Original file line number Diff line number Diff line change
Expand Up @@ -13,117 +13,121 @@ outputs:
functions:
- - main
- annotations: []
variant: Standard
identifier: "{\"id\":\"2\",\"name\":\"main\",\"span\":\"{\\\"lo\\\":39,\\\"hi\\\":43}\"}"
variant: AsyncTransition
identifier: "{\"id\":\"2\",\"name\":\"main\",\"span\":\"{\\\"lo\\\":47,\\\"hi\\\":51}\"}"
input: []
output:
- Internal:
mode: None
type_: Boolean
span:
lo: 49
hi: 53
lo: 57
hi: 61
id: 3
output_type: Boolean
block:
statements: []
span:
lo: 54
hi: 66
lo: 62
hi: 74
id: 4
finalize:
identifier: "{\"id\":\"5\",\"name\":\"main\",\"span\":\"{\\\"lo\\\":85,\\\"hi\\\":89}\"}"
input: []
output: []
output_type: Unit
block:
statements: []
span:
lo: 92
hi: 104
id: 6
span:
lo: 30
hi: 74
id: 5
- - finalize_main
- annotations: []
variant: AsyncFunction
identifier: "{\"id\":\"6\",\"name\":\"finalize_main\",\"span\":\"{\\\"lo\\\":99,\\\"hi\\\":112}\"}"
input: []
output: []
output_type: Unit
block:
statements: []
span:
lo: 76
hi: 104
lo: 115
hi: 127
id: 7
span:
lo: 30
hi: 66
lo: 84
hi: 127
id: 8
- - main
- annotations: []
variant: Standard
identifier: "{\"id\":\"9\",\"name\":\"main\",\"span\":\"{\\\"lo\\\":123,\\\"hi\\\":127}\"}"
variant: Function
identifier: "{\"id\":\"9\",\"name\":\"main\",\"span\":\"{\\\"lo\\\":146,\\\"hi\\\":150}\"}"
input: []
output:
- Internal:
mode: None
type_: Boolean
span:
lo: 133
hi: 137
lo: 156
hi: 160
id: 10
output_type: Boolean
block:
statements: []
span:
lo: 138
hi: 150
lo: 161
hi: 173
id: 11
finalize:
identifier: "{\"id\":\"12\",\"name\":\"main\",\"span\":\"{\\\"lo\\\":160,\\\"hi\\\":164}\"}"
input:
- Internal:
identifier: "{\"id\":\"13\",\"name\":\"a\",\"span\":\"{\\\"lo\\\":165,\\\"hi\\\":166}\"}"
mode: None
type_:
Composite:
id: "{\"id\":\"14\",\"name\":\"foo\",\"span\":\"{\\\"lo\\\":168,\\\"hi\\\":171}\"}"
program: test
span:
lo: 165
hi: 166
id: 15
- Internal:
identifier: "{\"id\":\"16\",\"name\":\"b\",\"span\":\"{\\\"lo\\\":173,\\\"hi\\\":174}\"}"
mode: None
type_:
Composite:
id: "{\"id\":\"17\",\"name\":\"bar\",\"span\":\"{\\\"lo\\\":176,\\\"hi\\\":179}\"}"
program: test
span:
lo: 173
hi: 174
id: 18
output:
- Internal:
mode: None
type_:
Composite:
id: "{\"id\":\"19\",\"name\":\"baz\",\"span\":\"{\\\"lo\\\":184,\\\"hi\\\":187}\"}"
program: test
span:
lo: 184
hi: 187
id: 20
output_type:
Composite:
id: "{\"id\":\"19\",\"name\":\"baz\",\"span\":\"{\\\"lo\\\":184,\\\"hi\\\":187}\"}"
program: test
block:
statements: []
span:
lo: 188
hi: 200
id: 21
span:
lo: 137
hi: 173
id: 12
- - main
- annotations: []
variant: AsyncFunction
identifier: "{\"id\":\"13\",\"name\":\"main\",\"span\":\"{\\\"lo\\\":193,\\\"hi\\\":197}\"}"
input:
- Internal:
identifier: "{\"id\":\"14\",\"name\":\"a\",\"span\":\"{\\\"lo\\\":198,\\\"hi\\\":199}\"}"
mode: None
type_:
Composite:
id: "{\"id\":\"15\",\"name\":\"foo\",\"span\":\"{\\\"lo\\\":201,\\\"hi\\\":204}\"}"
program: test
span:
lo: 198
hi: 199
id: 16
- Internal:
identifier: "{\"id\":\"17\",\"name\":\"b\",\"span\":\"{\\\"lo\\\":206,\\\"hi\\\":207}\"}"
mode: None
type_:
Composite:
id: "{\"id\":\"18\",\"name\":\"bar\",\"span\":\"{\\\"lo\\\":209,\\\"hi\\\":212}\"}"
program: test
span:
lo: 206
hi: 207
id: 19
output:
- Internal:
mode: None
type_:
Composite:
id: "{\"id\":\"20\",\"name\":\"baz\",\"span\":\"{\\\"lo\\\":217,\\\"hi\\\":220}\"}"
program: test
span:
lo: 217
hi: 220
id: 21
output_type:
Composite:
id: "{\"id\":\"20\",\"name\":\"baz\",\"span\":\"{\\\"lo\\\":217,\\\"hi\\\":220}\"}"
program: test
block:
statements: []
span:
lo: 151
hi: 200
lo: 221
hi: 233
id: 22
span:
lo: 114
hi: 150
lo: 178
hi: 233
id: 23
span:
lo: 2
hi: 212
hi: 245
2 changes: 1 addition & 1 deletion tests/expectations/parser/finalize/finalize_fail.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
namespace: Parse
expectation: Fail
outputs:
- "Error [EPAR0370009]: unexpected string: expected 'identifier', found '{'\n --> test:6:16\n |\n 6 | } finalize {\n | ^"
- "Error [EPAR0370005]: expected 'struct', 'record', 'mapping', '@', 'function', 'transition', 'inline' -- found 'finalize'\n --> test:6:7\n |\n 6 | } finalize {\n | ^^^^^^^^"
11 changes: 4 additions & 7 deletions tests/expectations/parser/finalize/finalize_statement_fail.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
namespace: ParseStatement
expectation: Fail
outputs:
- "Error [EPAR0370031]: `finalize` statements are deprecated.\n --> test:1:1\n |\n 1 | finalize(;\n | ^^^^^^^^\n |\n = Use `return <expr> then finalize(<args>)` instead."
- "Error [EPAR0370031]: `finalize` statements are deprecated.\n --> test:1:1\n |\n 1 | finalize(foo, ,);\n | ^^^^^^^^\n |\n = Use `return <expr> then finalize(<args>)` instead."
- "Error [EPAR0370031]: `finalize` statements are deprecated.\n --> test:1:1\n |\n 1 | finalize(foo, bar)\n | ^^^^^^^^\n |\n = Use `return <expr> then finalize(<args>)` instead."
- "Error [EPAR0370005]: expected ; -- found 'async'\n --> test:1:7\n |\n 1 | async async finalize(foo);\n | ^^^^^"
- "Error [EPAR0370031]: `finalize` statements are deprecated.\n --> test:1:1\n |\n 1 | finalize;\n | ^^^^^^^^\n |\n = Use `return <expr> then finalize(<args>)` instead."
- "Error [EPAR0370005]: expected ; -- found 'finalize'\n --> test:1:6\n |\n 1 | asyn finalize(foo);\n | ^^^^^^^^"
- "Error [EPAR0370005]: expected finalize -- found 'fin'\n --> test:1:13\n |\n 1 | return then fin;\n | ^^^"
- "Error [EPAR0370005]: expected ; -- found 'finalize'\n --> test:1:13\n |\n 1 | return then finalize;\n | ^^^^^^^^"
- "Error [EPAR0370005]: expected ; -- found 'finalize'\n --> test:1:13\n |\n 1 | return then finalize();\n | ^^^^^^^^"
- "Error [EPAR0370005]: expected ; -- found 'finalize'\n --> test:1:13\n |\n 1 | return then finalize(foo);\n | ^^^^^^^^"
- "Error [EPAR0370005]: expected ; -- found 'finalize'\n --> test:1:13\n |\n 1 | return then finalize(foo, bar);\n | ^^^^^^^^"
8 changes: 2 additions & 6 deletions tests/expectations/parser/functions/annotated_context.out
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ outputs:
lo: 30
hi: 38
id: 3
variant: Standard
variant: Function
identifier: "{\"id\":\"4\",\"name\":\"f\",\"span\":\"{\\\"lo\\\":52,\\\"hi\\\":53}\"}"
input: []
output:
Expand All @@ -44,7 +44,6 @@ outputs:
lo: 79
hi: 82
- 6
finalize_arguments: ~
span:
lo: 72
hi: 83
Expand All @@ -53,7 +52,6 @@ outputs:
lo: 62
hi: 89
id: 8
finalize: ~
span:
lo: 43
hi: 89
Expand All @@ -65,7 +63,7 @@ outputs:
lo: 99
hi: 107
id: 11
variant: Standard
variant: Function
identifier: "{\"id\":\"12\",\"name\":\"g\",\"span\":\"{\\\"lo\\\":141,\\\"hi\\\":142}\"}"
input: []
output:
Expand All @@ -91,7 +89,6 @@ outputs:
lo: 168
hi: 171
- 14
finalize_arguments: ~
span:
lo: 161
hi: 172
Expand All @@ -100,7 +97,6 @@ outputs:
lo: 151
hi: 178
id: 16
finalize: ~
span:
lo: 132
hi: 178
Expand Down
62 changes: 29 additions & 33 deletions tests/expectations/parser/functions/annotated_functions.out
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,32 @@ outputs:
structs: []
mappings: []
functions:
- - mint
- annotations: []
variant: Transition
identifier: "{\"id\":\"12\",\"name\":\"mint\",\"span\":\"{\\\"lo\\\":101,\\\"hi\\\":105}\"}"
input: []
output:
- Internal:
mode: None
type_:
Integer: U8
span:
lo: 111
hi: 113
id: 13
output_type:
Integer: U8
block:
statements: []
span:
lo: 114
hi: 116
id: 14
span:
lo: 90
hi: 116
id: 15
- - foo
- annotations:
- identifier: "{\"id\":\"2\",\"name\":\"foo\",\"span\":\"{\\\"lo\\\":31,\\\"hi\\\":34}\"}"
Expand All @@ -28,7 +54,7 @@ outputs:
lo: 48
hi: 52
id: 7
variant: Standard
variant: Function
identifier: "{\"id\":\"8\",\"name\":\"foo\",\"span\":\"{\\\"lo\\\":66,\\\"hi\\\":69}\"}"
input: []
output:
Expand All @@ -48,46 +74,18 @@ outputs:
lo: 78
hi: 80
id: 10
finalize: ~
span:
lo: 57
hi: 80
id: 11
- - mint
- annotations: []
variant: Transition
identifier: "{\"id\":\"12\",\"name\":\"mint\",\"span\":\"{\\\"lo\\\":101,\\\"hi\\\":105}\"}"
input: []
output:
- Internal:
mode: None
type_:
Integer: U8
span:
lo: 111
hi: 113
id: 13
output_type:
Integer: U8
block:
statements: []
span:
lo: 114
hi: 116
id: 14
finalize: ~
span:
lo: 90
hi: 116
id: 15
- - test
- annotations:
- identifier: "{\"id\":\"16\",\"name\":\"test\",\"span\":\"{\\\"lo\\\":127,\\\"hi\\\":131}\"}"
span:
lo: 126
hi: 131
id: 17
variant: Standard
variant: Function
identifier: "{\"id\":\"18\",\"name\":\"test\",\"span\":\"{\\\"lo\\\":145,\\\"hi\\\":149}\"}"
input: []
output:
Expand All @@ -107,7 +105,6 @@ outputs:
lo: 158
hi: 160
id: 20
finalize: ~
span:
lo: 136
hi: 160
Expand All @@ -119,7 +116,7 @@ outputs:
lo: 170
hi: 178
id: 23
variant: Standard
variant: Function
identifier: "{\"id\":\"24\",\"name\":\"foo\",\"span\":\"{\\\"lo\\\":192,\\\"hi\\\":195}\"}"
input: []
output:
Expand All @@ -139,7 +136,6 @@ outputs:
lo: 204
hi: 206
id: 26
finalize: ~
span:
lo: 183
hi: 206
Expand Down
Loading

0 comments on commit d8216a4

Please sign in to comment.