tests/testthat/test-ggproto.R

context("ggproto")

test_that(".DollarNames retrieves inherited methods", {
  A <- ggproto("A", NULL, a = 1)
  B <- ggproto("B", A, b = 2)

  expect_equal(.DollarNames(B), c("b", "a"))
})
jayhesselberth/ggplot2-search documentation built on May 9, 2019, 8:06 p.m.