Skip to content

Commit

Permalink
test that protected arguments are indeed removed when provided
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Oct 25, 2024
1 parent 7c0de55 commit 34756ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/testthat/test-arguments.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ test_that("warns informatively about protected arguments", {
)
)

expect_named(.res, "e")

expect_snapshot(
.res <- check_eng_args(
args = list(b = 2, c = 3, e = 5),
Expand All @@ -18,6 +20,8 @@ test_that("warns informatively about protected arguments", {
)
)

expect_named(.res, "e")

expect_snapshot(
.res <- check_eng_args(
args = list(c = 3, e = 5),
Expand All @@ -26,6 +30,8 @@ test_that("warns informatively about protected arguments", {
)
)

expect_named(.res, "e")

expect_warning(
check_eng_args(
args = list(a = 1, b = 2, c = 3, e = 5),
Expand Down

0 comments on commit 34756ab

Please sign in to comment.