1
Fork 0

Add xfailed test cases

This commit is contained in:
Tim Chevalier 2012-11-01 14:43:26 -07:00
parent 9d276b11e5
commit 3d8df9947f
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,18 @@
// xfail-test
enum side { mayo, catsup, vinegar }
enum order { hamburger, fries(side), shake }
enum meal { to_go(order), for_here(order) }
fn foo(m: @meal, cond: bool) {
match *m {
to_go(_) => { }
for_here(_) if cond => {}
for_here(hamburger) => {}
for_here(fries(_s)) => {}
for_here(shake) => {}
}
}
fn main() {
foo(@for_here(hamburger), true)
}

View file

@ -0,0 +1,9 @@
// xfail-test
fn main() {
enum State { BadChar, BadSyntax }
match BadChar {
_ if true => BadChar,
BadChar | BadSyntax => fail ,
};
}