tests/testthat/test_computeContext.R

context("computeContext")

# fn <- list(cos, `+`, append, sum, ls)
#
# ec <- c(1, 1, 2, 8, 16)
#
# stopifnot(length(ec) == length(fn))
#
# er <- lapply(fn, function(f) {
#   qf <- qualifyFunctionArguments(f)
#   gt <- GenericTesting(f,  rep('x_i', length(qf$argument_names)))
#   ct <- gt$computeContext()
#   ct$statistics
# })
#
# test_that("computeContext", {
#
#   myf <- function(k) {
#      expect_equal(er[[!!k]]$call_signatures, ec[k])
#   }
#
#   sapply(seq_len(length(er)), myf)
# })

Try the wyz.code.metaTesting package in your browser

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

wyz.code.metaTesting documentation built on Sept. 25, 2023, 9:06 a.m.