tests/testthat/test_get_rough_state_cols.R

test_that(
  "Testing get_rough_state_cols()",
  {

    stm <- readRDS("../testdata/stm_test.RDS")

    cols <- get_rough_state_cols(stm[[1]])

    # Check class.
    expect_true(is.character(cols))

    # Check number of colors.
    expect_true(length(cols) == length(unique(unlist(lapply(stm[[1]]$maps, function(x) names(x) )))))

  }
)

Try the ontophylo package in your browser

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

ontophylo documentation built on May 29, 2024, 9:57 a.m.