Skip to content

Commit

Permalink
Merge pull request #3 from teunbrand/ggplot2_3.5.0
Browse files Browse the repository at this point in the history
expect plots to have the same length as `ggplot()`
  • Loading branch information
dmenne committed Jan 22, 2024
2 parents bf49ed5 + eef273a commit fdd4a4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test_plot_breathtestfit.R
Expand Up @@ -8,7 +8,7 @@ test_that("Plot layers match expectations",{
expect_s3_class(p, "ggplot")
expect_gt(max(layer_data(p)$y), 25)
expect_equal(nlayers(p), 4)
expect_equal(length(p), 9)
expect_equal(length(p), length(ggplot()))
expect_equal(nlevels(layer_data(p)$PANEL), 10)
})

Expand Down Expand Up @@ -40,7 +40,7 @@ test_that("Plot multiple groups with repeats",{
p = plot(x)
expect_s3_class(p, "ggplot")
expect_equal(nlayers(p), 4)
expect_equal(length(p), 9)
expect_equal(length(p), length(ggplot()))
expect_equal(nlevels(layer_data(p)$PANEL), 6)
})

Expand All @@ -62,7 +62,7 @@ test_that("Plot multiple groups without repeats",{
p = plot(x)
expect_s3_class(p, "ggplot")
expect_equal(nlayers(p), 4)
expect_equal(length(p), 9)
expect_equal(length(p), length(ggplot()))
expect_equal(nlevels(layer_data(p)$PANEL), 15)
})

Expand All @@ -78,7 +78,7 @@ test_that("Plot multiple groups data only (no fit)",{
p = plot(x) # Plots raw data only
expect_s3_class(p, "ggplot")
expect_equal(nlayers(p), 1)
expect_equal(length(p), 9)
expect_equal(length(p), length(ggplot()))
expect_equal(nlevels(layer_data(p)$PANEL), 6)
})

Expand Down

0 comments on commit fdd4a4c

Please sign in to comment.