tests/testthat/test_default.R

test_that("Check defaults", {
  test_default()

  # We expect, despite that warning, times is still returned
  expect_identical(ls(as.environment(".GlobalEnv")), "times")

  expect_identical(row.names(times), c("scoped", "tictoc"))
  expect_true(all(!is.na(times)))
  expect_gte(min(times$Microseconds), 0)
  expect_gte(min(times$SD), 0)
  expect_gt(min(times$Count), 0)
})

Try the rcpptimer package in your browser

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

rcpptimer documentation built on Sept. 30, 2024, 9:30 a.m.