[R] R-3.4.0 fails test
Patrick Connolly
p_connolly at slingshot.co.nz
Wed May 17 09:42:16 CEST 2017
After installing R-3.4.0 I ran 'make check' which halted here:
$ > tail reg-tests-1d.Rout.fail -n 16
> ## format()ing invalid hand-constructed POSIXlt objects
> d <- as.POSIXlt("2016-12-06"); d$zone <- 1
> tools::assertError(format(d))
> d$zone <- NULL
> stopifnot(identical(format(d),"2016-12-06"))
> d$zone <- "CET" # = previous, but 'zone' now is last
> tools::assertError(format(d))
> dlt <- structure(
+ list(sec = 52, min = 59L, hour = 18L, mday = 6L, mon = 11L, year = 116L,
+ wday = 2L, yday = 340L, isdst = 0L, zone = "CET", gmtoff = 3600L),
+ class = c("POSIXlt", "POSIXt"), tzone = c("", "CET", "CEST"))
> dlt$sec <- 10000 + 1:10 # almost three hours & uses re-cycling ..
> fd <- format(dlt)
> stopifnot(length(fd) == 10, identical(fd, format(dct <- as.POSIXct(dlt))))
Error: identical(fd, format(dct <- as.POSIXct(dlt))) is not TRUE
Execution halted
... so, of course, the remaining tests aren't done.
AFAICT, that test will fail anywhere outside of tzone CET, but I could
be missing something.
What is the point of this test and is there a better way to move on to
the remaining tests besides editing the corresponding .R file?
Changing the line
> stopifnot(length(fd) == 10, identical(fd, format(dct <- as.POSIXct(dlt))))
to
> stopifnot(length(fd) == 10, identical(fd, format(dct <- as.POSIXlt(dlt))))
^^^^
would pass. But would that be any use?
TIA
(Linux Mint 17.3)
--
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
___ Patrick Connolly
{~._.~} Great minds discuss ideas
_( Y )_ Average minds discuss events
(:_~*~_:) Small minds discuss people
(_)-(_) ..... Eleanor Roosevelt
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
More information about the R-help
mailing list