run_test_adherence_preprocess() (`actual`) not equal to list(68, 66, 66, 129) (`expected`).

  `actual[[2]]`: 65.0
`expected[[2]]`: 66.0

  `actual[[4]]`: 128.0
`expected[[4]]`: 129.0

nonmonit <- data.frame(start = start, end = end)
return(list(sum(pre$timestamps$excluded), sum(pre$all_periods$opens), sum(pre$timestamps$excluded == 0), nrow(pre$all_periods)))
expect_error(adherence_preprocess(list(1, 2, 3)), "timestamps type error")
expect_error(adherence_preprocess(c(as.POSIXct("2023-01-01")), c(1, 2, 3)), "regimen type error")
expect_error(adherence_preprocess(c(as.POSIXct("2023-01-01")), data.frame(1, 2, 3), c(1, 2, 3)), "patinfo type error")
expect_equal(run_test_adherence_preprocess(), list(68, 66, 66, 129))
expect_equal(run_test_adherence_preprocess2(), list(68, 66, 66, 258))

run_test_adherence_preprocess2() (`actual`) not equal to list(68, 66, 66, 258) (`expected`).

  `actual[[2]]`: 65.0
`expected[[2]]`: 66.0

  `actual[[4]]`: 256.0
`expected[[4]]`: 258.0

read_input("ecap2.xls")$format (`actual`) not equal to "ecap2xls" (`expected`).

`actual`:   "ecap_old"
`expected`: "ecap2xls"

return(list(sum(report$dosecorr == "1"), sum(report$dosetkn == "1"), sum(report$nonmon == "1"), sum(report$doserx)))
expect_error(report_adherence(list(1, 2, 3), timestamps = data.frame(x = 1), med = "123", patinfo = list(start_date = "2020-03-01", end_date = "2020-04-01")), "all_periods missing day")
expect_equal(run_test_report_adherence(), list(35, 58, 0, 129))