diff options
| author | Dan Luu <danluu@gmail.com> | 2013-04-28 14:50:04 -0400 |
|---|---|---|
| committer | Dan Luu <danluu@gmail.com> | 2013-04-28 14:50:04 -0400 |
| commit | 9968ccfc303f6cc6fed614118400faabcb9a6760 (patch) | |
| tree | 30e49e5d6daf2bab99bd7e44626419f4a895b6ca | |
| parent | cdd342bd34a7036cf1ddf3f6832c73fa018f305b (diff) | |
| download | rust-9968ccfc303f6cc6fed614118400faabcb9a6760.tar.gz rust-9968ccfc303f6cc6fed614118400faabcb9a6760.zip | |
Update old xfailing spawn/bind/join test
| -rw-r--r-- | src/test/run-pass/clone-with-exterior.rs | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/test/run-pass/clone-with-exterior.rs b/src/test/run-pass/clone-with-exterior.rs index f0734e285b2..57c4f91142d 100644 --- a/src/test/run-pass/clone-with-exterior.rs +++ b/src/test/run-pass/clone-with-exterior.rs @@ -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); } |
