Update and un-xfail tests

This commit is contained in:
Tim Chevalier 2012-11-15 19:50:53 -08:00
parent 12a4130749
commit 624fbbd3d1
5 changed files with 37 additions and 33 deletions

View File

@ -1,13 +1,13 @@
// xfail-test
// Fail statements without arguments need to be disambiguated in
// certain positions
// error-pattern:explicit-failure
// error-pattern:oops
fn bigfail() {
do { while (fail) { if (fail) {
match (fail) { _ {
}}
}}} while fail;
while (fail ~"oops") { if (fail) {
match (fail) { () => {
}
}
}};
}
fn main() { bigfail(); }

View File

@ -1,27 +1,29 @@
// error-pattern:ran out of stack
// xfail-test - right now we leak when we fail during failure
// Test that the task fails after hiting the recursion limit
// durnig unwinding
// during unwinding
fn recurse() {
log(debug, "don't optimize me out");
recurse();
}
class r {
let recursed: *mut bool;
new(recursed: *mut bool) unsafe { self.recursed = recursed; }
drop unsafe {
if !*recursed {
*recursed = true;
recurse();
struct r {
recursed: *mut bool,
drop unsafe {
if !*(self.recursed) {
*(self.recursed) = true;
recurse();
}
}
}
}
fn r(recursed: *mut bool) -> r unsafe {
r { recursed: recursed }
}
fn main() {
let mut recursed = false;
let _r = r(ptr::mut_addr_of(recursed));
let _r = r(ptr::mut_addr_of(&recursed));
recurse();
}

View File

@ -1,11 +1,12 @@
// error-pattern:fail
// xfail-test
// error-pattern:squirrel
class r {
new(i:int) {}
drop { fail; }
struct r {
i: int,
drop { fail ~"squirrel" }
}
fn r(i: int) -> r { r { i: i } }
fn main() {
@0;
let r = move r(0);

View File

@ -1,11 +1,12 @@
// error-pattern:fail
// xfail-test
// error-pattern:wombat
class r {
new(i:int) {}
drop { fail; }
struct r {
i: int,
drop { fail ~"wombat" }
}
fn r(i: int) -> r { r { i: i } }
fn main() {
@0;
let r = move r(0);

View File

@ -1,15 +1,15 @@
// error-pattern:quux
// xfail-test
class faily_box {
let i: @int;
new(i: @int) { self.i = i; }
// What happens to the box pointer owned by this class?
struct faily_box {
i: @int
}
// What happens to the box pointer owned by this class?
fn faily_box(i: @int) -> faily_box { faily_box { i: i } }
impl faily_box : Drop {
fn finalize() {
fail "quux";
fail ~"quux";
}
}