R Under development (unstable) (2024-09-15 r87152 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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] [2024-01-01] [2024-02-01] [2024-03-01] [2024-04-01] [2024-05-01] [6] [2024-06-01] [2024-07-01] [2024-08-01] [2024-09-01] [2024-10-01] [11] [2024-11-01] [2024-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] [2024-09-16 13:31:10] GMT [1] [2024-09-16 11:31:10] NewYork [1] [2024-09-16 07:31:10] [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] [2024-01-01] [2024-03-29] [2024-04-01] [2024-05-06] [2024-05-27] [6] [2024-08-26] [2024-12-25] [2024-12-26] done successfully. Executing test function test.holidayNERC ... Eastern [1] [2024-01-01] [2024-05-27] [2024-07-04] [2024-09-02] [2024-11-28] [6] [2024-12-25] Eastern [1] [2024-01-01] [2024-05-27] [2024-07-04] [2024-09-02] [2024-11-28] [6] [2024-12-25] done successfully. Executing test function test.holidayNYSE ... NewYork [1] [2024-01-01] [2024-01-15] [2024-02-19] [2024-03-29] [2024-05-27] [6] [2024-06-19] [2024-07-04] [2024-09-02] [2024-11-28] [2024-12-25] NewYork [1] [2024-01-01] [2024-01-15] [2024-02-19] [2024-03-29] [2024-05-27] [6] [2024-06-19] [2024-07-04] [2024-09-02] [2024-11-28] [2024-12-25] done successfully. Executing test function test.holidayZURICH ... done successfully. Executing test function test.easter ... done successfully. Executing test function test.holiday ... 2024-12-01 Advent1st 2024-12-08 Advent2nd 2024-12-15 Advent3rd 2024-12-22 Advent4th 2024-11-01 AllSaints 2024-11-02 AllSouls 2024-03-25 Annunciation 2024-05-09 Ascension 2024-02-14 AshWednesday 2024-08-15 AssumptionOfMary 2024-09-08 BirthOfVirginMary 2024-12-26 BoxingDay 2024-07-01 CACanadaDay 2024-08-05 CACivicProvincialHoliday 2024-02-19 CAFamilyDay 2024-09-02 CALabourDay 2024-10-14 CAThanksgivingDay 2024-05-20 CAVictoriaDay 2024-05-09 CHAscension 2024-01-02 CHBerchtoldsDay 2024-08-01 CHConfederationDay 2024-09-09 CHKnabenschiessen 2024-04-15 CHSechselaeuten 2024-11-11 CaRemembranceDay 2024-09-14 CelebrationOfHolyCross 2024-11-24 ChristTheKing 2024-12-25 ChristmasDay 2024-12-24 ChristmasEve 2024-05-30 CorpusChristi 2024-05-09 DEAscension 2024-12-24 DEChristmasEve 2024-05-30 DECorpusChristi 2024-10-03 DEGermanUnity 2024-12-31 DENewYearsEve 2024-03-31 Easter 2024-04-01 EasterMonday 2024-03-31 EasterSunday 2024-01-06 Epiphany 2024-11-01 FRAllSaints 2024-11-11 FRArmisticeDay 2024-05-09 FRAscension 2024-08-15 FRAssumptionVirginMary 2024-07-14 FRBastilleDay 2024-05-08 FRFetDeLaVictoire1945 2024-05-06 GBEarlyMayBankHoliday 2024-05-27 GBSpringBankHoliday 2024-08-26 GBSummerBankHoliday 2024-03-29 GoodFriday 2024-11-01 ITAllSaints 2024-08-15 ITAssumptionOfVirginMary 2024-01-06 ITEpiphany 2024-12-08 ITImmaculateConception 2024-04-25 ITLiberationDay 2024-12-07 ITStAmrose 2024-03-08 InternationalWomensDay 2024-09-22 JPAutumnalEquinox 2024-12-31 JPBankHolidayDec31 2024-01-02 JPBankHolidayJan2 2024-01-03 JPBankHolidayJan3 2024-11-03 JPBunkaNoHi 2024-05-05 JPChildrensDay 2024-01-08 JPComingOfAgeDay 2024-05-03 JPConstitutionDay 2024-02-23 JPEmperorsBirthday 2024-01-01 JPGantan 2024-05-04 JPGreeneryDay 2024-10-14 JPHealthandSportsDay 2024-09-16 JPKeirouNoHi 2024-02-11 JPKenkokuKinenNoHi 2024-05-03 JPKenpouKinenBi 2024-11-23 JPKinrouKanshaNoHi 2024-05-05 JPKodomoNoHi 2024-05-04 JPKokuminNoKyujitu 2024-07-15 JPMarineDay 2024-05-04 JPMidoriNoHi 2024-08-11 JPMountainDay 2024-02-11 JPNatFoundationDay 2024-05-04 JPNationHoliday 2024-11-03 JPNationalCultureDay 2024-01-01 JPNewYearsDay 2024-09-16 JPRespectForTheAgedDay 2024-01-08 JPSeijinNoHi 2024-09-22 JPShuubunNoHi 2024-10-14 JPTaiikuNoHi 2024-02-23 JPTennouTanjyouBi 2024-11-23 JPThanksgivingDay 2024-07-15 JPUmiNoHi 2024-03-20 JPVernalEquinox 2024-05-01 LaborDay 2024-09-29 MassOfArchangels 2024-01-01 NewYearsDay 2024-03-24 PalmSunday 2024-05-19 Pentecost 2024-05-20 PentecostMonday 2024-02-02 PresentationOfLord 2024-02-11 Quinquagesima 2024-05-05 RogationSunday 2024-01-28 Septuagesima 2024-01-01 SolemnityOfMary 2024-08-06 TransfigurationOfLord 2024-05-26 TrinitySunday 2024-03-04 USCPulaskisBirthday 2024-12-25 USChristmasDay 2024-10-14 USColumbusDay 2024-05-30 USDecorationMemorialDay 2024-11-05 USElectionDay 2024-03-29 USGoodFriday 2024-01-20 USInaugurationDay 2024-07-04 USIndependenceDay 2024-06-19 USJuneteenthNationalIndependenceDay 2024-09-02 USLaborDay 2024-02-12 USLincolnsBirthday 2024-01-15 USMLKingsBirthday 2024-05-27 USMemorialDay 2024-01-01 USNewYearsDay 2024-02-19 USPresidentsDay 2024-11-28 USThanksgivingDay 2024-11-11 USVeteransDay 2024-02-22 USWashingtonsBirthday 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] [2024-02-01] [2024-03-01] [2024-07-01] [2024-09-01] [2024-01-01] [6] [2024-05-01] [2024-10-01] [2024-11-01] [2024-12-01] [2024-06-01] [11] [2024-04-01] [2024-08-01] GMT [1] [2024-09-16] [2024-09-15] [2024-09-14] [2024-09-13] [2024-09-12] [6] [2024-09-11] 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] [2024-01-01] GMT [1] [2024-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 -- Mon Sep 16 13:31:11 2024 *********************************************** 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 1.85 0.25 2.10