tests/testthat/test-sunrise_sunset.R

test_that("sunrise() returns error on incorrect parameters", {

})

test_that("sunset() returns error on incorrect parameters", {

})

test_that("sunrise in the Netherlands", {
  expect_s3_class(
    sunrise("2016-01-01", 5, 53),
    c("POSIXct", "POSIXt")
  )
  expect_true(sunrise("2016-01-01", 5, 53) <
    as.POSIXct("2016-01-01 13:00:00 UTC", tz = "UTC"))
})

test_that("sunset in the Netherlands", {
  expect_s3_class(
    sunset("2016-01-01", 5, 53),
    c("POSIXct", "POSIXt")
  )
  expect_true(sunset("2016-01-01", 5, 53) >
    as.POSIXct("2016-01-01 13:00:00 UTC", tz = "UTC"))
})

Try the bioRad package in your browser

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

bioRad documentation built on Oct. 20, 2023, 5:06 p.m.