[R] R-3.4.0 fails test

Henric Winell nilsson.henric at gmail.com
Wed May 17 12:31:52 CEST 2017


On 2017-05-17 09:42, Patrick Connolly wrote:

> After installing R-3.4.0 I ran 'make check'  which halted here:
> 
> $ > tail reg-tests-1d.Rout.fail -n 16

This problem was brought up on the R-devel list early this morning.  See 
https://stat.ethz.ch/pipermail/r-devel/2017-May/074275.html


Henric Winell




>> ## 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)
>



More information about the R-help mailing list