tests/unit_test_entry.R

pkg = "timeDF"

# If RUnit and datasailr exist on this system, load and attach them. Then, run test.
if(requireNamespace("RUnit", quietly = TRUE) && 
   requireNamespace("timeDF", quietly = TRUE )){

  # Test suit definition & Run tests.
  testSuite <- RUnit::defineTestSuite( name = paste0( pkg, " Unit Tests") , 
             dir = system.file("unit_tests", package = pkg ), 
             testFileRegexp = "^test_.+\\.[rR]$",
             testFuncRegexp = "^test_.+")
  Sys.setenv("R_TESTS"="")
  tests <- RUnit::runTestSuite(testSuite)
  RUnit::printTextProtocol(tests)
}

Try the timeDF package in your browser

Any scripts or data that you put into this service are public.

timeDF documentation built on May 29, 2024, 5:12 a.m.