Skip to content

Commit

Permalink
Update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed Oct 24, 2024
1 parent c55234a commit ee3e835
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
15 changes: 6 additions & 9 deletions tests/testthat/_snaps/cnd.md
Original file line number Diff line number Diff line change
Expand Up @@ -503,21 +503,18 @@
# cnd ctors check arguments

Code
(expect_error(warning_cnd(class = list())))
Output
<error/rlang_error>
warning_cnd(class = list())
Condition <rlang_error>
Error in `warning_cnd()`:
! `class` must be a character vector, not a list.
Code
(expect_error(error_cnd(class = list())))
Output
<error/rlang_error>
error_cnd(class = list())
Condition <rlang_error>
Error in `error_cnd()`:
! `class` must be a character vector, not a list.
Code
(expect_error(message_cnd(message = 1)))
Output
<error/rlang_error>
message_cnd(message = 1)
Condition <rlang_error>
Error in `message_cnd()`:
! `message` must be a character vector, not the number 1.

Expand Down
5 changes: 2 additions & 3 deletions tests/testthat/_snaps/dots-ellipsis.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
# error if dots named

Code
(expect_error(f(1, 2, 3, xy = 4, x = 5), class = "rlib_error_dots_named"))
Output
<error/rlib_error_dots_named>
f(1, 2, 3, xy = 4, x = 5)
Condition <rlib_error_dots_named>
Error in `f()`:
! Arguments in `...` must be passed by position, not name.
x Problematic arguments:
Expand Down
10 changes: 4 additions & 6 deletions tests/testthat/_snaps/dots.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# empty arguments trigger meaningful error

Code
(expect_error(list2(1, , 3), "empty"))
Output
<error/rlang_error>
list2(1, , 3)
Condition <rlang_error>
Error in `list2()`:
! Argument 2 can't be empty.
Code
(expect_error(dots_list(1, , 3), "empty"))
Output
<error/rlang_error>
dots_list(1, , 3)
Condition <rlang_error>
Error in `dots_list()`:
! Argument 2 can't be empty.

Expand Down

0 comments on commit ee3e835

Please sign in to comment.