Rehabilitate run-fail/trivial-message2

This commit is contained in:
Brian Anderson 2011-09-20 11:59:25 -07:00
parent 58d812f0f8
commit a609da7c15
2 changed files with 19 additions and 13 deletions

View file

@ -0,0 +1,19 @@
// error-pattern:goodfail
use std;
import std::task;
import std::comm;
fn goodfail() {
task::yield();
fail "goodfail";
}
fn main() {
task::spawn(bind goodfail());
let po = comm::port();
// We shouldn't be able to get past this recv since there's no
// message available
let i: int = comm::recv(po);
fail "badfail";
}

View file

@ -1,13 +0,0 @@
// xfail-test
/*
This program should hang on the po |> r line.
*/
fn main() {
let po: port<int> = port();
let ch: chan<int> = chan(po);
let r;
po |> r;
ch <| 42;
log_err r;
}