File tree Expand file tree Collapse file tree 4 files changed +152
-137
lines changed
rust/ql/test/library-tests/dataflow/models Expand file tree Collapse file tree 4 files changed +152
-137
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,16 @@ fn test_apply_flow_through() {
203
203
sink ( t) ; // $ hasValueFlow=33
204
204
}
205
205
206
+ async fn get_async_number ( a : i64 ) -> i64 {
207
+ 37
208
+ }
209
+
210
+ async fn test_get_async_number ( ) {
211
+ let s = source ( 46 ) ;
212
+ let t = get_async_number ( s) . await ;
213
+ sink ( t) ; // $ MISSING: hasValueFlow=46
214
+ }
215
+
206
216
impl MyFieldEnum {
207
217
// has a source model
208
218
fn source ( & self , i : i64 ) -> MyFieldEnum {
@@ -268,7 +278,8 @@ fn test_simple_sink() {
268
278
simple_sink ( s) ; // $ hasValueFlow=17
269
279
}
270
280
271
- fn main ( ) {
281
+ #[ tokio:: main]
282
+ async fn main ( ) {
272
283
test_identify ( ) ;
273
284
test_get_var_pos ( ) ;
274
285
test_set_var_pos ( ) ;
@@ -286,5 +297,6 @@ fn main() {
286
297
test_enum_method_sink ( ) ;
287
298
test_simple_source ( ) ;
288
299
test_simple_sink ( ) ;
300
+ test_get_async_number ( ) . await ;
289
301
let dummy = Some ( 0 ) ; // ensure that the the `lang:core` crate is extracted
290
302
}
You can’t perform that action at this time.
0 commit comments