Skip to content

Commit

Permalink
Merge branch '860-create-an-increments-rule-based-on-limiting-the-pro…
Browse files Browse the repository at this point in the history
…bability-of-toxicity' of github.com:openpharma/crmPack into 860-create-an-increments-rule-based-on-limiting-the-probability-of-toxicity
  • Loading branch information
Puzzled-Face committed Sep 24, 2024
2 parents c1bf1bf + f453f9a commit c13af55
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions tests/testthat/test-Rules-validity.R
Original file line number Diff line number Diff line change
Expand Up @@ -1650,18 +1650,21 @@ test_that("v_nextbest_ordinal validates correctly", {
x <- NextBestOrdinal(grade = 1L, rule = NextBestMTD(target = 0.3, derive = mean))
})

expect_error({
x <- NextBestOrdinal(grade = pi, rule = NextBestMTD(target = 0.3, derive = mean))
},
"grade must be a positive integer"
expect_error(
{
x <- NextBestOrdinal(grade = pi, rule = NextBestMTD(target = 0.3, derive = mean))
},
"grade must be a positive integer"
)
expect_error({
x <- NextBestOrdinal(grade = -2, rule = NextBestMTD(target = 0.3, derive = mean))
},
"grade must be a positive integer"
expect_error(
{
x <- NextBestOrdinal(grade = -2, rule = NextBestMTD(target = 0.3, derive = mean))
},
"grade must be a positive integer"
)

expect_error({
expect_error(
{
x <- NextBestOrdinal(grade = 1L, rule = CohortSizeConst(3))
},
paste0(
Expand Down

0 comments on commit c13af55

Please sign in to comment.