Skip to content

Commit

Permalink
Removed tolerance from expect_equal
Browse files Browse the repository at this point in the history
  • Loading branch information
Shiyu Chen committed Nov 5, 2024
1 parent 966ab97 commit 9577ef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-derive_study_day.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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)
})

0 comments on commit 9577ef2

Please sign in to comment.