diff --git a/tests/testthat/test-derive_extreme_event.R b/tests/testthat/test-derive_extreme_event.R index 4499b41218..2bc0494102 100644 --- a/tests/testthat/test-derive_extreme_event.R +++ b/tests/testthat/test-derive_extreme_event.R @@ -394,7 +394,7 @@ test_that("derive_extreme_event Test 5: derive_vars_extreme_event", { ## Test 6: Cover event$order ---- test_that("derive_extreme_event Test 6: Cover event$order", { adsl_ext <- tribble( - ~STUDYID, ~USUBJID, ~TRTEDT, ~DTHDT, + ~STUDYID, ~USUBJID, ~TRTEDT, ~DTHDT, "PILOT01", "01-1130", ymd("2014-08-16"), ymd("2014-09-13"), "PILOT01", "01-1133", ymd("2013-04-28"), ymd(""), "PILOT01", "01-1211", ymd("2013-01-12"), ymd(""), @@ -420,12 +420,12 @@ test_that("derive_extreme_event Test 6: Cover event$order", { ) expected_output <- tribble( - ~STUDYID, ~USUBJID, ~TRTEDT, ~DTHDT, ~LSTALVDT, ~DTHFL, - "PILOT01", "01-1130", ymd("2014-08-16"), ymd("2014-09-13"), ymd("2014-09-13"), "Y", - "PILOT01", "01-1133", ymd("2013-04-28"), ymd(""), ymd("2013-05-01"), "N", - "PILOT01", "01-1211", ymd("2013-01-12"), ymd(""), ymd("2013-01-12"), "N", - "PILOT01", "09-1081", ymd("2014-04-27"), ymd(""), ymd("2014-05-10"), "N", - "PILOT01", "09-1088", ymd("2014-10-09"), ymd("2014-11-01"), ymd("2014-11-01"), "Y", + ~STUDYID, ~USUBJID, ~TRTEDT, ~DTHDT, ~LSTALVDT, ~DTHFL, + "PILOT01", "01-1130", ymd("2014-08-16"), ymd("2014-09-13"), ymd("2014-09-13"), "Y", + "PILOT01", "01-1133", ymd("2013-04-28"), ymd(""), ymd("2013-05-01"), "N", + "PILOT01", "01-1211", ymd("2013-01-12"), ymd(""), ymd("2013-01-12"), "N", + "PILOT01", "09-1081", ymd("2014-04-27"), ymd(""), ymd("2014-05-10"), "N", + "PILOT01", "09-1088", ymd("2014-10-09"), ymd("2014-11-01"), ymd("2014-11-01"), "Y", ) actual_output <- derive_vars_extreme_event(