tests/testthat/test-create_clock_model.R

context("create_clock_model")

test_that("use", {

  # English
  clock_model <- beautier::create_rln_clock_model()
  testthat::expect_true(is_rln_clock_model(clock_model))

  clock_model <- beautier::create_strict_clock_model()
  testthat::expect_true(is_strict_clock_model(clock_model))

  # Search-tree friendly
  clock_model <- beautier::create_clock_model_rln()
  testthat::expect_true(is_rln_clock_model(clock_model))

  clock_model <- beautier::create_clock_model_strict()
  testthat::expect_true(is_strict_clock_model(clock_model))

})

test_that("abuse", {

  testthat::expect_error(
    beautier::create_clock_model(name = "nonsense")
  )
})
richelbilderbeek/beastscriptr documentation built on Nov. 5, 2023, 8:36 p.m.