tests/testthat/test_ggdraw.R

context("ggdraw")

test_that("basic ggdraw usage", {
  # empty ggdraw object
  g <- ggdraw()

  expect_equal(methods::is(g), "gg")

  # test proper scale limits on empty object
  build <- ggplot2::ggplot_build(g)
  limits <- build$layout$coord$limits
  expect_equal(limits$x, c(0, 1))
  expect_equal(limits$y, c(0, 1))
})

Try the cowplot package in your browser

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

cowplot documentation built on Dec. 30, 2020, 5:07 p.m.