tests/testthat/test-time-and-space.R

context("time and space")

test_that("all operations are timed", {
  expect_true(runif(1e6) %>>% sqrt %>>% sum %>% get_time %>% { all(. >= 0) })
})

test_that("space is recorded for all steps", {
  expect_true(runif(1e6) %>>% sqrt %>>% sum %>% get_mem %>% { all(. >= 0) })
})
arendsee/rmonad documentation built on Dec. 19, 2020, 9:06 p.m.