Skip to content

Commit a413a8e

Browse files
committed
rect- prefix
1 parent 49d027a commit a413a8e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/testthat/test-ggplot-rect.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ context("geom_rect")
33
expect_traces <- function(gg, n.traces, name){
44
stopifnot(is.ggplot(gg))
55
stopifnot(is.numeric(n.traces))
6-
save_outputs(gg, paste0("rects-", name))
6+
save_outputs(gg, paste0("rect-", name))
77
L <- gg2list(gg)
88
is.trace <- names(L) == ""
99
all.traces <- L[is.trace]
@@ -68,7 +68,7 @@ rect.color <- ggplot(df4, aes(xmin = x, xmax = x + 0.5, ymin = 0, ymax = 1)) +
6868
geom_rect(aes(color=status), fill="grey")
6969

7070
test_that('rect color', {
71-
info <- expect_traces(rect.color, 2, "rect-color")
71+
info <- expect_traces(rect.color, 2, "color")
7272
traces.by.name <- list()
7373
for(tr in info$traces){
7474
expect_equal(tr$fillcolor, toRGB("grey"))
@@ -95,7 +95,7 @@ rect.fill <- ggplot(df4, aes(xmin = x, xmax = x + 0.5, ymin = 0, ymax = 1)) +
9595
geom_rect(aes(fill=status))
9696

9797
test_that('rect color', {
98-
info <- expect_traces(rect.fill, 2, "rect-fill")
98+
info <- expect_traces(rect.fill, 2, "fill")
9999
traces.by.name <- list()
100100
for(tr in info$traces){
101101
expect_equal(tr$line$color, "transparent")
@@ -123,7 +123,7 @@ rect.fill.color <-
123123
geom_rect(aes(fill=status), color="black")
124124

125125
test_that('rect aes(fill) with constant color', {
126-
info <- expect_traces(rect.fill.color, 2, "rect-fill-color")
126+
info <- expect_traces(rect.fill.color, 2, "fill-color")
127127
traces.by.name <- list()
128128
for(tr in info$traces){
129129
expect_equal(tr$line$color, toRGB("black"))

0 commit comments

Comments
 (0)