From 9577ef2e3567b6c2d2502245912c71c2b464e8d5 Mon Sep 17 00:00:00 2001 From: Shiyu Chen Date: Tue, 5 Nov 2024 21:26:30 +0000 Subject: [PATCH] Removed tolerance from expect_equal --- tests/testthat/test-derive_study_day.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-derive_study_day.R b/tests/testthat/test-derive_study_day.R index 2b6628f..5dfbe57 100644 --- a/tests/testthat/test-derive_study_day.R +++ b/tests/testthat/test-derive_study_day.R @@ -59,7 +59,7 @@ test_that("`derive_study_day()` works as expected for invalid input", { test_that("`calculate_study_day()` works as expected for valid input", { res <- derive_study_day(ae, dm, "AESTDTC", "RFSTDTC", "AESTDY") expected <- c(-31L, 1L, NA) - expect_equal(res$AESTDY, expected, tolerance = 1.5e-08) + expect_equal(res$AESTDY, expected) df <- data.frame( USUBJID = c("study123-123", "study123-124", "study123-125"), @@ -68,5 +68,5 @@ test_that("`calculate_study_day()` works as expected for valid input", { stringsAsFactors = FALSE ) res1 <- derive_study_day(df, df, "AESTDTC", "RFSTDTC", "AESTDY") - expect_equal(res1$AESTDY, expected, tolerance = 1.5e-08) + expect_equal(res1$AESTDY, expected) })