R Under development (unstable) (2023-12-13 r85679 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > #### doRUnit.R --- Run RUnit tests > ####------------------------------------------------------------------------ > > ### Origianlly follows Gregor Gojanc's example in CRAN package 'gdata' > ### and the corresponding section in the R Wiki: > ### http://wiki.r-project.org/rwiki/doku.php?id=developers:runit > > ### MM: Vastly changed: This should also be "runnable" for *installed* > ## package which has no ./tests/ > ## ----> put the bulk of the code e.g. in ../inst/unitTests/runTests.R : > > if(require("RUnit", quietly = TRUE)) { + + ## --- Setup --- + + wd <- getwd() + pkg <- sub("\\.Rcheck$", '', basename(dirname(wd))) + + library(package=pkg, character.only=TRUE) + + path <- system.file("unitTests", package = pkg) + + stopifnot(file.exists(path), file.info(path.expand(path))$isdir) + + source(file.path(path, "runTests.R"), echo = TRUE) + } > pkg <- "timeDate" > if (require("RUnit", quietly = TRUE)) { + library(package = pkg, character.only = TRUE) + if (!(exists("path") && file.exists(path))) + .... [TRUNCATED] Executing test function test.POSIX ... [1] "2006-01-01 GMT" "2006-02-01 GMT" "2006-03-01 GMT" "2006-04-01 GMT" [5] "2006-05-01 GMT" "2006-06-01 GMT" "2006-07-01 GMT" "2006-08-01 GMT" [9] "2006-09-01 GMT" "2006-10-01 GMT" "2006-11-01 GMT" "2006-12-01 GMT" [1] "POSIXct" "POSIXt" GMT [1] [2006-01-01] [2006-02-01] [2006-03-01] [2006-04-01] [2006-05-01] [6] [2006-06-01] [2006-07-01] [2006-08-01] [2006-09-01] [2006-10-01] [11] [2006-11-01] [2006-12-01] [1] "2006-01-01" "2006-02-01" "2006-03-01" "2006-04-01" "2006-05-01" [6] "2006-06-01" "2006-07-01" "2006-08-01" "2006-09-01" "2006-10-01" [11] "2006-11-01" "2006-12-01" GMT [1] [2006-01-01] [2006-02-01] [2006-03-01] [2006-04-01] [2006-05-01] [6] [2006-06-01] [2006-07-01] [2006-08-01] [2006-09-01] [2006-10-01] [11] [2006-11-01] [2006-12-01] [1] "2006-01-01" "2006-02-01" "2006-03-01" "2006-04-01" "2006-05-01" [6] "2006-06-01" "2006-07-01" "2006-08-01" "2006-09-01" "2006-10-01" [11] "2006-11-01" "2006-12-01" NewYork [1] [2006-01-01] [2006-02-01] [2006-03-01] [2006-04-01] [2006-05-01] [6] [2006-06-01] [2006-07-01] [2006-08-01] [2006-09-01] [2006-10-01] [11] [2006-11-01] [2006-12-01] [1] "2006-01-01" "2006-02-01" "2006-03-01" "2006-04-01" "2006-05-01" [6] "2006-06-01" "2006-07-01" "2006-08-01" "2006-09-01" "2006-10-01" [11] "2006-11-01" "2006-12-01" NewYork [1] [2005-12-31 19:00:00] [2006-01-31 19:00:00] [2006-02-28 19:00:00] [4] [2006-03-31 19:00:00] [2006-04-30 20:00:00] [2006-05-31 20:00:00] [7] [2006-06-30 20:00:00] [2006-07-31 20:00:00] [2006-08-31 20:00:00] [10] [2006-09-30 20:00:00] [2006-10-31 19:00:00] [2006-11-30 19:00:00] [1] "2005-12-31 19:00:00" "2006-01-31 19:00:00" "2006-02-28 19:00:00" [4] "2006-03-31 19:00:00" "2006-04-30 20:00:00" "2006-05-31 20:00:00" [7] "2006-06-30 20:00:00" "2006-07-31 20:00:00" "2006-08-31 20:00:00" [10] "2006-09-30 20:00:00" "2006-10-31 19:00:00" "2006-11-30 19:00:00" done successfully. Executing test function test.asDate ... GMT [1] [2006-06-01] [2006-12-01] [1] "2006-06-01" "2006-12-01" NewYork [1] [2006-06-01] [2006-12-01] [1] "2006-06-01" "2006-12-01" done successfully. Executing test function test.asTimeDate ... GMT [1] [2006-06-01 10:00:00] [2006-12-01 10:00:00] [1] "2006-06-01 10:00:00" "2006-12-01 10:00:00" NewYork [1] [2006-06-01 10:00:00] [2006-12-01 10:00:00] [1] "2006-06-01 10:00:00" "2006-12-01 10:00:00" NewYork [1] [2006-06-01 06:00:00] [2006-12-01 05:00:00] [1] "2006-06-01 06:00:00" "2006-12-01 05:00:00" done successfully. Executing test function test.displayMethods ... myFinCenter "NewYork" NewYork [1] [2023-01-01] [2023-02-01] [2023-03-01] [2023-04-01] [2023-05-01] [6] [2023-06-01] [2023-07-01] [2023-08-01] [2023-09-01] [2023-10-01] [11] [2023-11-01] [2023-12-01] [1] "2006-07-01" done successfully. Executing test function test.midnightStandard ... [1] "2001-01-01 00:00:00" "2007-01-31 00:00:00" [1] "2001-01-01 16:00:00" [1] "2001-02-01 00:00:00" "2001-01-31 23:10:20" [1] "2001-02-01 00:00:00 GMT" "2001-01-31 23:10:20 GMT" [1] "2010-01-01 GMT" "2010-10-10 GMT" [1] "2001-02-01 00:00:00" "2001-01-31 23:10:00" "2006-01-01 00:00:00" [1] "2001-01-31 00:00:00" done successfully. Executing test function test.sysTimeDate ... Zurich [1] [2023-12-14 12:37:53] GMT [1] [2023-12-14 11:37:53] NewYork [1] [2023-12-14 06:37:53] [1] "timeDate" attr(,"package") [1] "timeDate" [1] "Date" done successfully. Executing test function test.timeCalendar ... done successfully. Executing test function test.timeDate ... myFinCenter "GMT" [1] "2006-01-10" "2006-01-20" "2006-01-30" GMT [1] [2006-01-10] [2006-01-20] [2006-01-30] GMT [1] [2006-01-10 10:00:00] [2006-01-20 10:00:00] [2006-01-30 10:00:00] [1] "2006-01-10 10:00" "2006-01-20 10:00" "2006-01-30 10:00" GMT [1] [2006-01-10 10:00:00] [2006-01-20 10:00:00] [2006-01-30 10:00:00] GMT [1] [2001-01-01] GMT [1] [2001-01-01] GMT [1] [2001-01-01] GMT [1] [2001-01-01 16:00:00] GMT [1] [2001-01-01 16:00:00] GMT [1] [2001-01-01] GMT [1] [2001-01-01] GMT [1] [2001-01-01] GMT [1] [2001-01-01 16:00:00] GMT [1] [2001-01-01 16:00:00] GMT [1] [2001-01-01 00:00:00] [2001-01-01 16:00:00] GMT [1] [2001-01-01 00:00:00] [2001-01-01 16:00:00] Zurich [1] [2001-01-01 01:00:00] Zurich [1] [2001-01-01 01:00:00] Zurich [1] [2001-01-01 01:00:00] Zurich [1] [2001-01-01 17:00:00] Zurich [1] [2001-01-01 17:00:00] Zurich [1] [2001-01-01 01:00:00] [2001-01-01 17:00:00] Zurich [1] [2001-01-01 01:00:00] [2001-01-01 17:00:00] GMT [1] [2006-03-01] [2006-06-01] [2006-09-01] [2006-12-01] GMT [1] [2006-12-15] done successfully. Executing test function test.timeSequence ... done successfully. Executing test function test.whichFormat ... [1] "%Y%m%d" [1] "%Y%m%d%H%M" [1] "%Y%m%d%H%M%S" [1] "%Y%m%d%H%M" [1] "%Y%m%d%H%M%S" [1] "%Y-%m-%d" [1] "%Y-%m-%d %H:%M" [1] "%Y-%m-%d %H:%M:%S" [1] "%Y-%m-%d %H:%M" [1] "%Y-%m-%d %H:%M:%S" [1] "%m/%d/%Y" [1] "%d-%b-%Y" done successfully. Executing test function test.as ... done successfully. Executing test function test.asTimeDate ... done successfully. Executing test function test.atoms ... done successfully. Executing test function test.julian ... done successfully. Executing test function test.months ... done successfully. Executing test function test.dst1.print ... done successfully. Executing test function test.dst2.print ... done successfully. Executing test function test.zurich ... done successfully. Executing test function test.listFinCenter ... done successfully. Executing test function test.myFinCenter ... done successfully. Executing test function test.rulesFinCenter ... done successfully. Executing test function test.holiday ... done successfully. Executing test function test.holidayLONDON ... Europe/London [1] [2023-01-02] [2023-04-07] [2023-04-10] [2023-05-01] [2023-05-08] [6] [2023-05-29] [2023-08-28] [2023-12-25] [2023-12-26] done successfully. Executing test function test.holidayNERC ... Eastern [1] [2023-01-02] [2023-05-29] [2023-07-04] [2023-09-04] [2023-11-23] [6] [2023-12-25] Eastern [1] [2023-01-02] [2023-05-29] [2023-07-04] [2023-09-04] [2023-11-23] [6] [2023-12-25] done successfully. Executing test function test.holidayNYSE ... NewYork [1] [2023-01-02] [2023-01-16] [2023-02-20] [2023-04-07] [2023-05-29] [6] [2023-06-19] [2023-07-04] [2023-09-04] [2023-11-23] [2023-12-25] NewYork [1] [2023-01-02] [2023-01-16] [2023-02-20] [2023-04-07] [2023-05-29] [6] [2023-06-19] [2023-07-04] [2023-09-04] [2023-11-23] [2023-12-25] done successfully. Executing test function test.holidayZURICH ... done successfully. Executing test function test.easter ... done successfully. Executing test function test.holiday ... 2023-12-03 Advent1st 2023-12-10 Advent2nd 2023-12-17 Advent3rd 2023-12-24 Advent4th 2023-11-01 AllSaints 2023-11-02 AllSouls 2023-03-25 Annunciation 2023-05-18 Ascension 2023-02-22 AshWednesday 2023-08-15 AssumptionOfMary 2023-09-08 BirthOfVirginMary 2023-12-26 BoxingDay 2023-07-01 CACanadaDay 2023-08-07 CACivicProvincialHoliday 2023-02-20 CAFamilyDay 2023-09-04 CALabourDay 2023-10-09 CAThanksgivingDay 2023-05-22 CAVictoriaDay 2023-05-18 CHAscension 2023-01-02 CHBerchtoldsDay 2023-08-01 CHConfederationDay 2023-09-11 CHKnabenschiessen 2023-04-17 CHSechselaeuten 2023-11-11 CaRemembranceDay 2023-09-14 CelebrationOfHolyCross 2023-11-26 ChristTheKing 2023-12-25 ChristmasDay 2023-12-24 ChristmasEve 2023-06-08 CorpusChristi 2023-05-18 DEAscension 2023-12-24 DEChristmasEve 2023-06-08 DECorpusChristi 2023-10-03 DEGermanUnity 2023-12-31 DENewYearsEve 2023-04-09 Easter 2023-04-10 EasterMonday 2023-04-09 EasterSunday 2023-01-06 Epiphany 2023-11-01 FRAllSaints 2023-11-11 FRArmisticeDay 2023-05-18 FRAscension 2023-08-15 FRAssumptionVirginMary 2023-07-14 FRBastilleDay 2023-05-08 FRFetDeLaVictoire1945 2023-05-01 GBEarlyMayBankHoliday 2023-05-29 GBSpringBankHoliday 2023-08-28 GBSummerBankHoliday 2023-04-07 GoodFriday 2023-11-01 ITAllSaints 2023-08-15 ITAssumptionOfVirginMary 2023-01-06 ITEpiphany 2023-12-08 ITImmaculateConception 2023-04-25 ITLiberationDay 2023-12-07 ITStAmrose 2023-09-23 JPAutumnalEquinox 2023-12-31 JPBankHolidayDec31 2023-01-02 JPBankHolidayJan2 2023-01-03 JPBankHolidayJan3 2023-11-03 JPBunkaNoHi 2023-05-05 JPChildrensDay 2023-01-09 JPComingOfAgeDay 2023-05-03 JPConstitutionDay 2023-02-23 JPEmperorsBirthday 2023-01-01 JPGantan 2023-05-04 JPGreeneryDay 2023-10-09 JPHealthandSportsDay 2023-09-18 JPKeirouNoHi 2023-02-11 JPKenkokuKinenNoHi 2023-05-03 JPKenpouKinenBi 2023-11-23 JPKinrouKanshaNoHi 2023-05-05 JPKodomoNoHi 2023-05-04 JPKokuminNoKyujitu 2023-07-17 JPMarineDay 2023-05-04 JPMidoriNoHi 2023-08-11 JPMountainDay 2023-02-11 JPNatFoundationDay 2023-05-04 JPNationHoliday 2023-11-03 JPNationalCultureDay 2023-01-01 JPNewYearsDay 2023-09-18 JPRespectForTheAgedDay 2023-01-09 JPSeijinNoHi 2023-09-23 JPShuubunNoHi 2023-10-09 JPTaiikuNoHi 2023-02-23 JPTennouTanjyouBi 2023-11-23 JPThanksgivingDay 2023-07-17 JPUmiNoHi 2023-03-21 JPVernalEquinox 2023-05-01 LaborDay 2023-09-29 MassOfArchangels 2023-01-01 NewYearsDay 2023-04-02 PalmSunday 2023-05-28 Pentecost 2023-05-29 PentecostMonday 2023-02-02 PresentationOfLord 2023-02-19 Quinquagesima 2023-05-14 RogationSunday 2023-02-05 Septuagesima 2023-01-01 SolemnityOfMary 2023-08-06 TransfigurationOfLord 2023-06-04 TrinitySunday 2023-03-06 USCPulaskisBirthday 2023-12-25 USChristmasDay 2023-10-09 USColumbusDay 2023-05-30 USDecorationMemorialDay 2023-11-07 USElectionDay 2023-04-07 USGoodFriday 2023-01-20 USInaugurationDay 2023-07-04 USIndependenceDay 2023-06-19 USJuneteenthNationalIndependenceDay 2023-09-04 USLaborDay 2023-02-12 USLincolnsBirthday 2023-01-16 USMLKingsBirthday 2023-05-29 USMemorialDay 2023-01-01 USNewYearsDay 2023-02-20 USPresidentsDay 2023-11-23 USThanksgivingDay 2023-11-11 USVeteransDay 2023-02-22 USWashingtonsBirthday 2023-05-08 specialHolidayGB done successfully. Executing test function test.holidaysLONDON ... done successfully. Executing test function test.listHolidays ... done successfully. Executing test function test.timeDateMathOps ... done successfully. Executing test function test.timeDateOrdering ... Formal class 'timeDate' [package "timeDate"] with 3 slots ..@ Data : POSIXct[1:12], format: "2007-01-01 15:00:00" "2007-02-01 15:00:00" ... ..@ format : chr "%Y-%m-%d %H:%M:%S" ..@ FinCenter: chr "NewYork" Formal class 'timeDate' [package "timeDate"] with 3 slots ..@ Data : POSIXct[1:12], format: "2007-01-01 15:00:00" "2007-02-01 15:00:00" ... ..@ format : chr "%Y-%m-%d %H:%M:%S" ..@ FinCenter: chr "Zurich" GMT [1] [2023-02-01] [2023-03-01] [2023-07-01] [2023-09-01] [2023-01-01] [6] [2023-05-01] [2023-10-01] [2023-11-01] [2023-12-01] [2023-06-01] [11] [2023-04-01] [2023-08-01] GMT [1] [2023-12-14] [2023-12-13] [2023-12-12] [2023-12-11] [2023-12-10] [6] [2023-12-09] done successfully. Executing test function test.timeFirstDayInMonth ... done successfully. Executing test function test.timeFirstDayInQuarter ... done successfully. Executing test function test.timeLastDayInMonth ... done successfully. Executing test function test.timeLastDayInQuarter ... done successfully. Executing test function test.timeLastNdayInMonth ... done successfully. Executing test function test.timeNdayOnOrAfter ... done successfully. Executing test function test.timeNdayOnOrBefore ... done successfully. Executing test function test.timeNthNdayInMonth ... done successfully. Executing test function test.Easter ... Zurich [1] [2006-04-09] [2006-04-10] [2006-04-11] [2006-04-12] [2006-04-13] [6] [2006-04-14] [2006-04-15] [2006-04-16] Zurich [1] [2006-04-09] [2006-04-10] [2006-04-11] [2006-04-12] [2006-04-13] [6] [2006-04-14] [2006-04-15] [2006-04-16] done successfully. Executing test function test.blockStart ... done successfully. Executing test function test.cut ... GMT [1] [2006-04-14] GMT [1] [2006-04-17] GMT [1] [2006-04-14] [2006-04-15] [2006-04-16] GMT [1] [2006-04-14] [2006-04-15] [2006-04-16] done successfully. Executing test function test.dayOfWeek ... done successfully. Executing test function test.holidayNYSE ... done successfully. Executing test function test.isBizday ... done successfully. Executing test function test.isHoliday ... done successfully. Executing test function test.isWeekday ... done successfully. Executing test function test.isWeekend ... done successfully. Executing test function test.start ... GMT [1] [2023-01-01] GMT [1] [2023-12-01] done successfully. Executing test function test.subset ... done successfully. Executing test function test.AAA ... [1] "Pacific/Auckland" done successfully. Executing test function test.dayOfWeek ... done successfully. Executing test function test.dayOfYear ... done successfully. Executing test function test.isWeekday ... done successfully. Executing test function test.isWeekend ... done successfully. Executing test function test.seq.GMT ... done successfully. Executing test function test.seq.Zurich ... done successfully. RUNIT TEST PROTOCOL -- Thu Dec 14 12:37:55 2023 *********************************************** Number of test functions: 58 Number of errors: 0 Number of failures: 0 1 Test Suite : timeDate unit testing - 58 test functions, 0 errors, 0 failures There were 50 or more warnings (use warnings() to see the first 50) > > proc.time() user system elapsed 2.32 0.26 2.57