tests/testthat/test-species_type_to_str.R

test_that("use", {
  expect_equal(species_type_to_str("A"), "anagenetic")
  expect_equal(species_type_to_str("C"), "cladogenetic")
  expect_equal(species_type_to_str("I"), "immigrant")
  expect_error(species_type_to_str(-1))
  expect_error(species_type_to_str(7))
  expect_error(species_type_to_str(NA))
  expect_error(species_type_to_str(NULL))
  expect_error(species_type_to_str(Inf))
  expect_error(species_type_to_str(c(1, 2)))
  expect_error(species_type_to_str(c()))
  expect_error(species_type_to_str(list()))
  expect_error(species_type_to_str("nonsense"))
})
joshwlambert/DAISIEmainland documentation built on July 14, 2024, 5:40 p.m.