Skip to content

Commit

Permalink
fix test; clean up unrelated warnings in other test
Browse files Browse the repository at this point in the history
  • Loading branch information
roninsightrx committed Apr 3, 2024
1 parent 262fc38 commit 95a5cb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test_apply_duration_scale.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ test_that("infusion length scaled using parameter", {
duration_scale = "SCALE",
parameters = list(CL = 5, V = 50, SCALE = 1.6)
)
expect_equal(dur3$t_inf, rep(1.6, 12))
expect_equal(dur4$t_inf, rep(1.6, 12))
})

test_that("infusion length scaled", {
dur4 <- apply_duration_scale(
regimen = reg_combo,
duration_scale = c(1, 1.5, 2)
)
expect_equal(dur4$t_inf, c(1.5, 2, 0))
expect_equal(dur4$t_inf, c(1.5, 2, 0, 0))
})
4 changes: 2 additions & 2 deletions tests/testthat/test_timevar_cov.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mod <- new_ode_model(
pk_code = "CLi = CL + CRCL",
obs = list(cmt = 2, scale = "V"),
covariates = list(CRCL = new_covariate(5)), declare_variables = "CLi",
cpp = TRUE
cpp = FALSE
)

test_that("timevarying covariates handled", {
Expand Down Expand Up @@ -103,7 +103,7 @@ test_that("timevarying covariates are interpolated and affect PK", {
## Check interpolated covariates actually affect simulated conc
expect_equal(
round(sim2_inter$y, 3)[1:10],
c(0, 0.32, 0.611, 0.788, 1.205, 1.531, 1.708, 2.098, 2.379, 2.503),
c(0, 0.32, 0.611, 0.788, 1.205, 1.531, 1.708, 2.098, 2.379, 2.503)
)
expect_equal(
round(sim2_locf$y, 3)[1:10],
Expand Down

0 comments on commit 95a5cb0

Please sign in to comment.