tests/testthat/test-dorng-nonattached.r

context('dorng - foreach not attached')

test_that("%dorng% works also when foreach is not attached", {
  `%dorng%` <- doRNG::`%dorng%`
  y <- foreach::foreach(x = 1:2) %dorng% { x }
  stopifnot(all.equal(y, list(1, 2), check.attributes = FALSE))
})

Try the doRNG package in your browser

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

doRNG documentation built on Jan. 16, 2023, 5:07 p.m.