tests/testthat/test_RColorBrewer.R

context("RColorBrewer")

test_that("cool_warm", {
  expect_equal(length(cool_warm(10)), 10)
  expect_equal(length(cool_warm(20)), 20)
})


test_that("colorbrewer funs", {
  expect_equal(length(BrBG(10)), 10)
  expect_equal(length(PiYG(10)), 10)
  expect_equal(length(PRGn(10)), 10)
  expect_equal(length(PuOr(10)), 10)
  expect_equal(length(RdBu(10)), 10)
  expect_equal(length(RdGy(10)), 10)
  expect_equal(length(RdYlBu(10)), 10)
  expect_equal(length(RdYlGn(10)), 10)
  expect_equal(length(Spectral(10)), 10)
  expect_equal(length(Blues(10)), 10)
  expect_equal(length(BuGn(10)), 10)
  expect_equal(length(BuPu(10)), 10)
  expect_equal(length(GnBu(10)), 10)
  expect_equal(length(Greens(10)), 10)
  expect_equal(length(Greys(10)), 10)
  expect_equal(length(Oranges(10)), 10)
  expect_equal(length(OrRd(10)), 10)
  expect_equal(length(PuBu(10)), 10)
  expect_equal(length(PuBuGn(10)), 10)
  expect_equal(length(PuRd(10)), 10)
  expect_equal(length(Purples(10)), 10)
  expect_equal(length(RdPu(10)), 10)
  expect_equal(length(Reds(10)), 10)
  expect_equal(length(YlGn(10)), 10)
  expect_equal(length(YlGnBu(10)), 10)
  expect_equal(length(YlOrBr(10)), 10)
  expect_equal(length(YlOrRd(10)), 10)
})
ggmota/heatmaply documentation built on April 2, 2018, 4:13 p.m.