tests/testthat/test-function-daysPerMonth.R

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

test_that("daysPerMonth() works", {

  kwb.datetime:::daysPerMonth(date = as.POSIXct("2018-06-03 23:50:00"))
   expect_error(
    kwb.datetime:::daysPerMonth(date = 1)
    # 'origin' must be supplied
  )
   expect_error(
    kwb.datetime:::daysPerMonth(date = "a")
    # character string is not in a standard unambiguous format
  )
   expect_error(
    kwb.datetime:::daysPerMonth(date = TRUE)
    # do not know how to convert 'date' to class “POSIXlt”
  )

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