tests/testthat/test_SetOptions.R

 cat("\nTests for 'SetOptions'")

library(testthat)


optns = list(methodXi = NULL)
 
 test_that("SetOptions test: optns$method = NULL 'IN' for Dense case, 'CE' for Sparse case, 'CE' for other cases with warning", {
   expect_equal(SetOptions(list(c(1,3,5), c(2,4)),list(c(1,3,5), c(2,4)), optns)$methodXi, 'CE') 
   expect_equal(SetOptions(list(c(1:10), c(1:10)),list(c(1:10), c(1:10)), optns)$methodXi, 'IN') 
   expect_equal(SetOptions(list(c(1:10), c(1:10)),list(c(1:10), c(1:10)), optns)$kernel, 'epan') 
   expect_equal(SetOptions(list(c(1,2,3,4,5), c(1,2,3,4)),list(c(1,2,3,4,5), c(1,2,3,4)), optns)$methodXi, 'CE')
})
functionaldata/tPACE documentation built on Aug. 16, 2022, 8:27 a.m.