auto merge of #6099 : danluu/rust/xfail_clone, r=catamorphism
One of the tests seems to have no current equivalent that's similar. Please let me know if that's incorrect, and I'll try fixing it instead of deleting it. I suppose a struct could be used instead of `any` and `match type`, but it seems like the original intent of the test was to exercise `match type`
This commit is contained in:
commit
76ec35ae74
@ -1,14 +0,0 @@
|
||||
|
||||
// xfail-test
|
||||
|
||||
fn altsimple(any x) {
|
||||
match type (f) {
|
||||
case (int i) { print("int"); }
|
||||
case (str s) { print("str"); }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
altsimple(5);
|
||||
altsimple("asdfasdfsDF");
|
||||
}
|
@ -8,17 +8,21 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//xfail-test
|
||||
|
||||
extern mod std;
|
||||
use core::task::spawn;
|
||||
|
||||
fn f(x : @{a:int, b:int}) {
|
||||
assert!((x.a == 10));
|
||||
assert!((x.b == 12));
|
||||
struct Pair {
|
||||
a: int,
|
||||
b: int
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
let z : @{a:int, b:int} = @{ a : 10, b : 12};
|
||||
let p = task::_spawn(bind f(z));
|
||||
task::join_id(p);
|
||||
let z = ~Pair { a : 10, b : 12};
|
||||
|
||||
let f: ~fn() = || {
|
||||
assert!((z.a == 10));
|
||||
assert!((z.b == 12));
|
||||
};
|
||||
|
||||
spawn(f);
|
||||
}
|
||||
|
@ -15,16 +15,15 @@
|
||||
// xfail-test
|
||||
|
||||
extern mod std;
|
||||
use task::join;
|
||||
|
||||
fn loop(n: int) {
|
||||
let t1: task;
|
||||
let t2: task;
|
||||
|
||||
if n > 0 { t1 = spawn loop(n - 1); t2 = spawn loop(n - 1); }
|
||||
|
||||
|
||||
fn loopy(n: int) {
|
||||
if n > 0 { do spawn { loopy(n - 1) }; do spawn { loopy(n - 1) }; }
|
||||
loop { }
|
||||
}
|
||||
|
||||
pub fn main() { let t: task = spawn loop(5); join(t); }
|
||||
pub fn main() {
|
||||
// Commenting this out, as this will hang forever otherwise.
|
||||
// Even after seeing the comment above, I'm not sure what the
|
||||
// intention of this test is.
|
||||
// do spawn { loopy(5) };
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user