Running ‘testthat.R’ [14s/19s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(fmdates)
  > 
  > test_check("fmdates")
  ── 1. Error: Moon phase dates are correct: (@test-epochs.R#41)  ────────────────
  Invalid timezone of input vector: ""
  1: expect_equal(next_moon_phase(ymd(19770215), "new", want_dt = TRUE), ymd_hms(19770218033741), 
         tolerance = 1) at testthat/test-epochs.R:41
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: next_moon_phase(ymd(19770215), "new", want_dt = TRUE)
  5: to_jd(dates + lubridate::seconds(delta_t(dates)))
  6: lubridate::with_tz(dates, tzone = "UTC")
  7: is.data.frame(time)
  8: dates + lubridate::seconds(delta_t(dates))
  9: dates + lubridate::seconds(delta_t(dates))
  10: add_period_to_date(e2, e1)
  11: update(lt, days = mday(lt) + per@day, hours = hour(lt) + per@hour, minutes = minute(lt) + 
         per@minute, seconds = second(lt) + per@.Data)
  12: update.POSIXt(lt, days = mday(lt) + per@day, hours = hour(lt) + per@hour, minutes = minute(lt) + 
         per@minute, seconds = second(lt) + per@.Data)
  13: do.call(update_date_time, c(list(object, roll = roll, week_start = week_start), list(...)))
  14: (function (object, years = integer(), months = integer(), days = integer(), mdays = integer(), 
         ydays = integer(), wdays = integer(), hours = integer(), minutes = integer(), 
         seconds = double(), tzs = NULL, roll = FALSE, week_start = 7) 
     {
         if (!length(object)) 
             return(object)
         if (length(days) > 0) 
             mdays = days
         updates <- list(year = years, month = months, yday = ydays, mday = mdays, wday = wdays, 
             hour = hours, minute = minutes, second = seconds)
         maxlen <- max(unlist(lapply(updates, length)))
         if (maxlen > 1) {
             for (nm in names(updates)) {
                 len <- length(updates[[nm]])
                 if (len != maxlen && len > 1) 
                     updates[[nm]] <- rep_len(updates[[nm]], maxlen)
             }
         }
         if (is.null(tzs)) 
             tzs <- tz(object)
         updates[["dt"]] <- as.POSIXct(object)
         updates[["roll"]] <- roll
         updates[["tz"]] <- tzs
         updates[["week_start"]] <- week_start
         reclass_date(do.call(C_update_dt, updates), object)
     })(structure(list(sec = 0, min = 0L, hour = 1L, mday = 15L, mon = 1, year = 77L, 
         wday = 2L, yday = 45L, isdst = 0L, zone = "CET", gmtoff = 3600L), .Names = c("sec", 
     "min", "hour", "mday", "mon", "year", "wday", "yday", "isdst", "zone", "gmtoff"), class = c("POSIXlt", 
     "POSIXt"), tzone = c("", "CET", "CEST")), roll = FALSE, week_start = 7, days = 15, 
         hours = 1, minutes = 0, seconds = 48.184)
  15: reclass_date(do.call(C_update_dt, updates), object)
  16: reclass_date.POSIXlt(do.call(C_update_dt, updates), object)
  17: as.POSIXlt(new)
  18: do.call(C_update_dt, updates)
  19: (function (dt, year, month, yday, mday, wday, hour, minute, second, tz = NULL, roll = FALSE, 
         week_start = 7L) 
     {
         .Call(`_lubridate_C_update_dt`, dt, year, month, yday, mday, wday, hour, minute, 
             second, tz, roll, week_start)
     })(year = integer(0), month = integer(0), yday = integer(0), mday = 15, wday = integer(0), 
         hour = 1, minute = 0, second = 48.184, dt = structure(224812800, class = c("POSIXct", 
         "POSIXt"), tzone = ""), roll = FALSE, tz = "", week_start = 7)
  
  ── 2. Error: Chinese NY dates are correct: (@test-epochs.R#57)  ────────────────
  Invalid timezone of input vector: ""
  1: expect_equal(lubridate::as_date(chinese_new_year(2015:2018)), as.Date(c("2015-02-19", 
         "2016-02-08", "2017-01-28", "2018-02-16"))) at testthat/test-epochs.R:57
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: lubridate::as_date(chinese_new_year(2015:2018))
  5: chinese_new_year(2015:2018)
  6: next_moon_phase(soy, "new", tz = "Asia/Shanghai")
  7: to_jd(dates + lubridate::seconds(delta_t(dates)))
  8: lubridate::with_tz(dates, tzone = "UTC")
  9: is.data.frame(time)
  10: dates + lubridate::seconds(delta_t(dates))
  11: dates + lubridate::seconds(delta_t(dates))
  12: add_period_to_date(e2, e1)
  13: update(lt, days = mday(lt) + per@day, hours = hour(lt) + per@hour, minutes = minute(lt) + 
         per@minute, seconds = second(lt) + per@.Data)
  14: update.POSIXt(lt, days = mday(lt) + per@day, hours = hour(lt) + per@hour, minutes = minute(lt) + 
         per@minute, seconds = second(lt) + per@.Data)
  15: do.call(update_date_time, c(list(object, roll = roll, week_start = week_start), list(...)))
  16: (function (object, years = integer(), months = integer(), days = integer(), mdays = integer(), 
         ydays = integer(), wdays = integer(), hours = integer(), minutes = integer(), 
         seconds = double(), tzs = NULL, roll = FALSE, week_start = 7) 
     {
         if (!length(object)) 
             return(object)
         if (length(days) > 0) 
             mdays = days
         updates <- list(year = years, month = months, yday = ydays, mday = mdays, wday = wdays, 
             hour = hours, minute = minutes, second = seconds)
         maxlen <- max(unlist(lapply(updates, length)))
         if (maxlen > 1) {
             for (nm in names(updates)) {
                 len <- length(updates[[nm]])
                 if (len != maxlen && len > 1) 
                     updates[[nm]] <- rep_len(updates[[nm]], maxlen)
             }
         }
         if (is.null(tzs)) 
             tzs <- tz(object)
         updates[["dt"]] <- as.POSIXct(object)
         updates[["roll"]] <- roll
         updates[["tz"]] <- tzs
         updates[["week_start"]] <- week_start
         reclass_date(do.call(C_update_dt, updates), object)
     })(structure(list(sec = c(0, 0, 0, 0), min = c(0L, 0L, 0L, 0L), hour = c(1L, 1L, 
     1L, 1L), mday = c(21L, 21L, 21L, 21L), mon = c(0, 0, 0, 0), year = 115:118, wday = c(3L, 
     4L, 6L, 0L), yday = c(20L, 20L, 20L, 20L), isdst = c(0L, 0L, 0L, 0L), zone = c("CET", 
     "CET", "CET", "CET"), gmtoff = c(3600L, 3600L, 3600L, 3600L)), .Names = c("sec", 
     "min", "hour", "mday", "mon", "year", "wday", "yday", "isdst", "zone", "gmtoff"), class = c("POSIXlt", 
     "POSIXt"), tzone = c("", "CET", "CEST")), roll = FALSE, week_start = 7, days = c(21, 
     21, 21, 21), hours = c(1, 1, 1, 1), minutes = c(0, 0, 0, 0), seconds = c(67.184, 
     68.184, 69.184, 69.184))
  17: reclass_date(do.call(C_update_dt, updates), object)
  18: reclass_date.POSIXlt(do.call(C_update_dt, updates), object)
  19: as.POSIXlt(new)
  20: do.call(C_update_dt, updates)
  21: (function (dt, year, month, yday, mday, wday, hour, minute, second, tz = NULL, roll = FALSE, 
         week_start = 7L) 
     {
         .Call(`_lubridate_C_update_dt`, dt, year, month, yday, mday, wday, hour, minute, 
             second, tz, roll, week_start)
     })(year = integer(0), month = integer(0), yday = integer(0), mday = c(21, 21, 21, 
     21), wday = integer(0), hour = c(1, 1, 1, 1), minute = c(0, 0, 0, 0), second = c(67.184, 
     68.184, 69.184, 69.184), dt = structure(c(1421798400, 1453334400, 1484956800, 1516492800
     ), class = c("POSIXct", "POSIXt"), tzone = ""), roll = FALSE, tz = "", week_start = 7)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 156 SKIPPED: 0 FAILED: 2
  1. Error: Moon phase dates are correct: (@test-epochs.R#41) 
  2. Error: Chinese NY dates are correct: (@test-epochs.R#57) 
  
  Error: testthat unit tests failed
  Execution halted