tests/testthat/_snaps/match-arg.md

it returns an error if stack is empty

Code
  match_arg("a", ..force_empty_stack = TRUE)
Error <simpleError>
  `"a"` has no formal default value.

it returns an error in case of no match

Code
  local_wrapper("d")
Error <simpleError>
  `foo` must be equal to either "a", "b" or "c".

it returns an error if there is nothing to match

Code
  match_arg()
Error <simpleError>
  `` has no formal default value.

it returns an error if arg contains more than 1 element

Code
  local_wrapper(c("a", "b"))
Error <simpleError>
  `foo` must be equal to either "a", "b" or "c".

it uses error when an error must be thrown if it is not null

Code
  local_wrapper_custom_err("d")
Error <simpleError>
  custom message
Output
  o This is a custom todo.


jeanmathieupotvin/dotprofile documentation built on Dec. 20, 2021, 10:08 p.m.