Skip to content

Commit

Permalink
correct tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Melkiades committed Jun 28, 2024
1 parent 5b3aad0 commit 96f5cf4
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/testthat/test-g_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ testthat::test_that("g_lineplot works with no strata (group_var) and allows poin
variables = control_lineplot_vars(group_var = NULL)
)
)
testthat::expect_true(
testthat::expect_false( # no group variable
any(
vapply(
g_lineplot_no_strata$layers, function(x) {
Expand All @@ -184,6 +184,23 @@ testthat::test_that("g_lineplot works with no strata (group_var) and allows poin
)
)
)
g_lineplot_single_strata <- withr::with_options(
opts_partial_match_old,
g_lineplot(
adlb2,
adsl2
)
)
testthat::expect_true( # only one group variable
any(
vapply(
g_lineplot_single_strata$layers, function(x) {
any(grepl(class(x$geom), pattern = "line", ignore.case = TRUE))
},
logical(1L)
)
)
)
})

testthat::test_that("linetype works as well as col with manual scaling and other options (errorbar_width)", {
Expand Down

0 comments on commit 96f5cf4

Please sign in to comment.