Last updated on 2024-03-28 14:48:34 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 0.6-22 | 9.11 | 31.41 | 40.52 | OK | |
r-devel-linux-x86_64-debian-gcc | 0.6-22 | 7.34 | 31.14 | 38.48 | OK | |
r-devel-linux-x86_64-fedora-clang | 0.6-22 | 63.44 | OK | |||
r-devel-linux-x86_64-fedora-gcc | 0.6-22 | 75.26 | OK | |||
r-devel-windows-x86_64 | 0.6-22 | 19.00 | 202.00 | 221.00 | ERROR | |
r-patched-linux-x86_64 | 0.6-22 | 8.31 | 39.28 | 47.59 | OK | |
r-release-linux-x86_64 | 0.6-22 | 8.15 | 37.93 | 46.08 | OK | |
r-release-macos-arm64 | 0.6-22 | 56.00 | OK | |||
r-release-macos-x86_64 | 0.6-22 | 111.00 | OK | |||
r-release-windows-x86_64 | 0.6-22 | 22.00 | 59.00 | 81.00 | OK | |
r-oldrel-macos-arm64 | 0.6-22 | 37.00 | OK | |||
r-oldrel-windows-x86_64 | 0.6-22 | 11.00 | 63.00 | 74.00 | OK |
Version: 0.6-22
Check: tests
Result: ERROR
Running 'integers.R' [147s]
Running the tests in 'tests/integers.R' failed.
Complete output:
> library(mmap)
> tmp <- tempfile()
>
> ##### int8() #####
> # write binary from min to max signed 2^8
> test.int8 <- function() {
+ writeBin(-128:127L, tmp, size=1)
+
+ m <- mmap(tmp, int8()) # signed 1 byte integers
+ if( !all(m[] == (-128:127L)) )
+ stop("m[] == (-128:127L)")
+
+ # test replacement
+ m[] <- -128L
+ if( !all(m[] == -128))
+ stop("m[] == -128")
+ munmap(m)
+ }
>
>
>
>
> #### uint8() ####
> test.uint8 <- function(on=TRUE) {
+ if( !isTRUE(on)) {
+ cat("test.uint8 disabled\n")
+ return(NULL)
+ }
+ writeBin(0:255L, tmp, size=1)
+ m <- mmap(tmp, uint8()) # unsigned 1 byte integers
+ if( !all(m[] == 0:255L) )
+ stop("m[] == 0:255L")
+
+ # test replacement
+ m[] <- 255L;
+ if( !all(m[] == 255L))
+ stop("m[] == 255L")
+ munmap(m)
+ }
>
>
>
>
> #### int16() ####
> test.int16 <- function(on=TRUE) {
+ if( !isTRUE(on)) {
+ cat("test.int16 disabled\n")
+ return(NULL)
+ }
+ writeBin(-32768:32767L, tmp, size=2)
+ m <- mmap(tmp, int16()) # signed 2 byte integers
+ if( !all(m[] == -32768:32767L) )
+ stop("m[] == -32768:32767L")
+
+ # test replacement
+ m[] <- -32768L
+ if( !all(m[] == -32768L))
+ stop("m[] == -32768L")
+ munmap(m)
+ }
>
>
>
>
> #### uint16() ####
> test.uint16 <- function(on=TRUE) {
+ cat("checking test.uint16...")
+ if( !isTRUE(on)) {
+ cat("test.uint16 disabled\n")
+ return(NULL)
+ }
+ writeBin(0:65535L, tmp, size=2)
+ m <- mmap(tmp, uint16()) # unsigned 2 byte integers
+ if( !all(m[] == 0:65535L) )
+ stop("m[] == 0:65535L")
+
+ # test replacement
+ m[] <- 65535L
+ if( !all(m[] == 65535L))
+ stop("m[] == 65535L")
+ munmap(m)
+ cat("OK\n")
+ }
>
>
>
>
> #### int24() ####
> test.int24 <- function(on=TRUE) {
+ cat("checking test.int24...")
+ if( !isTRUE(on)) {
+ cat("test.int24 disabled\n")
+ return(NULL)
+ }
+ ints <- as.integer(seq(-8388607L,8388607L,length.out=11))
+ writeBin(rep(as.raw(0),33), tmp)
+ m <- mmap(tmp, int24()) # signed 3 byte integers
+ m[] <- ints
+ if( !all(m[] == ints) )
+ stop("m[] == ints")
+ munmap(m)
+ cat("OK\n")
+ }
>
>
>
>
> #### uint24() ####
> test.uint24 <- function(on=TRUE) {
+ cat("checking test.uint24...")
+ if( !isTRUE(on)) {
+ cat("test.uint24 disabled\n")
+ return(NULL)
+ }
+ ints <- as.integer(seq(0,16777215L,length.out=100))
+ writeBin(rep(as.raw(0),300), tmp)
+ m <- mmap(tmp, uint24()) # signed 3 byte integers
+ m[] <- ints
+ if( !all(m[] == ints) )
+ stop("m[] == ints")
+ munmap(m)
+ cat("OK\n")
+ }
>
>
>
>
> #### int32() ####
> test.int32 <- function(on=TRUE) {
+ cat("checking test.int32...")
+ if( !isTRUE(on)) {
+ cat("test.int32 disabled\n")
+ return(NULL)
+ }
+ writeBin(-1e6:1e6L, tmp, size=4)
+ m <- mmap(tmp, int32()) # unsigned 2 byte integers
+ if( !all(m[] == -1e6:1e6L) )
+ stop("m[] == -1e6:1e6L")
+
+ # test replacement
+ m[] <- .Machine$integer.max
+ if( !all(m[] == .Machine$integer.max))
+ stop("m[] == .Machine$integer.max")
+ munmap(m)
+ cat("OK\n")
+ }
>
>
>
>
> #### int64() ####
> test.int64 <- function(on=TRUE) {
+ cat("checking test.int64...")
+ if( !isTRUE(on)) {
+ cat("test.int32 disabled\n")
+ return(NULL)
+ }
+ writeBin(0.0, tmp)
+ m <- mmap(tmp, int64()) # signed 8 byte integers as doubles
+ m[] <- 2^40
+ if( !all(m[] == 2^40) )
+ stop("m[] == 2^40")
+ munmap(m)
+ cat("OK\n")
+ }
>
> test.int8()
> test.uint8()
> test.int16()
> test.uint16()
checking test.uint16...OK
> test.int24()
checking test.int24...OK
> test.uint24()
checking test.uint24...OK
> test.int32()
checking test.int32...OK
> test.int64(FALSE)
checking test.int64...test.int32 disabled
NULL
>
> proc.time()
user system elapsed
0.32 0.14 0.45
Flavor: r-devel-windows-x86_64