File: test-arg.R

package info (click to toggle)
r-cran-lifecycle 1.0.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 576 kB
  • sloc: sh: 15; makefile: 2
file content (9 lines) | stat: -rw-r--r-- 236 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
test_that("deprecated() returns the missing argument", {
  fn <- function(foo = deprecated()) is_present(foo)
  expect_false(fn())
  expect_true(fn(1))

  fn <- function(foo) is_present(foo)
  expect_false(fn())
  expect_true(fn(1))
})