Skip to content

Commit

Permalink
fix r-devel inconsistency 2024-11-21
Browse files Browse the repository at this point in the history
  • Loading branch information
VeruGHub committed Nov 21, 2024
1 parent bc10283 commit cc1058d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/testthat/test-period_to_days.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ test_that("period_to_days throws error with badly formatted dates", {
test_that("period_to_days works with character input", {

expect_identical(period_to_days(period = "2008-09-27"),
as.Date("2008-09-27"))
seq.Date(from = as.Date("2008-09-27"), to = as.Date("2008-09-27"), by = 1))
expect_identical(period_to_days(period = c("2008-09-27", "2008-01-27")),
as.Date(c("2008-09-27", "2008-01-27")))
c(seq.Date(from = as.Date("2008-09-27"), to = as.Date("2008-09-27"), by = 1),
seq.Date(from = as.Date("2008-01-27"), to = as.Date("2008-01-27"), by = 1)))
expect_identical(period_to_days(period = c("2008-01-27:2008-09-27")),
seq.Date(from = as.Date("2008-01-27"), to = as.Date("2008-09-27"), by = 1))
expect_identical(period_to_days(period = "2008-01-27:2008-09-27"),
Expand Down

0 comments on commit cc1058d

Please sign in to comment.