Skip to content

Commit

Permalink
Update ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed May 27, 2024
1 parent 326b02e commit a6613b6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions testing/tests/ui/lit_on_assignment_lhs.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
error: literals are not allowed on the left-hand side of an assignment
--> MyTemplate.txt:1:2
"let 7=x%}"
--> tests/ui/lit_on_assignment_lhs.rs:3:10
|
3 | #[derive(Template)]
Expand Down
2 changes: 2 additions & 0 deletions testing/tests/ui/loop_cycle_empty.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
error: loop.cycle(…) cannot use an empty array
--> ForCycleEmpty.txt:1:35
"[]) }}{{ v }},{% endfor %}"
--> tests/ui/loop_cycle_empty.rs:3:10
|
3 | #[derive(Template)]
Expand Down
6 changes: 4 additions & 2 deletions testing/tests/ui/loop_cycle_wrong_argument_count.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
error: loop.cycle(…) expects exactly one argument
--> $DIR/loop_cycle_wrong_argument_count.rs:3:10
error: loop.cycle(…) cannot use an empty array
--> ForCycle.txt:1:28
".cycle(\"r\", \"g\", \"b\") }}{{ v }},{% endfo"...
--> tests/ui/loop_cycle_wrong_argument_count.rs:3:10
|
3 | #[derive(Template)]
| ^^^^^^^^
Expand Down
6 changes: 6 additions & 0 deletions testing/tests/ui/macro.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
error: macro "thrice" expected 1 argument, found 2
--> InvalidNumberOfArgs.html:5:2
"- call thrice(2, 3) -%}"
--> tests/ui/macro.rs:3:10
|
3 | #[derive(Template)]
Expand All @@ -7,6 +9,8 @@ error: macro "thrice" expected 1 argument, found 2
= note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info)

error: macro "thrice" expected 2 arguments, found 0
--> InvalidNumberOfArgs2.html:5:2
"- call thrice() -%}"
--> tests/ui/macro.rs:11:10
|
11 | #[derive(Template)]
Expand All @@ -15,6 +19,8 @@ error: macro "thrice" expected 2 arguments, found 0
= note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info)

error: macro "thrice" expected 0 arguments, found 2
--> InvalidNumberOfArgs3.html:4:2
"- call thrice(1, 2) -%}"
--> tests/ui/macro.rs:19:10
|
19 | #[derive(Template)]
Expand Down
4 changes: 4 additions & 0 deletions testing/tests/ui/macro_named_argument.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
error: no argument named `param3` in macro "thrice"
--> InvalidNamedArg.html:5:2
"- call thrice(param1=2, param3=3) -%}"
--> tests/ui/macro_named_argument.rs:3:10
|
3 | #[derive(Template)]
Expand Down Expand Up @@ -36,6 +38,8 @@ error: named arguments must always be passed last
= note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot have unnamed argument (`param2`) after named argument in macro "thrice"
--> InvalidNamedArg5.html:4:2
"- call thrice(3, param1=2) -%}"
--> tests/ui/macro_named_argument.rs:37:10
|
37 | #[derive(Template)]
Expand Down

0 comments on commit a6613b6

Please sign in to comment.