tests/testthat/test-facet.R

context("facet manipulation")

test_that("facet creation and addition of entries", {
  f <- Facet()
  e <- FacetEntry()
  expect_s4_class(f, "Facet")
  expect_s4_class(e, "FacetEntry")
  f <- add_entry(f, e)
  expect_equal(f@entries[[1]], e)
})

test_that("named facet creation and addition of entries", {
  f <- NamedFacet()
  e <- NamedFacetEntry(name = "test")
  expect_s4_class(f, "NamedFacet")
  expect_s4_class(e, "NamedFacetEntry")
  f <- add_entry(f, e)
  expect_equal(f@entries[["test"]], e)
})

Try the assemblerr package in your browser

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

assemblerr documentation built on Jan. 13, 2022, 1:07 a.m.