rust/src/test/run-pass/many.rs
Brian Anderson c53402846e Remove all xfail-stage0 directives
While it is still technically possible to test stage 0, it is not part of any
of the main testing rules and maintaining xfail-stage0 is a chore. Nobody
should worry about how tests fare in stage0.
2011-08-03 10:55:59 -07:00

24 lines
430 B
Rust

// xfail-stage1
// xfail-stage2
// xfail-stage3
// -*- rust -*-
fn sub(chan[int] parent, int id) {
if (id == 0) {
parent <| 0;
} else {
let port[int] p = port();
auto child = spawn sub(chan(p), id-1);
let int y; p |> y;
parent <| y + 1;
}
}
fn main() {
let port[int] p = port();
auto child = spawn sub(chan(p), 500);
let int p |> y;
log "transmission complete";
log y;
assert (y == 500);
}