From 966ab9767d2c08db4472b88f5da0de9421fd9487 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Wed, 30 Oct 2024 11:34:54 -0500 Subject: [PATCH] Fix typo exposed by dev waldo (#100) waldo now checks the types of its arguments, detecting this little mistake. --- 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 ae6391a0..2b6628f6 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, tolerance = 1.5e-08) 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, tolerance = 1.5e-08) })