Skip to content

Commit

Permalink
Move vdiffr to a suggested package
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed May 1, 2024
1 parent d8a3d7f commit ce31210
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ Imports:
ggplot2,
ggforce,
stringi,
crayon,
vdiffr
crayon
Suggests:
devtools,
rxode2 (> 2.0.13),
lotri,
testthat (>= 3.0.0),
xgxr
xgxr,
vdiffr
Config/testthat/edition: 3
28 changes: 16 additions & 12 deletions tests/testthat/test-data-import.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,25 @@ test_that("single endpoint import", {

rx <- monolix2rx(file.path(pkgTheo, "theophylline_project.mlxtran"))
expect_true(inherits(rx, "rxUi"))
vdiffr::expect_doppelganger("single-endpoint-theo",
plot(rx))
vdiffr::expect_doppelganger("single-endpoint-theo-p1",
plot(rx, page=1))
vdiffr::expect_doppelganger("single-endpoint-theo-pall",
plot(rx, page=TRUE))
if (requireNamespace("vdiffr", quietly=TRUE)) {
vdiffr::expect_doppelganger("single-endpoint-theo",
plot(rx))
vdiffr::expect_doppelganger("single-endpoint-theo-p1",
plot(rx, page=1))
vdiffr::expect_doppelganger("single-endpoint-theo-pall",
plot(rx, page=TRUE))
}
})

test_that("multiple endpoint import", {
rx <- monolix2rx(file.path(pkgTheo, "parent_metabolite_project.mlxtran"))
expect_true(inherits(rx, "rxUi"))
vdiffr::expect_doppelganger("multiple-endpoint-theo",
plot(rx))
vdiffr::expect_doppelganger("multiple-endpoint-theo-p1",
plot(rx, page=1))
vdiffr::expect_doppelganger("multiple-endpoint-theo-pall",
plot(rx, page=TRUE))
if (requireNamespace("vdiffr", quietly=TRUE)) {
vdiffr::expect_doppelganger("multiple-endpoint-theo",
plot(rx))
vdiffr::expect_doppelganger("multiple-endpoint-theo-p1",
plot(rx, page=1))
vdiffr::expect_doppelganger("multiple-endpoint-theo-pall",
plot(rx, page=TRUE))
}
})

0 comments on commit ce31210

Please sign in to comment.