tests/testthat/test-vld.R

test_that("vld_time", {
  expect_true(vld_time(hms::as_hms("19:03:14")))
  expect_true(vld_time(hms::as_hms("19:03:14")))
  expect_true(vld_time(hms::as_hms(1)))
  expect_false(vld_time(1))
  expect_false(vld_time(hms::hms(1)[-1]))
  expect_false(vld_time(hms::hms(NA)))
  expect_false(vld_time(hms::hms(c(1, 1))))
})

Try the dttr2 package in your browser

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

dttr2 documentation built on Nov. 14, 2023, 5:10 p.m.