Skip to content

Commit

Permalink
auto merge of #19647 : nielsegberts/rust/master, r=pnkfelix
Browse files Browse the repository at this point in the history
The names expected and actual are not used anymore in the output. It also
removes the confusion that the argument order is the opposite of junit.

Bug #7330 is relevant.
  • Loading branch information
bors committed Dec 16, 2014
2 parents 59287b0 + 2dc338d commit 4375be6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/libstd/macros.rs
Expand Up @@ -120,14 +120,14 @@ macro_rules! assert(
/// ```
#[macro_export]
macro_rules! assert_eq(
($given:expr , $expected:expr) => ({
match (&($given), &($expected)) {
(given_val, expected_val) => {
($left:expr , $right:expr) => ({
match (&($left), &($right)) {
(left_val, right_val) => {
// check both directions of equality....
if !((*given_val == *expected_val) &&
(*expected_val == *given_val)) {
if !((*left_val == *right_val) &&
(*right_val == *left_val)) {
panic!("assertion failed: `(left == right) && (right == left)` \
(left: `{}`, right: `{}`)", *given_val, *expected_val)
(left: `{}`, right: `{}`)", *left_val, *right_val)
}
}
}
Expand Down

0 comments on commit 4375be6

Please sign in to comment.