Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jgabry committed Dec 12, 2020
1 parent 1ad6b77 commit 1e0cb7f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/testthat/test-model-optimize.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ test_that("optimize() errors with bad combination of arguments", {
"'tol_grad' can't be used when algorithm is 'newton'"
)
expect_error(
mod$optimize(data = data_list, algorithm = "bfgs", history_size = -10),
"not >= 0",
fixed = TRUE
mod$optimize(data = data_list, algorithm = "bfgs", tol_obj = -10),
"not >= 0"
)
expect_error(
mod$optimize(data = data_list, init_alpha = 0.1),
Expand All @@ -106,6 +105,10 @@ test_that("optimize() errors with bad combination of arguments", {
mod$optimize(data = data_list, algorithm = "lbfgs", history_size = 1.5),
"Must be of type 'integerish'"
)
expect_error(
mod$optimize(data = data_list, algorithm = "lbfgs", history_size = -1),
"not >= 1"
)
})

test_that("optimize() works with (L-)BFGS tolerances specified", {
Expand Down

0 comments on commit 1e0cb7f

Please sign in to comment.