Skip to content

Commit

Permalink
add monitor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Dec 31, 2024
1 parent 1d32e73 commit c28443f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ test_zero(n$send(1:5, mode = "r"))
test_equal(length(n1$recv("int", 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")
Expand Down Expand Up @@ -387,6 +388,9 @@ test_zero(reap(poly2))
test_zero(reap(poly1))
test_true(wait(cv))
test_type("integer", read_monitor(m))
test_error(read_monitor(poly), "valid Monitor")
test_error(monitor("socket", "cv"), "valid Socket")
test_error(monitor(poly, "cv"), "valid Condition Variable")
test_zero(reap(poly))

test_class("nanoSocket", bus <- socket(protocol = "bus"))
Expand Down

0 comments on commit c28443f

Please sign in to comment.