tests/testthat/tests-unit.R

testthat::test_that("Test Truth 1", {
  result <- calc_roc(c(1,1,1,0), c(1,1,1,0))
  expect_equal(result@predictions[[1]][1], 1)
})

testthat::test_that("Test Truth 2", {
  result <- calc_roc(c(1,1,1,0), c(1,1,1,0))
  expect_equal(result@predictions[[1]][4], 0)
})

Try the VIMPS package in your browser

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

VIMPS documentation built on May 29, 2024, 11:21 a.m.