Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions src/test/run-pass/alt-type-simple.rs

This file was deleted.

20 changes: 12 additions & 8 deletions src/test/run-pass/clone-with-exterior.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
17 changes: 8 additions & 9 deletions src/test/run-pass/infinite-loops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) };
}