tests/testthat/test-utils.R

test_that("check_ROPE_argument works", {
  
  expect_error(
    check_ROPE_argument(NULL), 
    NA
  )
  
  expect_error(
    check_ROPE_argument(c(0, 1)), 
    NA
  )
  
  expect_error(
    check_ROPE_argument(0), 
    "Invalid"
  )
  
  expect_error(
    check_ROPE_argument(c("a", "b")), 
    "Invalid"
  )
  
  # decreasing arguments
  expect_error(
    check_ROPE_argument(c(1, 0)), 
    "Invalid"
  )
  
})

Try the BayesPostEst package in your browser

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

BayesPostEst documentation built on Nov. 11, 2021, 9:07 a.m.