Skip to content

Commit 18baff5

Browse files
committed
add test
1 parent f4dce32 commit 18baff5

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/testthat/test-check_inputs.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,3 +256,15 @@ test_that("check_inputs fails when not all parameters are passed, and warning wh
256256
"Some supplied `parameters` are not supported by the model and will be ignored: V2, Q."
257257
)
258258
})
259+
260+
test_that("check_inputs warns when no parameters are defined as model attribute", {
261+
model <- function() {}
262+
data <- data.frame(time = 1:3, dv = c(1, 2, 3))
263+
parameters <- list(CL = 1) # , V = 10)
264+
omega <- matrix(c(0.1, 0, 0, 0.1), nrow = 2)
265+
regimen <- list(dose = 100, interval = 12)
266+
expect_warning(
267+
check_inputs(model, data, parameters, omega, regimen, NULL, "MAP"),
268+
"Parameter information for model missing"
269+
)
270+
})

0 commit comments

Comments
 (0)