tests/tinytest.R

if (requireNamespace("tinytest", quietly = TRUE)) {

  # extended testing (at_home = TRUE) for CI
  # but not to be executed on CRAN (where
  # released versions have 3 components)

  # see section 4.4 in vignette("using_tinytest", "tinytest")
  cran <- length(unclass(packageVersion("ctrdata"))[[1]]) == 3
  # cran <- TRUE

  # do testing unless on CRAN
  if (!cran) {

    tt <- tinytest::test_package(
      pkgname = "ctrdata",
      color = FALSE,
      at_home = !cran)

    saveRDS(
      object = tt,
      file = "tinytest.rds")
  }

}

Try the ctrdata package in your browser

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

ctrdata documentation built on Nov. 24, 2023, 5:11 p.m.