Skip to content

Commit 1e0cb7f

Browse files
committed
fix test
1 parent 1ad6b77 commit 1e0cb7f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/testthat/test-model-optimize.R

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,8 @@ test_that("optimize() errors with bad combination of arguments", {
8484
"'tol_grad' can't be used when algorithm is 'newton'"
8585
)
8686
expect_error(
87-
mod$optimize(data = data_list, algorithm = "bfgs", history_size = -10),
88-
"not >= 0",
89-
fixed = TRUE
87+
mod$optimize(data = data_list, algorithm = "bfgs", tol_obj = -10),
88+
"not >= 0"
9089
)
9190
expect_error(
9291
mod$optimize(data = data_list, init_alpha = 0.1),
@@ -106,6 +105,10 @@ test_that("optimize() errors with bad combination of arguments", {
106105
mod$optimize(data = data_list, algorithm = "lbfgs", history_size = 1.5),
107106
"Must be of type 'integerish'"
108107
)
108+
expect_error(
109+
mod$optimize(data = data_list, algorithm = "lbfgs", history_size = -1),
110+
"not >= 1"
111+
)
109112
})
110113

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

0 commit comments

Comments
 (0)