tests/testthat/test-function-stringToPosix.R

#
# This test file has been generated by kwb.test::create_test_files()
#

test_that("stringToPosix() works", {

  expect_error(
    kwb.datetime:::stringToPosix(x = 1, ... = 1)
    # x must be a character vector of length one.
  )
   expect_error(
    kwb.datetime:::stringToPosix(x = "a", ... = 1)
    # Timestamp 'a' does not match any of these formats: '%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d'
  )

})
KWB-R/kwb.datetime documentation built on July 9, 2021, 10:28 p.m.