Skip to content

Commit

Permalink
Add simple mmap transfer test case
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Jul 15, 2019
1 parent c31786d commit f5d952c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/testthat/test-mmap.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

context("mmap data transfer")

test_that("mmap transfer", {
skip_on_os("windows")

data <- list(a = 1:100, b = runif(100), c = charToRaw("foobar"))
fun <- function(a, b, c) {
list(mean(a), median(b), rawToChar(c))
}

res <- callr::r(fun, args = data, transfer = "mmap")

expect_identical(res, do.call(fun, data))
})

0 comments on commit f5d952c

Please sign in to comment.