tests/testthat/test-throws-MidPNotLogical.R

test_that("throws when mid.p is not logical", {
  expect_error(rema(c(1, 1), c(2, 2), c(0, 0), c(1, 1), mid.p = 1), logical.err)
  expect_error(rema(c(1, 1), c(2, 2), c(0, 0), c(1, 1), mid.p = 1.1), logical.err)
  expect_error(rema(c(1, 1), c(2, 2), c(0, 0), c(1, 1), mid.p = "Hi"), logical.err)
  expect_error(rema(c(1, 1), c(2, 2), c(0, 0), c(1, 1), mid.p = NA), logical.err)
})

Try the rema package in your browser

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

rema documentation built on Oct. 29, 2021, 1:07 a.m.