From da5b4f6b614598eab7821cea9bef5e57696171e1 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 24 Jan 2024 09:57:39 +0200 Subject: [PATCH] Fix tests with v2.34.1 --- tests/testthat/test-model-optimize.R | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/testthat/test-model-optimize.R b/tests/testthat/test-model-optimize.R index 85163ae9..16a18faa 100644 --- a/tests/testthat/test-model-optimize.R +++ b/tests/testthat/test-model-optimize.R @@ -117,9 +117,9 @@ test_that("optimize() works with (L-)BFGS tolerances specified", { # using values that aren't the defaults init_alpha = 0.002, tol_obj = 2e-11, - tol_rel_obj = 10001, + tol_rel_obj = 1000, tol_grad = 5e-07, - tol_rel_grad = 10000001, + tol_rel_grad = 1000000, tol_param = 5e-07, history_size = 6, seed = 123 @@ -128,12 +128,10 @@ test_that("optimize() works with (L-)BFGS tolerances specified", { metadata <- fit$metadata() expect_equal(metadata$init_alpha, 0.002) expect_equal(metadata$tol_obj, 2e-11) - expect_equal(metadata$tol_rel_obj, 10001) - # https://github.com/stan-dev/cmdstan/issues/1242 - # expect_equal(metadata$tol_grad, 5e-07) - expect_equal(metadata$tol_rel_grad, 10000001) - # https://github.com/stan-dev/cmdstan/issues/1242 - # expect_equal(metadata$tol_param, 5e-07) + expect_equal(metadata$tol_rel_obj, 1000) + expect_equal(metadata$tol_grad, 5e-07) + expect_equal(metadata$tol_rel_grad, 1000000) + expect_equal(metadata$tol_param, 5e-07) expect_equal(metadata$history_size, 6) })