tests/testthat/test-nltt_plot.R

context("nltt_plot")

test_that("use", {

  testthat::expect_silent(nltt_plot(ape::rcoal(10)))
  testthat::expect_silent(nltt_lines(ape::rcoal(10)))
})

test_that("abuse", {
  testthat::expect_error(
    nltt_plot("not a phylogeny"),
    "phylogeny must be of class 'phylo'"
  )
  testthat::expect_error(
    nltt_lines("not a phylogeny"),
    "phylogeny must be of class 'phylo'"
  )

})

Try the nLTT package in your browser

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

nLTT documentation built on Aug. 21, 2023, 5:13 p.m.