tests/testthat/test-is_gregorian_leap_year.R

test_that("multiplication works", {

  expect_equal(is_gregorian_leap_year(c(1990, 1991, 1992, 1993, 1994, 1995))
               , c(FALSE, FALSE, TRUE, FALSE, FALSE, FALSE))

  expect_error(is_gregorian_leap_year(c("1995"))
               , "non-numeric argument to mathematical function")

})

Try the RJalaliDate package in your browser

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

RJalaliDate documentation built on Sept. 11, 2024, 8:26 p.m.