context("occultVectorMatrixDS::expt::incorrect_parameters")
test_that("incorrect_paramters",
{
concealing.matrix <- occultVectorMatrixDS()
expect_equal(sum(concealing.matrix),0)
expect_equal(nrow(concealing.matrix),2)
expect_equal(ncol(concealing.matrix),2)
concealing.matrix <- occultVectorMatrixDS("aVectorDoesNotExist")
expect_equal(sum(concealing.matrix),0)
expect_equal(nrow(concealing.matrix),2)
expect_equal(ncol(concealing.matrix),2)
concealing.matrix <- occultVectorMatrixDS("aVectorDoesNotExist","aMatrixDoesNotExist")
expect_equal(sum(concealing.matrix),0)
expect_equal(nrow(concealing.matrix),2)
expect_equal(ncol(concealing.matrix),2)
})
context("initiateExchangeDS::smk")
test_that("incorrect_length",
{
ds.test_env$vector <- c(1,2,3,4)
ds.test_env$concealing.matrix <- matrix(1:25,nrow = 5, ncol = 5)
print("------")
print(ls(ds.test_env))
print(class(ds.test_env))
outcome <- occultVectorMatrixDS("vector","concealing.matrix",ds.test_env)
expect_equal(sum(outcome),4)
expect_equal(nrow(outcome),2)
expect_equal(ncol(outcome),2)
ds.test_env$vector <- c(1,2,3,4,5)
ds.test_env$concealing.matrix <- matrix(1:16, nrow = 4, ncol = 4)
print(ls())
outcome <- occultVectorMatrixDS("vector","concealing.matrix",ds.test_env)
expect_equal(sum(outcome),4)
expect_equal(nrow(outcome),2)
expect_equal(ncol(outcome),2)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.