tests/testthat/test-wrap.R

test_that("wrap.hms", {
  expect_identical(dtt_wrap(NA_hms_[-1]), NA_hms_[-1])
  expect_identical(dtt_wrap(NA_hms_), NA_hms_)
  expect_identical(dtt_wrap(hms::as_hms("00:00:00")), hms::as_hms("00:00:00"))
  expect_identical(dtt_wrap(hms::as_hms("23:59:59")), hms::as_hms("23:59:59"))
  expect_identical(dtt_wrap(hms::as_hms("24:00:00")), hms::as_hms("00:00:00"))
  expect_identical(dtt_wrap(hms::as_hms(-2)), hms::as_hms("23:59:58"))
})

Try the dttr2 package in your browser

Any scripts or data that you put into this service are public.

dttr2 documentation built on Sept. 19, 2021, 9:06 a.m.