un-xfail test for #8498 and replace prints w/ asserts

This commit is contained in:
Jason Fager 2014-02-01 12:36:59 -05:00
parent 1d494198bb
commit e704561003

View File

@ -8,36 +8,28 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// xfail-test
pub fn main() {
// This is ok
match &[(~5,~7)] {
ps => {
let (ref y, _) = ps[0];
println!("1. y = {}", **y);
assert!(**y == 5);
}
}
// This is not entirely ok
match Some(&[(~5,)]) {
Some(ps) => {
let (ref y,) = ps[0];
println!("2. y = {}", **y);
if **y != 5 { println!("sadness"); }
assert!(**y == 5);
}
None => ()
}
// This is not ok
match Some(&[(~5,~7)]) {
Some(ps) => {
let (ref y, ref z) = ps[0];
println!("3. y = {} z = {}", **y, **z);
assert!(**y == 5);
assert!(**z == 7);
}
None => ()
}
}