tests/testthat/test-gdp.R

test_that("time is correct", {
  tmp <- tempfile()
  sink(tmp)
  running_time <- system.time(res <- gdp(0.5))[[3L]]
  sink()
  unlink(tmp)

  expect_gt(running_time, 0.49)
  expect_equal(res, "You are the power!")
})

Try the depigner package in your browser

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

depigner documentation built on April 24, 2023, 5:08 p.m.