Rehabilitate run-fail/trivial-message2
This commit is contained in:
parent
58d812f0f8
commit
a609da7c15
2 changed files with 19 additions and 13 deletions
19
src/test/run-fail/task-comm-recv-block.rs
Normal file
19
src/test/run-fail/task-comm-recv-block.rs
Normal 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";
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue