tests/testthat/test-function-adjust_time.R

#
# This test file has been generated by kwb.test::create_test_files()
# launched by user mzamzo on 2021-11-25 14:30:32.
# Your are strongly encouraged to modify the dummy functions
# so that real cases are tested. You should then delete this comment.
#

test_that("adjust_time() works", {

  expect_error(
    kwb.misa:::adjust_time()
    # argument "time_vector" is missing, with no default
  )

  result <- kwb.misa:::adjust_time(
    time_vector = as.POSIXct(c("2000-01-01 00:12", "2000-01-01 00:30")),
    time_interval = 15*60)
  expect_identical(
    object = result,
    expected = as.POSIXct(c("2000-01-01 00:15", "2000-01-01 00:30")))

})
KWB-R/kwb.misa documentation built on March 18, 2022, 9:56 a.m.