Skip to content

Commit

Permalink
un-xfail test for #8498 and replace prints w/ asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
jfager committed Feb 1, 2014
1 parent 1d49419 commit e704561
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/test/run-pass/issue-8498.rs
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 => ()
}
}

5 comments on commit e704561

@bors
Copy link
Contributor

@bors bors commented on e704561 Feb 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at jfager@e704561

@bors
Copy link
Contributor

@bors bors commented on e704561 Feb 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging jfager/rust/r8498 = e704561 into auto

@bors
Copy link
Contributor

@bors bors commented on e704561 Feb 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jfager/rust/r8498 = e704561 merged ok, testing candidate = 16f1a72

@bors
Copy link
Contributor

@bors bors commented on e704561 Feb 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on e704561 Feb 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 16f1a72

Please sign in to comment.