Skip to content

Commit 1f91dec

Browse files
committed
Add more tests
1 parent d208993 commit 1f91dec

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ ip_addr <- function() .Call(rnng_ip_addr)
437437
#' @examples
438438
#' if (Sys.info()[["sysname"]] == "Linux") {
439439
#' rm(list = ls())
440-
#' gc()
440+
#' invisible(gc())
441441
#' .Call(nanonext:::rnng_fini_priors)
442442
#' Sys.sleep(1L)
443443
#' .Call(nanonext:::rnng_fini)

man/zzz.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/tests.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,13 @@ test_equal(call_aio(cr)$data, "test")
294294
test_type("integer", cr$aio)
295295
test_type("integer", send(ctxn, TRUE, mode = 0L, block = FALSE))
296296
test_type("externalptr", ctxn <- .context(rep))
297-
test_class("recvAio", cs <- request(.context(req$socket), data = TRUE, cv = NA, msgid = 12L))
297+
test_class("recvAio", cs <- request(.context(req$socket), data = TRUE, cv = NA))
298298
test_notnull(cs$data)
299299
test_true(recv(ctxn, block = 500))
300300
test_zero(send(ctxn, TRUE, mode = 1L, block = 500))
301+
test_class("recvAio", cs <- request(.context(req$socket), data = TRUE, timeout = 5, msgid = 12L))
302+
test_equal(5L, cs[])
303+
test_identical(c(0L, 12L), recv(ctxn, mode = 5L, block = 500))
301304
test_zero(reap(ctxn))
302305
test_equal(reap(ctxn), 7L)
303306
test_zero(pipe_notify(rep, cv, add = TRUE, flag = TRUE))
@@ -658,7 +661,7 @@ if (!interactive() && Sys.getenv("NOT_CRAN") == "true") {
658661

659662
if (Sys.info()[["sysname"]] == "Linux") {
660663
rm(list = ls())
661-
gc()
664+
invisible(gc())
662665
.Call(nanonext:::rnng_fini_priors)
663666
Sys.sleep(1L)
664667
.Call(nanonext:::rnng_fini)

0 commit comments

Comments
 (0)