tests/testthat/test-check_regions.R

test_that("check region in package", {
  expect_true(check_regions("USA"))
  expect_true(check_regions("VT"))
  expect_true(check_regions("Mid-Atlantic"))
})

test_that("check errors", {
  expect_snapshot(check_regions("Foo"), error = TRUE)
  expect_snapshot(check_regions("Bar"), error = TRUE)
  expect_snapshot(check_regions(c("Bar", "Foo")), error = TRUE)
  expect_snapshot(check_regions(c("Bar", "Foo", "USA")), error = TRUE)
  expect_snapshot(check_regions(7), error = TRUE)
})
FluvialGeomorph/RegionalCurve documentation built on Oct. 2, 2023, 9:35 a.m.