]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/issue-3168.rs
Disable linked failure tests
[rust.git] / src / test / run-pass / issue-3168.rs
1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // xfail-test linked failure
12 // xfail-fast
13 // xfail-win32 #7999
14
15 use std::comm;
16 use std::task;
17
18 pub fn main() {
19     let (p,c) = comm::stream();
20     do task::try || {
21         let (p2,c2) = comm::stream();
22         do task::spawn || {
23             p2.recv();
24             error!("sibling fails");
25             fail!();
26         }
27         let (p3,c3) = comm::stream();
28         c.send(c3);
29         c2.send(());
30         error!("child blocks");
31         p3.recv();
32     };
33     error!("parent tries");
34     assert!(!p.recv().try_send(()));
35     error!("all done!");
36 }