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"))
})
duthedd/ggplot2 documentation built on May 20, 2019, 11:13 a.m.