Skip to content

Commit

Permalink
tests: fix broken tests after upgrading the annotate-snippets crate.
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Dec 10, 2024
1 parent e1bb909 commit 9818193
Show file tree
Hide file tree
Showing 25 changed files with 75 additions and 49 deletions.
2 changes: 1 addition & 1 deletion lib/src/compiler/tests/testdata/errors/1.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ error[E012]: duplicate rule `test`
| ---- note: `test` declared here for the first time
2 | condition: true
3 | }
4 |
4 |
5 | rule test {
| ^^^^ duplicate declaration of `test`
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/errors/113.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ error[E019]: invalid modifier combination: `xor` `nocase`
--> line:3:16
|
3 | $a = "foo" xor nocase
| ^^^ `xor` modifier used here
| ^^^^^^ `nocase` modifier used here
| ^^^ ^^^^^^ `nocase` modifier used here
| |
| `xor` modifier used here
|
= note: these two modifiers can't be used together
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/errors/114.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ error[E019]: invalid modifier combination: `base64wide` `nocase`
--> line:3:29
|
3 | $a = "foo" nocase ascii base64wide
| ^^^^^^^^^^ `base64wide` modifier used here
| ^^^^^^ `nocase` modifier used here
| ^^^^^^ ^^^^^^^^^^ `base64wide` modifier used here
| |
| `nocase` modifier used here
|
= note: these two modifiers can't be used together
2 changes: 1 addition & 1 deletion lib/src/compiler/tests/testdata/errors/128.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E001]: syntax error
--> line:1:1
|
1 | / /*/
2 | |
2 | |
3 | | rule test { condition: true }
| |_____________________________^ expecting import statement or rule definition
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/errors/2.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ error[E003]: mismatching types
--> line:3:4
|
3 | "foo" == 2
| ^^^^^ this expression is `string`
| ^ this expression is `integer`
| ^^^^^ ^ this expression is `integer`
| |
| this expression is `string`
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/errors/31.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ error[E003]: mismatching types
--> line:3:20
|
3 | for 1 n in (1, 2, "3") : (
| ^ this expression is `integer`
| ^^^ this expression is `string`
| ^ ^^^ this expression is `string`
| |
| this expression is `integer`
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/errors/32.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ error[E003]: mismatching types
--> line:4:7
|
4 | n == "3"
| ^ this expression is `integer`
| ^^^ this expression is `string`
| ^ ^^^ this expression is `string`
| |
| this expression is `integer`
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/errors/33.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ error[E005]: assignment mismatch
--> line:3:13
|
3 | for all x,y in (0..10) : ( true )
| ^^^ this expects 2 value(s)
| ^^^^^^^ this produces 1 value(s)
| ^^^ ^^^^^^^ this produces 1 value(s)
| |
| this expects 2 value(s)
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/errors/34.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ error[E005]: assignment mismatch
--> line:3:13
|
3 | for all x,y in (1, 2, 3) : ( true )
| ^^^ this expects 2 value(s)
| ^^^^^^^ this produces 1 value(s)
| ^^^ ^^^^^^^ this produces 1 value(s)
| |
| this expects 2 value(s)
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/errors/42.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ error[E015]: mixing greedy and non-greedy quantifiers in regular expression
--> line:3:15
|
3 | $a = /a.*b.*?c/
| ^^^ this is non-greedy
| ^^ this is greedy
| ^^ ^^^ this is non-greedy
| |
| this is greedy
|
6 changes: 4 additions & 2 deletions lib/src/compiler/tests/testdata/errors/46.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ error[E017]: `entrypoint` is unsupported
--> line:3:5
|
3 | entrypoint == 0x1000
| ^^^^^^^^^^ the `entrypoint` keyword is not supported anymore
| ---------- help: use `pe.entry_point` or `elf.entry_point` or `macho.entry_point`
| ----------
| |
| the `entrypoint` keyword is not supported anymore
| help: use `pe.entry_point` or `elf.entry_point` or `macho.entry_point`
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/errors/47.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ error[E005]: assignment mismatch
--> line:4:13
|
4 | for all x,y in test_proto2.array_int64 : ( true )
| ^^^ this expects 2 value(s)
| ^^^^^^^^^^^^^^^^^^^^^^^ this produces 1 value(s)
| ^^^ ^^^^^^^^^^^^^^^^^^^^^^^ this produces 1 value(s)
| |
| this expects 2 value(s)
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/errors/48.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ error[E005]: assignment mismatch
--> line:4:13
|
4 | for all x in test_proto2.map_string_int64 : ( true )
| ^ this expects 1 value(s)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this produces 2 value(s)
| ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this produces 2 value(s)
| |
| this expects 1 value(s)
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/errors/50.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ error[E003]: mismatching types
--> line:4:53
|
4 | for all k,v in test_proto2.map_int64_string : ( k == "1" )
| ^ this expression is `integer`
| ^^^ this expression is `string`
| ^ ^^^ this expression is `string`
| |
| this expression is `integer`
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/errors/51.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ error[E003]: mismatching types
--> line:4:53
|
4 | for all k,v in test_proto2.map_int64_string : ( v == 1 )
| ^ this expression is `string`
| ^ this expression is `integer`
| ^ ^ this expression is `integer`
| |
| this expression is `string`
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/errors/52.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ error[E003]: mismatching types
--> line:5:8
|
5 | struct.nested_int64_zero == "0"
| ^^^^^^^^^^^^^^^^^^^^^^^^ this expression is `integer`
| ^^^ this expression is `string`
| ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ this expression is `string`
| |
| this expression is `integer`
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/warnings/11.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ warning[redundant_modifier]: redundant case-insensitive modifier
--> line:3:15
|
3 | $a = /foo/i nocase
| - the `i` suffix indicates that the pattern is case-insensitive
| ------ the `nocase` modifier does the same
| - ------ the `nocase` modifier does the same
| |
| the `i` suffix indicates that the pattern is case-insensitive
|
2 changes: 1 addition & 1 deletion lib/src/compiler/tests/testdata/warnings/13.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning[duplicate_import]: duplicate import statement
--> line:1:21
--> line:2:1
|
1 | import "test_proto2"
| -------------------- note: `test_proto2` imported here for the first time
Expand Down
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/warnings/3.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ warning[unsatisfiable_expr]: potentially unsatisfiable expression
--> line:6:5
|
6 | all of them at 0
| --- this implies that multiple patterns must match
| ---- but they must match at the same offset
| --- ---- but they must match at the same offset
| |
| this implies that multiple patterns must match
|
12 changes: 8 additions & 4 deletions lib/src/compiler/tests/testdata/warnings/34.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ warning[text_as_hex]: hex pattern could be written as text literal
--> line:3:5
|
3 | $aaa = { 61 61 61 }
| ----------------- this pattern can be written as a text literal
| ----------------- help: replace with "aaa"
| -----------------
| |
| this pattern can be written as a text literal
| help: replace with "aaa"
|
warning[text_as_hex]: hex pattern could be written as text literal
--> line:10:5
|
10 | $aaa = { 61 09 62 }
| ----------------- this pattern can be written as a text literal
| ----------------- help: replace with "a\tb"
| -----------------
| |
| this pattern can be written as a text literal
| help: replace with "a\tb"
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/warnings/4.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ warning[unsatisfiable_expr]: potentially unsatisfiable expression
--> line:6:5
|
6 | all of ($*) at 0
| --- this implies that multiple patterns must match
| ---- but they must match at the same offset
| --- ---- but they must match at the same offset
| |
| this implies that multiple patterns must match
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/warnings/5.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ warning[unsatisfiable_expr]: potentially unsatisfiable expression
--> line:6:5
|
6 | all of ($*) at 0
| --- this implies that multiple patterns must match
| ---- but they must match at the same offset
| --- ---- but they must match at the same offset
| |
| this implies that multiple patterns must match
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/warnings/7.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ warning[unsatisfiable_expr]: potentially unsatisfiable expression
--> line:6:5
|
6 | all of them at 0
| --- this implies that multiple patterns must match
| ---- but they must match at the same offset
| --- ---- but they must match at the same offset
| |
| this implies that multiple patterns must match
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/warnings/8.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ warning[unsatisfiable_expr]: potentially unsatisfiable expression
--> line:6:5
|
6 | all of ($*) at 0
| --- this implies that multiple patterns must match
| ---- but they must match at the same offset
| --- ---- but they must match at the same offset
| |
| this implies that multiple patterns must match
|
5 changes: 3 additions & 2 deletions lib/src/compiler/tests/testdata/warnings/9.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ warning[unsatisfiable_expr]: potentially unsatisfiable expression
--> line:6:5
|
6 | 2 of ($*) at 0
| - this implies that multiple patterns must match
| ---- but they must match at the same offset
| - ---- but they must match at the same offset
| |
| this implies that multiple patterns must match
|

0 comments on commit 9818193

Please sign in to comment.