Skip to content

Commit

Permalink
Fix typo exposed by dev waldo (#100)
Browse files Browse the repository at this point in the history
waldo now checks the types of its arguments, detecting this little mistake.
  • Loading branch information
hadley authored Oct 30, 2024
1 parent 31aadcd commit 966ab97
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, tolerance = 1.5e-08)

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, tolerance = 1.5e-08)
})

0 comments on commit 966ab97

Please sign in to comment.