Running ‘testthat.R’ [15s/16s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(fmdates)
  > 
  > test_check("fmdates")
  1. Error: Hong Kong calendars are correct (@test-calendars.R#232) --------------
  Invalid timezone of input vector: "GB"
  1: expect_identical(is_good(h2016, hk), rep(FALSE, NROW(h2016))) at testthat/test-calendars.R:232
  2: identical(object, expected)
  3: is_good(h2016, hk)
  4: is_good.HKHKCalendar(h2016, hk)
  5: lubridate::yday(chinese_new_year(lubridate::year(dates)))
  6: chinese_new_year(lubridate::year(dates))
  7: next_moon_phase(soy, "new", tz = "Asia/Shanghai")
  8: to_jd(dates + lubridate::seconds(delta_t(dates)))
  9: lubridate::with_tz(dates, tzone = "UTC")
  10: is.data.frame(time)
  11: dates + lubridate::seconds(delta_t(dates))
  12: dates + lubridate::seconds(delta_t(dates))
  13: add_period_to_date(e2, e1)
  14: update(lt, days = mday(lt) + per@day, hours = hour(lt) + per@hour, minutes = minute(lt) + 
         per@minute, seconds = second(lt) + per@.Data)
  15: update.POSIXt(lt, days = mday(lt) + per@day, hours = hour(lt) + per@hour, minutes = minute(lt) + 
         per@minute, seconds = second(lt) + per@.Data)
  16: do.call(update_date_time, c(list(object, roll = roll, week_start = week_start), list(...)))
  17: (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)
             }
         }
         updates[["dt"]] <- as.POSIXct(object)
         updates[["roll"]] <- roll
         updates[["tz"]] <- if (is.null(tzs)) 
             tz(object)
         else tzs
         updates[["week_start"]] <- week_start
         reclass_date(do.call(C_update_dt, updates), object)
     })(structure(list(sec = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), min = c(0L, 
     0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), hour = c(0L, 0L, 
     0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), mday = c(21L, 21L, 21L, 
     21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L, 21L), mon = c(0, 
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), year = c(116L, 116L, 116L, 116L, 
     116L, 116L, 116L, 116L, 116L, 116L, 116L, 116L, 116L, 116L, 116L, 116L, 116L), wday = c(4L, 
     4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L), yday = c(20L, 20L, 
     20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L, 20L), isdst = c(0L, 
     0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), zone = c("GMT", 
     "GMT", "GMT", "GMT", "GMT", "GMT", "GMT", "GMT", "GMT", "GMT", "GMT", "GMT", "GMT", 
     "GMT", "GMT", "GMT", "GMT"), gmtoff = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
     0L, 0L, 0L, 0L, 0L, 0L)), .Names = c("sec", "min", "hour", "mday", "mon", "year", 
     "wday", "yday", "isdst", "zone", "gmtoff"), class = c("POSIXlt", "POSIXt"), tzone = c("GB", 
     "GMT", "BST")), roll = FALSE, week_start = 7, days = c(21, 21, 21, 21, 21, 21, 21, 
     21, 21, 21, 21, 21, 21, 21, 21, 21, 21), hours = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
     0, 0, 0, 0, 0, 0, 0), minutes = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
     0), seconds = c(68.184, 68.184, 68.184, 68.184, 68.184, 68.184, 68.184, 68.184, 68.184, 
     68.184, 68.184, 68.184, 68.184, 68.184, 68.184, 68.184, 68.184))
  18: reclass_date(do.call(C_update_dt, updates), object)
  19: reclass_date.POSIXlt(do.call(C_update_dt, updates), object)
  20: as.POSIXlt(new)
  21: do.call(C_update_dt, updates)
  22: (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, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21), wday = integer(0), hour = c(0, 
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), minute = c(0, 0, 0, 0, 0, 0, 0, 
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0), second = c(68.184, 68.184, 68.184, 68.184, 68.184, 
     68.184, 68.184, 68.184, 68.184, 68.184, 68.184, 68.184, 68.184, 68.184, 68.184, 68.184, 
     68.184), dt = structure(c(1453334400, 1453334400, 1453334400, 1453334400, 1453334400, 
     1453334400, 1453334400, 1453334400, 1453334400, 1453334400, 1453334400, 1453334400, 
     1453334400, 1453334400, 1453334400, 1453334400, 1453334400), class = c("POSIXct", 
     "POSIXt"), tzone = "GB"), roll = FALSE, tz = "GB", week_start = 7)
  
  2. Error: year_frac works as expected (@test-counters.R#32) --------------------
  CCTZ: Unrecognized output timezone: "Australia/Sydney"
  1: expect_equal(year_frac(ymd_hms(20140827100000, tz = "Australia/Sydney"), ymd_hms(20141008100000, 
         tz = "Australia/Sydney"), "act/365") * 365, 42) at testthat/test-counters.R:32
  2: compare(object, expected, ...)
  3: year_frac(ymd_hms(20140827100000, tz = "Australia/Sydney"), ymd_hms(20141008100000, 
         tz = "Australia/Sydney"), "act/365")
  4: lubridate::as_date(date1)
  5: ymd_hms(20140827100000, tz = "Australia/Sydney")
  6: .parse_xxx_hms(..., orders = c("ymdTz", "ymdT"), quiet = quiet, tz = tz, locale = locale, 
         truncated = truncated)
  7: parse_date_time(dates, orders, tz = tz, quiet = quiet, locale = locale)
  8: .local_parse(x[to_parse], TRUE)
  9: .parse_date_time(x, formats, tz = tz, quiet = quiet, locale = locale)
  10: .strptime(x, formats[[1]], tz = tz, quiet = quiet, locale = locale)
  11: force_tz(out, tzone = tz)
  12: C_force_tz(time, tz = tzone, roll)
  
  3. Error: Moon phase dates are correct: (@test-epochs.R#41) --------------------
  Invalid timezone of input vector: "GB"
  1: expect_equal(next_moon_phase(ymd(19770215), "new", want_dt = TRUE), ymd_hms(19770218033741), 
         tolerance = 1) at testthat/test-epochs.R:41
  2: compare(object, expected, ...)
  3: next_moon_phase(ymd(19770215), "new", want_dt = TRUE)
  4: to_jd(dates + lubridate::seconds(delta_t(dates)))
  5: lubridate::with_tz(dates, tzone = "UTC")
  6: is.data.frame(time)
  7: dates + lubridate::seconds(delta_t(dates))
  8: dates + lubridate::seconds(delta_t(dates))
  9: add_period_to_date(e2, e1)
  10: update(lt, days = mday(lt) + per@day, hours = hour(lt) + per@hour, minutes = minute(lt) + 
         per@minute, seconds = second(lt) + per@.Data)
  11: update.POSIXt(lt, days = mday(lt) + per@day, hours = hour(lt) + per@hour, minutes = minute(lt) + 
         per@minute, seconds = second(lt) + per@.Data)
  12: do.call(update_date_time, c(list(object, roll = roll, week_start = week_start), list(...)))
  13: (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)
             }
         }
         updates[["dt"]] <- as.POSIXct(object)
         updates[["roll"]] <- roll
         updates[["tz"]] <- if (is.null(tzs)) 
             tz(object)
         else tzs
         updates[["week_start"]] <- week_start
         reclass_date(do.call(C_update_dt, updates), object)
     })(structure(list(sec = 0, min = 0L, hour = 0L, mday = 15L, mon = 1, year = 77L, 
         wday = 2L, yday = 45L, isdst = 0L, zone = "GMT", gmtoff = 0L), .Names = c("sec", 
     "min", "hour", "mday", "mon", "year", "wday", "yday", "isdst", "zone", "gmtoff"), class = c("POSIXlt", 
     "POSIXt"), tzone = c("GB", "GMT", "BST")), roll = FALSE, week_start = 7, days = 15, 
         hours = 0, minutes = 0, seconds = 48.184)
  14: reclass_date(do.call(C_update_dt, updates), object)
  15: reclass_date.POSIXlt(do.call(C_update_dt, updates), object)
  16: as.POSIXlt(new)
  17: do.call(C_update_dt, updates)
  18: (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 = 0, minute = 0, second = 48.184, dt = structure(224812800, class = c("POSIXct", 
         "POSIXt"), tzone = "GB"), roll = FALSE, tz = "GB", week_start = 7)
  
  4. Error: Chinese NY dates are correct: (@test-epochs.R#57) --------------------
  Invalid timezone of input vector: "GB"
  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: compare(object, expected, ...)
  3: lubridate::as_date(chinese_new_year(2015:2018))
  4: chinese_new_year(2015:2018)
  5: next_moon_phase(soy, "new", tz = "Asia/Shanghai")
  6: to_jd(dates + lubridate::seconds(delta_t(dates)))
  7: lubridate::with_tz(dates, tzone = "UTC")
  8: is.data.frame(time)
  9: dates + lubridate::seconds(delta_t(dates))
  10: dates + lubridate::seconds(delta_t(dates))
  11: add_period_to_date(e2, e1)
  12: update(lt, days = mday(lt) + per@day, hours = hour(lt) + per@hour, minutes = minute(lt) + 
         per@minute, seconds = second(lt) + per@.Data)
  13: update.POSIXt(lt, days = mday(lt) + per@day, hours = hour(lt) + per@hour, minutes = minute(lt) + 
         per@minute, seconds = second(lt) + per@.Data)
  14: do.call(update_date_time, c(list(object, roll = roll, week_start = week_start), list(...)))
  15: (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)
             }
         }
         updates[["dt"]] <- as.POSIXct(object)
         updates[["roll"]] <- roll
         updates[["tz"]] <- if (is.null(tzs)) 
             tz(object)
         else 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(0L, 0L, 
     0L, 0L), 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("GMT", 
     "GMT", "GMT", "GMT"), gmtoff = c(0L, 0L, 0L, 0L)), .Names = c("sec", "min", "hour", 
     "mday", "mon", "year", "wday", "yday", "isdst", "zone", "gmtoff"), class = c("POSIXlt", 
     "POSIXt"), tzone = c("GB", "GMT", "BST")), roll = FALSE, week_start = 7, days = c(21, 
     21, 21, 21), hours = c(0, 0, 0, 0), minutes = c(0, 0, 0, 0), seconds = c(67.184, 
     68.184, 69.184, 69.184))
  16: reclass_date(do.call(C_update_dt, updates), object)
  17: reclass_date.POSIXlt(do.call(C_update_dt, updates), object)
  18: as.POSIXlt(new)
  19: do.call(C_update_dt, updates)
  20: (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(0, 0, 0, 0), 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 = "GB"), roll = FALSE, tz = "GB", week_start = 7)
  
  testthat results ================================================================
  OK: 441 SKIPPED: 0 FAILED: 4
  1. Error: Hong Kong calendars are correct (@test-calendars.R#232) 
  2. Error: year_frac works as expected (@test-counters.R#32) 
  3. Error: Moon phase dates are correct: (@test-epochs.R#41) 
  4. Error: Chinese NY dates are correct: (@test-epochs.R#57) 
  
  Error: testthat unit tests failed
  Execution halted