Skip to content

Commit 69eda46

Browse files
committed
Add a run-pass test for linked failure
1 parent 103197b commit 69eda46

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/test/run-pass/linked-failure.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// -*- rust -*-
2+
3+
// error-pattern:1 == 2
4+
use std;
5+
import std::task;
6+
import std::comm::port;
7+
import std::comm::recv;
8+
9+
fn child() { assert (1 == 2); }
10+
11+
fn parent() {
12+
// Since this task isn't supervised it won't bring down the whole
13+
// process
14+
task::unsupervise();
15+
let p = port::<int>();
16+
let f = child;
17+
task::spawn(f);
18+
let x = recv(p);
19+
}
20+
21+
fn main() {
22+
let f = parent;
23+
task::spawn(f);
24+
}

0 commit comments

Comments
 (0)