diff options
| author | bors <bors@rust-lang.org> | 2013-04-29 11:57:40 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-04-29 11:57:40 -0700 |
| commit | 76ec35ae743ee299484a48b233bc64cf3779097d (patch) | |
| tree | 8bc170b7075bbda7d489b23746ce0f0075bfaeb1 | |
| parent | 32901104cb54a37211ac1c05f377f69ee702485c (diff) | |
| parent | e9814da3c0959247a79cffca8af3f07d124a8e49 (diff) | |
| download | rust-76ec35ae743ee299484a48b233bc64cf3779097d.tar.gz rust-76ec35ae743ee299484a48b233bc64cf3779097d.zip | |
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`
| -rw-r--r-- | src/test/run-pass/alt-type-simple.rs | 14 | ||||
| -rw-r--r-- | src/test/run-pass/clone-with-exterior.rs | 20 | ||||
| -rw-r--r-- | src/test/run-pass/infinite-loops.rs | 17 |
3 files changed, 20 insertions, 31 deletions
diff --git a/src/test/run-pass/alt-type-simple.rs b/src/test/run-pass/alt-type-simple.rs deleted file mode 100644 index dbe9ae7cba5..00000000000 --- a/src/test/run-pass/alt-type-simple.rs +++ /dev/null @@ -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"); -} 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); } diff --git a/src/test/run-pass/infinite-loops.rs b/src/test/run-pass/infinite-loops.rs index 62644fc678e..611a4b9ccab 100644 --- a/src/test/run-pass/infinite-loops.rs +++ b/src/test/run-pass/infinite-loops.rs @@ -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) }; +} |
