@@ -70,7 +70,7 @@ test_equal(n1$dialer[[1]]$state, "started")
70
70
71
71
test_error(n $ send(list (), mode = " raw" ), " atomic vector type" )
72
72
test_error(n $ recv(mode = " none" ), " mode" )
73
- test_error(n $ recv(mode = " c " ), " mode" )
73
+ test_error(n $ recv(mode = " charac " ), " mode" )
74
74
test_true(is_aio(raio <- n1 $ recv_aio(timeout = 1L )))
75
75
test_print(raio )
76
76
test_class(" errorValue" , call_aio(raio )$ data )
@@ -84,8 +84,8 @@ if (is_error_value(r)) r <- n1$recv(block = 500)
84
84
test_class(" data.frame" , r )
85
85
test_zero(n1 $ send(c(" test" , " " , " spec" ), mode = " raw" , block = 500 ))
86
86
test_identical(n $ recv(" character" , block = 500 ), c(" test" , " " , " spec" ))
87
- test_zero(n $ send(1 : 5 , mode = " r " ))
88
- test_equal(length(n1 $ recv(" int " , block = 500 )), 5L )
87
+ test_zero(n $ send(1 : 5 , mode = " raw " ))
88
+ test_equal(length(n1 $ recv(" integer " , block = 500 )), 5L )
89
89
test_true(is_aio(saio <- n1 $ send_aio(paste(replicate(5 , random(1e3L )), collapse = " " ), mode = 1L , timeout = 900 )))
90
90
test_print(saio )
91
91
if (later ) test_null(.keep(saio , new.env()))
@@ -103,37 +103,37 @@ saio$newfield <- "doesnotwork"
103
103
test_null(saio $ newfield )
104
104
test_type(" logical" , unresolved(saio ))
105
105
test_type(" logical" , .unresolved(saio ))
106
- test_class(" recvAio" , msg <- n1 $ recv_aio(mode = " numer " , timeout = 500 ))
106
+ test_class(" recvAio" , msg <- n1 $ recv_aio(mode = " numeric " , timeout = 500 ))
107
107
test_identical(call_aio(msg ), msg )
108
108
test_class(" recvAio" , msg <- n1 $ recv_aio(mode = " complex" , timeout = 500 ))
109
109
test_null(stop_aio(msg ))
110
110
test_null(stop_aio(n ))
111
111
test_identical(call_aio(msg ), msg )
112
112
test_class(" errorValue" , msg $ data )
113
113
test_identical(call_aio(n ), n )
114
- test_class(" sendAio" , sraio <- n $ send_aio(as.raw(0L ), mode = " r " , timeout = 500 ))
114
+ test_class(" sendAio" , sraio <- n $ send_aio(as.raw(0L ), mode = " raw " , timeout = 500 ))
115
115
test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = 1L , timeout = 500 ))
116
116
test_true(is_nul_byte(suppressWarnings(call_aio_(rraio )$ data )))
117
- test_class(" sendAio" , sraio <- n $ send_aio(as.raw(1L ), mode = " ra " , timeout = 500 ))
117
+ test_class(" sendAio" , sraio <- n $ send_aio(as.raw(1L ), mode = 2L , timeout = 500 ))
118
118
test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = " raw" , timeout = 500 ))
119
119
test_type(" raw" , call_aio(rraio )$ data )
120
120
test_class(" sendAio" , sraio <- n $ send_aio(c(1 + 2i , 4 + 3i ), mode = " raw" , timeout = 500 ))
121
- test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = " co " , timeout = 500 ))
121
+ test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = " complex " , timeout = 500 ))
122
122
test_type(" complex" , call_aio(rraio )$ data )
123
123
test_class(" sendAio" , sraio <- n $ send_aio(5 , mode = " raw" , timeout = 500 ))
124
- test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = " d " , timeout = 500 ))
124
+ test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = " double " , timeout = 500 ))
125
125
test_type(" double" , call_aio(rraio )$ data )
126
126
test_class(" sendAio" , sraio <- n $ send_aio(c(1 , 2 ), mode = " raw" , timeout = 500 ))
127
- test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = " n " , timeout = 500 ))
127
+ test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = " numeric " , timeout = 500 ))
128
128
test_true(is.numeric(call_aio(rraio )$ data ))
129
129
test_class(" sendAio" , sraio <- n $ send_aio(c(1L , 2L , 3L ), mode = " raw" , timeout = 500 ))
130
- test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = " i " , timeout = 500 ))
130
+ test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = " integer " , timeout = 500 ))
131
131
test_type(" integer" , call_aio(rraio )$ data )
132
132
test_class(" sendAio" , sraio <- n $ send_aio(as.raw(0L ), mode = " raw" , timeout = 500 ))
133
133
test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = " double" , timeout = 500 ))
134
134
test_type(" raw" , suppressWarnings(call_aio(rraio )$ data ))
135
135
test_class(" sendAio" , sraio <- n $ send_aio(as.raw(0L ), mode = " raw" , timeout = 500 ))
136
- test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = " int " , timeout = 500 ))
136
+ test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = " integer " , timeout = 500 ))
137
137
test_type(" raw" , suppressWarnings(call_aio(rraio )$ data ))
138
138
test_class(" sendAio" , sraio <- n $ send_aio(as.raw(0L ), mode = " raw" , timeout = 500 ))
139
139
test_class(" recvAio" , rraio <- n1 $ recv_aio(mode = " logical" , timeout = 500 ))
@@ -210,7 +210,7 @@ test_class("nanoContext", ctx <- context(rep))
210
210
test_print(ctx )
211
211
test_equal(.header(12345L ), 12345L )
212
212
test_true(.mark())
213
- test_class(" sendAio" , csaio <- req $ send_aio(data.frame (), mode = " seria " , timeout = 500 ))
213
+ test_class(" sendAio" , csaio <- req $ send_aio(data.frame (), mode = 1L , timeout = 500 ))
214
214
test_zero(call_aio_(csaio )$ result )
215
215
test_class(" recvAio" , craio <- recv_aio(ctx , mode = 8L , timeout = 500 ))
216
216
test_type(" raw" , res <- collect_aio(craio ))
@@ -223,8 +223,8 @@ test_equal(.header(0L), 0L)
223
223
test_true(! .mark(FALSE ))
224
224
test_zero(req $ send(" context test" , mode = " raw" , block = 500 ))
225
225
test_equal(recv(ctx , mode = " string" , block = 500 ), " context test" )
226
- test_type(" integer" , req $ send(data.frame (), mode = " seri " , block = 500 ))
227
- test_class(" recvAio" , msg <- recv_aio(ctx , mode = " ser " , timeout = 500 ))
226
+ test_type(" integer" , req $ send(data.frame (), mode = " serial " , block = 500 ))
227
+ test_class(" recvAio" , msg <- recv_aio(ctx , mode = " serial " , timeout = 500 ))
228
228
test_type(" logical" , .unresolved(msg ))
229
229
test_type(" logical" , unresolved(msg ))
230
230
test_class(" data.frame" , call_aio(msg )$ data )
@@ -249,7 +249,7 @@ test_null(call_aio(recv_aio(ctx, mode = 1L, timeout = 500))[["value"]])
249
249
test_class(" sendAio" , saio <- send_aio(ctx , as.raw(1L ), mode = 2L , timeout = 500 ))
250
250
test_identical(req $ recv(mode = 8L , block = 500 ), as.raw(1L ))
251
251
test_class(" recvAio" , rek <- request(req $ context , c(1 + 3i , 4 + 2i ), send_mode = 2L , recv_mode = " complex" , timeout = 500 ))
252
- test_zero(reply(ctx , execute = identity , recv_mode = 3L , send_mode = " ra " , timeout = 500 ))
252
+ test_zero(reply(ctx , execute = identity , recv_mode = 3L , send_mode = " raw " , timeout = 500 ))
253
253
test_type(" complex" , call_aio(rek )[[" data" ]])
254
254
test_class(" recvAio" , rek <- request(req $ context , c(1 + 3i , 4 + 2i ), send_mode = " serial" , recv_mode = " serial" , timeout = 500 ))
255
255
test_zero(reply(ctx , execute = identity , recv_mode = 1L , send_mode = 1L , timeout = 500 ))
@@ -505,7 +505,7 @@ if (is_nano(s)) test_notnull(recv(s, block = FALSE))
505
505
if (is_nano(s )) test_type(" integer" , send(s , " message2" , block = FALSE ))
506
506
if (is_nano(s )) test_notnull(suppressWarnings(recv(s , mode = 9L , block = 100 )))
507
507
if (is_nano(s )) test_type(" integer" , send(s , 2L , block = 500 ))
508
- if (is_nano(s )) test_class(" recvAio" , sr <- recv_aio(s , mode = " i " , timeout = 500L , n = 8192L ))
508
+ if (is_nano(s )) test_class(" recvAio" , sr <- recv_aio(s , mode = " integer " , timeout = 500L , n = 8192L ))
509
509
if (is_nano(s )) test_notnull(suppressWarnings(call_aio(sr )[[" data" ]]))
510
510
if (is_nano(s )) test_null(stop_aio(sr ))
511
511
if (is_nano(s )) test_class(" sendAio" , ss <- send_aio(s , " async" , timeout = 500L ))
@@ -518,7 +518,7 @@ if (is_nano(s)) test_true(cv_value(cv) > 0L)
518
518
if (is_nano(s )) test_type(" character" , opt(s , " ws:request-headers" ))
519
519
if (is_nano(s )) test_notnull(opt(s , " tcp-nodelay" ) <- FALSE )
520
520
if (is_nano(s )) test_error(recv(s , mode = " none" , block = FALSE ), " should be one of character" )
521
- if (is_nano(s )) test_error(recv(s , mode = " c " , block = FALSE ), " should be one of character" )
521
+ if (is_nano(s )) test_error(recv(s , mode = " charac " , block = FALSE ), " should be one of character" )
522
522
if (is_nano(s )) test_error(opt(s , " none" ), " supported" )
523
523
if (is_nano(s )) test_error(`opt<-`(s , " none" , list ()), " supported" )
524
524
if (is_nano(s )) test_print(s )
0 commit comments