We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3168b40 commit ac39945Copy full SHA for ac39945
tests/testthat/test-legend.R
@@ -23,6 +23,23 @@ test_that("gsplot legend works", {
23
24
expect_equal(gs$legend$gs.config$location, "bottomright")
25
26
+})
27
+
28
+test_that("gsplot legend args are still the same", {
29
30
+ overall.legend <- c("x", "y", "bty", "bg", "box.lty", "box.lwd", "box.col", "cex",
31
+ "xjust", "yjust", "x.intersp", "y.intersp", "adj", "text.width",
32
+ "merge", "trace", "plot", "ncol", "horiz", "title", "inset",
33
+ "xpd", "title.col", "title.adj", "seg.len")
34
35
+ fun.specific <- c("legend", "fill", "col", "border", "lty", "lwd", "pch", "angle",
36
+ "density", "pt.bg", "pt.cex", "pt.lwd", "text.col", "text.font")
37
38
+ all.formals <- names(formals(graphics::legend))
39
40
+ expect_equal(length(all.formals[!all.formals %in% overall.legend]), length(fun.specific))
41
42
+ expect_equal(length(all.formals[!all.formals %in% fun.specific]), length(overall.legend))
43
44
})
45
0 commit comments