Nothing
context("Using object defaults")
pg <- .loadPgExample()
defaultTest <- function(x, defaults) {
.fillDefaults(defaults)
x
}
test_that("Setter and getter works", {
expect_equal(defaults(pg)$kmerSize, .pkg_variables$defaults$kmerSize)
defaults(pg)$kmerSize <- 1
expect_equal(defaults(pg)$kmerSize, 1)
defaults(pg)$newDef <- 'test'
expect_equal(defaults(pg)$newDef, 'test')
expect_error(defaults(pg)$translated <- FALSE)
})
test_that("defaults can be used with .fillDefaults", {
expect_error(defaultTest(defaults=list(y=1)))
expect_equal(defaultTest(defaults=list(x=1)), 1)
expect_equal(defaultTest(x=2,defaults=list(x=1)), 2)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.