@@ -10,6 +10,9 @@ nanotest(inherits(n, "nanoObject"))
1010nanotest(inherits(n $ socket , " nanoSocket" ))
1111nanotest(inherits(n $ socket , " nano" ))
1212nanotest(identical(is_nano(n ), TRUE ))
13+ n $ newmethod <- " doesnotwork"
14+ nanotest(is.null(n $ newmethod ))
15+
1316nanotest(is.integer(attr(n $ socket , " id" )))
1417nanotest(n $ socket $ state == " opened" )
1518nanotest(n $ socket $ protocol == " pair" )
@@ -46,18 +49,24 @@ nanotest(identical(is_nano(saio), FALSE))
4649nanotestn(saio [[" aio" ]])
4750nanotestn(saio $ result )
4851raio <- n1 $ recv_aio(timeout = 500 )
49- nanotest(identical(is_aio(raio ), TRUE ))
52+ raio $ newfield <- " doesnotwork"
53+ nanotest(is.null(raio $ newfield ))
54+ nanotest(is_aio(raio ) == TRUE )
5055nanotestn(raio [[" aio" ]])
51- nanotestn(raio $ data )
5256nanotestn(raio $ raw )
57+ nanotestn(raio $ data )
5358saio <- n $ send_aio(c(1.1 , 2.2 ), mode = " raw" , timeout = 500 )
59+ saio $ newfield <- " doesnotwork"
60+ nanotest(is.null(saio $ newfield ))
61+ nanotest(is_aio(saio ) == TRUE )
5462nanotest(is.logical(unresolved(saio )))
5563msg <- n1 $ recv_aio(mode = " double" , timeout = 500 , keep.raw = FALSE )
5664nanotest(is.null(stop_aio(msg )))
5765nanotest(is.null(stop_aio(n )))
5866nanotest(identical(call_aio(msg ), msg ))
67+ nanotestn(tryCatch(msg $ data , error = function (e ) 0L ))
5968nanotest(identical(call_aio(n ), n ))
60- nanotest(identical( is_aio(n ), FALSE ) )
69+ nanotest(is_aio(n ) == FALSE )
6170
6271xc <- n $ dial(url = " inproc://two" , autostart = TRUE )
6372nanotest(is.integer(xc ))
@@ -97,10 +106,11 @@ msg <- recv_aio(ctx1, mode = "serial", timeout = 400, keep.raw = FALSE)
97106nanotest(is.logical(unresolved(msg )))
98107nanotestn(call_aio(msg )$ data )
99108nanotest(unresolved(msg ) == FALSE )
100- nanotestwn(send(ctx , c(TRUE , FALSE , TRUE ), block = 500 ))
101- msg <- recv_aio(ctx1 , mode = " logical" , timeout = 500 )
102- nanotestn(call_aio(msg )$ raw )
103- nanotestwn(request(ctx , data.frame (), recv_mode = " complex" , timeout = 100 ))
109+ nanotestwn(send(ctx , c(TRUE , FALSE , TRUE ), block = 300 ))
110+ msg <- recv_aio(ctx1 , mode = " logical" , timeout = 300 )
111+ nanotestn(msg $ raw )
112+ nanotestwn(request(ctx , c(1 + 3i , 4 + 2i ), recv_mode = " complex" , timeout = 300 ))
113+ nanotestwn(reply(ctx1 , execute = identity , send_mode = " raw" , timeout = 300 ))
104114nanotest(close(ctx ) == 0L )
105115nanotestw(close(ctx ) > 0L )
106116nanotest(ctx $ state == " closed" )
@@ -124,6 +134,7 @@ nanotest(survey_time(sock, time = 5000) == 0L)
124134nanotest(close(sock ) == 0L )
125135nanotest(close(sock2 ) == 0L )
126136
137+ nanotestwn(ncurl(" http://www.cam.ac.uk/" ))
127138nanotestwn(ncurl(" http://httpbin.org/post" , convert = FALSE , method = " POST" , headers = c(`Content-Type` = " text/plain" ), data = " test" ))
128139nanotestwn(ncurl(" http://httpbin.org/post" , convert = FALSE , method = " POST" , headers = list (`Content-Type` = " text/plain" )))
129140nanotestwn(ncurl(" http://httpbin.org/put" , async = TRUE , method = " PUT" , headers = c(Authorization = " Bearer token" ), data = " test" ))
@@ -135,6 +146,8 @@ nanotest(is.character(ver <- nng_version()) && length(ver) == 2L)
135146nanotest(is.character(nng_error(0L )))
136147nanotest(is_nul_byte(as.raw(0L )) && ! is_nul_byte(NULL ))
137148nanotest(! is_error_value(1L ))
149+ nanotestwn(messenger(" invalidURL" ))
150+ nanotestn(tryCatch(.mirai_scm(), error = function (e ) 0L ))
138151
139152nanotest(inherits(bus <- socket(protocol = " bus" ), " nanoSocket" ))
140153nanotest(inherits(push <- socket(protocol = " push" ), " nanoSocket" ))
0 commit comments