From dfdbc7f3860e21722ec49a71981a0eadb4283645 Mon Sep 17 00:00:00 2001 From: hoxo-m Date: Fri, 6 Dec 2024 23:43:07 +0900 Subject: [PATCH] fix for MacOS --- tests/testthat/test-generate_setup_code.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-generate_setup_code.R b/tests/testthat/test-generate_setup_code.R index 95a1a8a..6c4e4c5 100644 --- a/tests/testthat/test-generate_setup_code.R +++ b/tests/testthat/test-generate_setup_code.R @@ -58,7 +58,7 @@ test_that("compute_reward fit well", { df_expected <- data.frame( linear = c(0.98473088, 1, 1, 0.98473088), emax = c(0.97718847, 1, 1, 0.97718847), - sigEmax = c(0.9839088, 1, 1, 0.9839088), + sigEmax = c(0.9839088, 1, 1, 0.9839088), # MacOS: 0.983908858 row.names = optimization_metrics ) @@ -75,7 +75,7 @@ test_that("compute_reward fit well", { obj$optimization_metric <- optimization_metric act <- obj$compute_reward(model_name, sim_doses, sim_resps) expected <- df_expected[optimization_metric, model_name] - expect_equal(act, expected) + expect_equal(act, expected, tolerance = 1e-7) } }