tests/testthat/test_base_resample_makeResampleDesc.R

context("makeResampleDesc")

test_that("makeResampleDesc", {
  desc1 = makeResampleDesc("CV", predict = "test", iters = 2)
  expect_equal(desc1$iters, 2)
  expect_equal(desc1$predict, "test")
  expect_error(makeResampleDesc("Foo", predict = "test", iters = 2), "Assertion on 'method' failed: Must be element of set")
  expect_error(makeResampleDesc("CV", predict = "Foo", iters = 2), "Assertion on 'predict' failed: Must be element of set")
})
Najah-lshanableh/R-data-mining2 documentation built on May 6, 2019, 10:11 a.m.