Running ‘tests.R’ [0s/1s]
Running the tests in ‘tests/tests.R’ failed.
Complete output:
  > # minitest - a minimal testing framework v0.0.5 --------------------------------
  > test_library <- function(package) library(package = package, character.only = TRUE)
  > test_true <- function(x) invisible(isTRUE(x) || {print(x); stop("the above was returned instead of TRUE")})
  > test_false <- function(x) invisible(isFALSE(x) || {print(x); stop("the above was returned instead of FALSE")})
  > test_null <- function(x) invisible(is.null(x) || {print(x); stop("the above was returned instead of NULL")})
  > test_notnull <- function(x) invisible(!is.null(x) || stop("returns NULL when expected to be not NULL"))
  > test_zero <- function(x) invisible(x == 0L || {print(x); stop("the above was returned instead of 0L")})
  > test_type <- function(type, x) invisible(typeof(x) == type || {stop("object of type '", typeof(x), "' was returned instead of '", type, "'")})
  > test_class <- function(class, x) invisible(inherits(x, class) || {stop("object of class '", paste(class(x), collapse = ", "), "' was returned instead of '", class, "'")})
  > test_equal <- function(a, b) invisible(a == b || {print(a); print(b); stop("the above expressions were not equal")})
  > test_identical <- function(a, b) invisible(identical(a, b) || {print(a); print(b); stop("the above expressions were not identical")})
  > test_print <- function(x) invisible(is.character(capture.output(print(x))) || stop("print output of expression cannot be captured as a character value"))
  > test_error <- function(x, containing = "") invisible(inherits(x <- tryCatch(x, error = identity), "error") && grepl(containing, x[["message"]], fixed = TRUE) || stop("Expected error message containing: ", containing, "\nActual error message: ", x[["message"]]))
  > NOT_CRAN <- Sys.getenv("NOT_CRAN") == "true"
  > # ------------------------------------------------------------------------------
  > 
  > test_library("nanonext")
  > nng_version()
  [1] "1.12.0"         "Mbed TLS 3.6.5"
  > 
  > later <- requireNamespace("later", quietly = TRUE)
  > promises <- requireNamespace("promises", quietly = TRUE)
  > 
  > test_class("nanoObject", n <- nano("req", listen = "inproc://nanonext", autostart = FALSE))
  > test_class("nanoObject", n1 <- nano("rep", dial = "inproc://nanonext", autostart = FALSE))
  > test_true(is_nano(n))
  > test_class("nanoSocket", n$socket)
  > test_class("nano", n$socket)
  > n$newmethod <- "doesnotwork"
  > test_null(n$newmethod)
  > test_type("integer", attr(n$socket, "id"))
  > test_equal(n$socket$state, "opened")
  > test_equal(n$socket$protocol, "req")
  > test_equal(n$send("not ready", mode = "serial"), 8L)
  > test_equal(n$recv(), 11L)
  > test_class("nano", n$opt("recv-size-max", 8192))
  > test_equal(n$opt("recv-size-max"), 8192L)
  > test_class("nano", n$opt("recv-buffer", 8L))
  > test_equal(n$opt("recv-buffer"), 8L)
  > test_error(opt(n$socket, "recv-buffer") <- -1, "Incorrect type")
  > test_class("nano", n$opt("req:resend-time", 0L))
  > test_class("nano", n$opt("socket-name", "nano"))
  > test_equal(n$opt("socket-name"), "nano")
  > test_error(n$opt("socket-name", NULL), "argument")
  > test_print(n$listener[[1]])
  > test_class("nanoListener", n$listener[[1]])
  > test_equal(n$listener[[1]]$url, "inproc://nanonext")
  > test_equal(n$listener[[1]]$state, "not started")
  > test_class("nano", n$listener_opt("recv-size-max", 1024)[[1L]])
  > test_equal(n$listener_opt("recv-size-max")[[1L]], 1024L)
  > test_error(n$listener_opt("false", 100), "supported")
  > test_error(n$listener_opt("false"), "supported")
  > test_error(n$listener_opt("false", "false"), "supported")
  > test_error(n$listener_opt("false", NULL), "supported")
  > test_error(n$listener_opt("false", TRUE), "supported")
  > test_error(n$listener_opt("false", list()), "type")
  > test_zero(n$listener_start())
  > test_equal(n$listener[[1]]$state, "started")
  > test_print(n1$dialer[[1]])
  > test_class("nanoDialer", n1$dialer[[1]])
  > test_equal(n1$dialer[[1]]$url, "inproc://nanonext")
  > test_equal(n1$dialer[[1]]$state, "not started")
  > test_class("nano", n1$dialer_opt("reconnect-time-min", 1000)[[1L]])
  > test_equal(n1$dialer_opt("reconnect-time-min")[[1L]], 1000L)
  > test_class("nano", n1$dialer_opt("recv-size-max", 8192)[[1L]])
  > test_equal(n1$dialer_opt("recv-size-max")[[1L]], 8192L)
  > test_error(n1$dialer_opt("false", 100), "supported")
  > test_error(n1$dialer_opt("false"), "supported")
  > test_error(n1$dialer_opt("false", "false"), "supported")
  > test_error(n1$dialer_opt("false", NULL), "supported")
  > test_error(n1$dialer_opt("false", TRUE), "supported")
  > test_error(n1$dialer_opt("false", list()), "type")
  > test_zero(n1$dialer_start())
  > test_equal(n1$dialer[[1]]$state, "started")
  > 
  > test_error(n$send(list(), mode = "raw"), "atomic vector type")
  > test_error(n$recv(mode = "none"), "mode")
  > test_error(n$recv(mode = "int"), "mode")
  > test_error(n$recv(mode = "logica"), "mode")
  > test_error(n$recv(mode = "charact"), "mode")
  > test_error(n$recv(mode = "positrons"), "mode")
  > test_true(is_aio(raio <- recv_aio(n$socket, timeout = 1L, cv = substitute())))
  > test_print(raio)
  > test_class("errorValue", call_aio(raio)$data)
  > test_class("errorValue", raio$data)
  > test_zero(pipe_id(raio))
  > r <- n$send(data.frame(), block = FALSE)
  > if (r == 8L) r <- n$send(data.frame(), block = 500L)
  > test_zero(r)
  > r <- n1$recv(block = FALSE)
  > if (is_error_value(r)) r <- n1$recv(block = 500)
  > test_class("data.frame", r)
  > test_zero(n1$send(c("test", "", "spec"), mode = "raw", block = 500))
  > test_identical(n$recv("character", block = 500), c("test", "", "spec"))
  > test_zero(n$send(c("", "", "", "x"), mode = "raw", block = 500))
  > test_identical(n1$recv("character", block = 500), c("", "", "", "x"))
  > test_zero(n1$send(c("keep", "", ""), mode = "raw", block = 500))
  > test_identical(n$recv("character", block = 500), c("keep", "", ""))
  > test_zero(n$send(1:5, mode = "raw"))
  > test_equal(length(n1$recv("integer", block = 500)), 5L)
  > test_true(is_aio(saio <- n1$send_aio(paste(replicate(5, random(1e3L)), collapse = ""), mode = 1L, timeout = 900)))
  > test_print(saio)
  > if (later) test_null(.keep(saio, new.env()))
  > test_class("sendAio", call_aio(saio))
  > test_zero(saio$result)
  > test_error(n$send("wrong mode", mode = "none"), "mode")
  > test_error(n$send("wrong mode", mode = "ser"), "mode")
  > test_error(n$send("wrong mode", mode = "rawial"), "mode")
  > test_class("recvAio", raio <- n$recv_aio(timeout = 500))
  > test_print(raio)
  > test_equal(nchar(call_aio(raio)[["value"]]), 10000L)
  > test_type("integer", pipe_id(raio))
  > raio$newfield <- "doesnotwork"
  > test_null(raio$newfield)
  > test_class("sendAio", saio <- n$send_aio(c(1.1, 2.2), mode = "raw", timeout = 500))
  > saio$newfield <- "doesnotwork"
  > test_null(saio$newfield)
  > test_type("logical", unresolved(saio))
  > test_type("logical", .unresolved(saio))
  > test_class("recvAio", msg <- n1$recv_aio(mode = "numeric", timeout = 500))
  > test_identical(call_aio(msg), msg)
  > test_class("recvAio", msg <- n1$recv_aio(mode = "complex", timeout = 500))
  > test_null(stop_aio(msg))
  > test_null(stop_aio(n))
  > test_false(stop_request(n))
  > test_identical(call_aio(msg), msg)
  > test_class("errorValue", msg$data)
  > test_identical(call_aio(n), n)
  > test_class("sendAio", sraio <- n$send_aio(as.raw(0L), mode = "raw", timeout = 500))
  > test_class("recvAio", rraio <- n1$recv_aio(mode = 1L, timeout = 500))
  > test_true(is_nul_byte(suppressWarnings(call_aio_(rraio)$data)))
  > test_class("sendAio", sraio <- n$send_aio(as.raw(1L), mode = 2L, timeout = 500))
  > test_class("recvAio", rraio <- n1$recv_aio(mode = "raw", timeout = 500))
  > test_type("raw", call_aio(rraio)$data)
  > test_class("sendAio", sraio <- n$send_aio(c(1+2i, 4+3i), mode = "raw", timeout = 500))
  > test_class("recvAio", rraio <- n1$recv_aio(mode = "complex", timeout = 500))
  > test_type("complex", call_aio(rraio)$data)
  > test_class("sendAio", sraio <- n$send_aio(5, mode = "raw", timeout = 500))
  > test_class("recvAio", rraio <- n1$recv_aio(mode = "double", timeout = 500))
  > test_type("double", call_aio(rraio)$data)
  > test_class("sendAio", sraio <- n$send_aio(c(1, 2), mode = "raw", timeout = 500))
  > test_class("recvAio", rraio <- n1$recv_aio(mode = "numeric", timeout = 500))
  > test_true(is.numeric(call_aio(rraio)$data))
  > test_class("sendAio", sraio <- n$send_aio(c(1L, 2L, 3L), mode = "raw", timeout = 500))
  > test_class("recvAio", rraio <- n1$recv_aio(mode = "integer", timeout = 500))
  > test_type("integer", call_aio(rraio)$data)
  > test_class("sendAio", sraio <- n$send_aio(as.raw(0L), mode = "raw", timeout = 500))
  > test_class("recvAio", rraio <- n1$recv_aio(mode = "double", timeout = 500))
  > test_type("raw", suppressWarnings(call_aio(rraio)$data))
  > test_class("sendAio", sraio <- n$send_aio(as.raw(0L), mode = "raw", timeout = 500))
  > test_class("recvAio", rraio <- n1$recv_aio(mode = "integer", timeout = 500))
  > test_type("raw", suppressWarnings(call_aio(rraio)$data))
  > test_class("sendAio", sraio <- n$send_aio(as.raw(0L), mode = "raw", timeout = 500))
  > test_class("recvAio", rraio <- n1$recv_aio(mode = "logical", timeout = 500))
  > test_type("raw", suppressWarnings(collect_aio(rraio)))
  > test_class("sendAio", sraio <- n$send_aio(as.raw(0L), mode = "raw", timeout = 500))
  > test_class("recvAio", rraio <- n1$recv_aio(mode = "numeric", timeout = 500))
  > test_type("raw", suppressWarnings(rraio[]))
  > test_class("sendAio", sraio <- n$send_aio(as.raw(0L), mode = "raw", timeout = 500))
  > test_class("recvAio", rraio <- n1$recv_aio(mode = "complex", timeout = 500))
  > test_type("raw", suppressWarnings(collect_aio_(rraio)))
  > rcv <- cv()
  > test_equal(race_aio(list(rraio), rcv), 1L)
  > test_equal(race_aio(list(sraio, rraio), rcv), 1L)
  [1] 2
  [1] 1
  Error in test_equal(race_aio(list(sraio, rraio), rcv), 1L) : 
    the above expressions were not equal
  Execution halted