tests/testthat/test-map.R

test_that("mapply0() works", {

  foo <- function(a, b, c) sum(a, b, c)
  res <- mark:::mapply0(foo, a = 1:2, b = NULL, c = 3)
  exp <- list(4, 5)
  expect_identical(exp, res)

  x <- list(a = 1:2, b = NULL, c = 3)
  res <- mark:::mapply0(foo, x)
  expect_identical(exp, res)
})

Try the mark package in your browser

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

mark documentation built on May 29, 2024, 5:13 a.m.