1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-13 02:32:07 +02:00

unit tests

This commit is contained in:
2023-02-14 15:59:40 +01:00
parent a4cd38c433
commit 8d37c75860
8 changed files with 13 additions and 36 deletions

View File

@ -49,15 +49,8 @@ expect_error(age(
reference = c("2019-01-01", "2019-01-01")
))
# expect_warning(age(
x = c("1980-01-01", "1985-01-01", "1990-01-01"),
reference = "1975-01-01"
))
# expect_warning(age(
x = c("1800-01-01", "1805-01-01", "1810-01-01"),
reference = "2019-01-01"
))
# expect_warning(age(x = c("1980-01-01", "1985-01-01", "1990-01-01"), reference = "1975-01-01"))
# expect_warning(age(x = c("1800-01-01", "1805-01-01", "1810-01-01"), reference = "2019-01-01"))
expect_equal(
length(age(x = c("2019-01-01", NA), na.rm = TRUE)),