tests/testthat/test-check_required.R

test_that("check_required works", {

  # myfun <- function(arg0,
  #                   arg1,
  #                   arg2=NULL){
  #   args <- match.call(call = sys.call(sys.parent(2L)))
  #   echolocatoR:::check_required(fun=myfun,
  #                                args=args)
  #   print("This function is done.")
  #   return(as.list(args))
  # }
  # echolocatoR:::arg_types(myfun, keep_types = "no_default")
  # testthat::expect_error(
  #   myfun()
  # )
  # msg <- utils::capture.output(tryCatch(myfun(), error=function(e){e}))

})
RajLabMSSM/echolocatoR documentation built on Jan. 29, 2023, 6:04 a.m.