@@ -21,11 +21,11 @@ test_that("negative and positive values are handled separately", {
2121 p <- ggplot(df , aes(x , y , fill = factor (g ))) + geom_col()
2222 dat <- layer_data(p )
2323
24- expect_equal(dat $ ymin [dat $ x == 1 ], c(- 1 , 0 , 1 ))
25- expect_equal(dat $ ymax [dat $ x == 1 ], c(0 , 1 , 2 ))
24+ expect_equal(dat $ ymin [dat $ x == 1 ], c(0 , - 1 , 1 ))
25+ expect_equal(dat $ ymax [dat $ x == 1 ], c(1 , 0 , 2 ))
2626
27- expect_equal(dat $ ymin [dat $ x == 2 ], c(- 3 , 0 ))
28- expect_equal(dat $ ymax [dat $ x == 2 ], c(0 , 2 ))
27+ expect_equal(dat $ ymin [dat $ x == 2 ], c(0 , - 3 ))
28+ expect_equal(dat $ ymax [dat $ x == 2 ], c(2 , 0 ))
2929})
3030
3131test_that(" can request reverse stacking" , {
@@ -36,7 +36,7 @@ test_that("can request reverse stacking", {
3636 p <- ggplot(df , aes(1 , y , fill = g )) +
3737 geom_col(position = position_stack(reverse = TRUE ))
3838 dat <- layer_data(p )
39- expect_equal(dat $ ymin , c(- 2 , - 3 , 0 , 2 ))
39+ expect_equal(dat $ ymin , c(- 2 , 0 , - 3 , 2 ))
4040})
4141
4242test_that(" data with no extent is stacked correctly" , {
0 commit comments