tests/testthat/test-palette.R

testthat::test_that("The Q1 palette is available.", {
  pal = wal::pal_q1();

  testthat::expect_true(is.matrix(pal));
  testthat::expect_true(is.integer(pal));
  testthat::expect_equal(dim(pal), c(256L, 3L));
})


testthat::test_that("The Q2 palette is available.", {
  pal = wal::pal_q2();

  testthat::expect_true(is.matrix(pal));
  testthat::expect_true(is.integer(pal));
  testthat::expect_equal(dim(pal), c(256L, 3L));
})

Try the wal package in your browser

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

wal documentation built on Jan. 17, 2021, 5:10 p.m.