Skip to content

Commit affdb46

Browse files
committed
change the tests
1 parent 2d266f6 commit affdb46

File tree

3 files changed

+7
-178
lines changed

3 files changed

+7
-178
lines changed

tests/figs/plot-grid/byrow-is-false.svg

-85
This file was deleted.

tests/figs/plot-grid/byrow-is-true.svg

-85
This file was deleted.

tests/testthat/test_plot_grid.R

+7-8
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,13 @@ test_that("alignment", {
102102

103103

104104
test_that("labels reorder by byrow", {
105-
105+
# byrow=TRUE
106106
p_list <- lapply(1:3, \(x) ggplot())
107+
g <- plot_grid(plotlist = p_list, ncol = 2, labels = 1:3, byrow = TRUE)
108+
expect_equal(layer_data(g, 4)$label, 2)
107109

108-
expect_doppelganger("byrow is TRUE",
109-
plot_grid(plotlist = p_list, ncol = 2, labels = 1:3, byrow = TRUE)
110-
)
111-
112-
expect_doppelganger("byrow is FALSE",
113-
plot_grid(plotlist = p_list, ncol = 2, labels = 1:3, byrow = FALSE)
114-
)
110+
# byrow=FALSE
111+
p_list <- lapply(1:3, \(x) ggplot())
112+
g <- plot_grid(plotlist = p_list, ncol = 2, labels = 1:3, byrow = FALSE)
113+
expect_equal(layer_data(g, 4)$label, 3)
115114
})

0 commit comments

Comments
 (0)