mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Update and un-xfail tests
This commit is contained in:
parent
12a4130749
commit
624fbbd3d1
@ -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(); }
|
||||
|
@ -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();
|
||||
}
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user