| 47 | use crate::sandbox::Sandbox; |
| 48 | #[flow_rs::rt::test] |
| 49 | async fn test_bcast() { |
| 50 | let bcast = Sandbox::pure("Bcast").unwrap(); |
| 51 | let input = bcast.input("inp").unwrap(); |
| 52 | let output = bcast.output("out").unwrap(); |
| 53 | let handle = bcast.start(); |
| 54 | input.send(Envelope::new(0usize)).await.ok(); |
| 55 | let envelope = output.recv::<usize>().await; |
| 56 | assert!(envelope.is_ok()); |
| 57 | let envelope = envelope.unwrap(); |
| 58 | assert_eq!(envelope.get_ref(), &0); |
| 59 | assert!(output.is_empty()); |
| 60 | input.close(); |
| 61 | handle.await.unwrap(); |
| 62 | } |
| 63 | } |