Added a couple of test cases for sending messages. One works as expected, the other succeeds unexpectedly.

This commit is contained in:
Eric Holk 2011-05-18 11:38:41 -07:00
parent 4eb476fc75
commit 51e1ce292d
2 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,14 @@
/*
This program should hang on the r <- po line.
*/
fn main() {
let port[int] po = port();
let chan[int] ch = chan(po);
auto r <- po;
ch <| 42;
log_err r;
}

View file

@ -0,0 +1,15 @@
/*
This is about the simplest program that can successfully send a
message.
*/
fn main() {
let port[int] po = port();
let chan[int] ch = chan(po);
ch <| 42;
auto r <- po;
log_err r;
}