Yet another comm interface.
This commit is contained in:
parent
72b2f8207d
commit
efac7c9a19
3 changed files with 36 additions and 17 deletions
|
|
@ -17,3 +17,11 @@ fn send_recv() {
|
|||
log_err v;
|
||||
assert(42 == v);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn send_recv_fn() {
|
||||
let p = comm::port::<int>();
|
||||
let c = comm::chan::<int>(p);
|
||||
comm::send(c, 42);
|
||||
assert(comm::recv(p) == 42);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue