summary refs log tree commit diff
path: root/src/test/run-pass/decl-with-recv.rs
blob: b594e5334c46ae0f49d70415131e0f3123e785e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// -*- rust -*-

extern mod std;
use comm::Port;
use comm::Chan;
use comm::send;
use comm::recv;

fn main() {
    let po = Port();
    let ch = Chan(&po);
    send(ch, 10);
    let i = recv(po);
    assert (i == 10);
    send(ch, 11);
    let j = recv(po);
    assert (j == 11);
}