Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 2, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions src/test/run-pass/issue-8498.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => ()
}
}