inst/tinytest/test-bench_system_time.R

#context "test-bench_system_time")

# test_that("bench_system_time covg", {

  # skip_if_not_installed("bench")
  # skip_on_cran()
if ((at_home() || hutilscpp:::is_covr()) && requireNamespace("bench", quietly = TRUE)) {
  expect_true(TRUE) # for valgrind

  expr <- x <- rep_len(c(0, -0.5, 1.2), 5e6)
  bench_x <- bench_system_time(pminC(x, 0))
  expect_true(as.numeric(bench_x)[2] < 1.5)
}

Try the hutilscpp package in your browser

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

hutilscpp documentation built on Oct. 11, 2023, 9:06 a.m.