Skip to content

Commit

Permalink
Add more tests for internals
Browse files Browse the repository at this point in the history
  • Loading branch information
RLumSK committed Sep 15, 2024
1 parent dafcb73 commit 42e8ba7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/testthat/test_internals.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,15 @@ test_that("Test internals", {
fun.int <- function() .throw_warning("Warning message")
fun.ext <- function() fun.int()
fun.docall <- function() do.call(fun.ext, args = list())
fun.docall_do <- function() fun.docall()
expect_warning(fun.int(),
"[fun.int()] Warning message", fixed = TRUE)
expect_warning(fun.ext(),
"[fun.int()] Warning message", fixed = TRUE)
expect_warning(fun.docall(),
"[fun.int()] Warning message", fixed = TRUE)
expect_warning(fun.docall_do(),
"[fun.int()] Warning message", fixed = TRUE)

fun.int <- function() .throw_warning("Warning message", nframe = 2)
fun.ext <- function() fun.int()
Expand Down

0 comments on commit 42e8ba7

Please sign in to comment.