@@ -126,22 +126,30 @@ async fn test_async_sleep() {
126
126
println ! ( "test_async_sleep(): $$" ) ;
127
127
}
128
128
129
- async fn test_async_blockwise_get ( ) {
130
- println ! ( "test_async_blockwise_get(): ^^" ) ;
129
+ async fn test_blockwise_all ( ) {
130
+ println ! ( "test_blockwise_all(): ^^" ) ;
131
+ crate :: test_blockwise ( "[::1]:5683" ) . await . unwrap ( ) ;
132
+ println ! ( "test_blockwise_all(): $$" ) ;
133
+ }
134
+
135
+ async fn test_async_blockwise ( ) {
136
+ println ! ( "test_async_blockwise(): ^^" ) ;
131
137
132
138
let mut bs = crate :: Xbd :: async_gcoap_get_blockwise (
133
139
"[::1]:5683" , "/const/song.txt" ) . unwrap ( ) ;
134
140
while let Some ( req) = bs. next ( ) . await {
135
141
println ! ( "@@ out: {:?}" , req. await ) ;
136
142
}
137
143
138
- println ! ( "test_async_blockwise_get (): $$" ) ;
144
+ println ! ( "test_async_blockwise (): $$" ) ;
139
145
}
140
146
141
147
async fn test_heapless_req ( ) {
142
148
println ! ( "test_heapless_req(): ^^" ) ;
143
- let out = crate :: Xbd :: async_gcoap_get ( "[::1]" , "/.well-known/core" ) . await ;
144
- println ! ( "@@ out: {:?}" , out) ;
149
+ println ! ( "-------- out-0:" ) ;
150
+ println ! ( "{:?}" , crate :: Xbd :: async_gcoap_get( "[::1]" , "/.well-known/core" ) . await ) ;
151
+ println ! ( "-------- out-1:" ) ;
152
+ println ! ( "{:?}" , crate :: Xbd :: async_gcoap_get( "[::1]" , "/cli/stats" ) . await ) ;
145
153
println ! ( "test_heapless_req(): $$" ) ;
146
154
}
147
155
@@ -162,6 +170,7 @@ const ARRAY_ALIAS_ENUMERATED: &[&str] = &[
162
170
163
171
const ARRAY_ALIAS_FUNCTION : & [ & str ] = & [
164
172
"f" ,
173
+ "b" ,
165
174
"f0" ,
166
175
"f1" ,
167
176
"f2" ,
@@ -172,9 +181,10 @@ const ARRAY_ALIAS_FUNCTION: &[&str] = &[
172
181
async fn run_function_alias ( name : & str ) {
173
182
match name {
174
183
"f" => test_heapless_req ( ) . await , // !!!!
184
+ "b" => test_blockwise_all ( ) . await , // nn | a debug, b
175
185
"f0" => ( || println ! ( "hello world!" ) ) ( ) ,
176
186
"f1" => test_async_sleep ( ) . await ,
177
- "f2" => test_async_blockwise_get ( ) . await ,
187
+ "f2" => test_async_blockwise ( ) . await ,
178
188
"f3" => crate :: test_blockwise ( "[::1]:5683" ) . await . unwrap ( ) ,
179
189
_ => println ! ( "function alias [{}] is not defined!" , name) ,
180
190
}
0 commit comments