Skip to content

Commit

Permalink
Remove local_error_call() dispatch snapshot test
Browse files Browse the repository at this point in the history
Picking up the local marker across the dispatch boundary will no
longer work in future versions of R
  • Loading branch information
lionel- committed Oct 26, 2023
1 parent e22849a commit 6001975
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
6 changes: 0 additions & 6 deletions tests/testthat/_snaps/cnd-abort.md
Original file line number Diff line number Diff line change
Expand Up @@ -1467,12 +1467,6 @@
<error/rlang_error>
Error in `f3()`:
! foo
Code
err(f4(NULL))
Output
<error/rlang_error>
Error in `f4()`:
! foo

# errors are fully displayed (parents, calls) in knitted files

Expand Down
18 changes: 0 additions & 18 deletions tests/testthat/test-cnd-abort.R
Original file line number Diff line number Diff line change
Expand Up @@ -528,28 +528,10 @@ test_that("generic call is picked up in methods", {
g()
}

f4 <- function(x) {
f4_dispatch(x)
}
f4_dispatch <- function(x) {
local_error_call("caller")
UseMethod("f4")
}
f4.foo <- function(x) {
NextMethod()
}
f4.bar <- function(x) {
NextMethod()
}
f4.default <- function(x) {
g()
}

expect_snapshot({
err(f1())
err(f2())
err(f3())
err(f4(NULL))
})
})

Expand Down

0 comments on commit 6001975

Please sign in to comment.