Skip to content

Commit 4375be6

Browse files
committed
auto merge of #19647 : nielsegberts/rust/master, r=pnkfelix
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.
2 parents 59287b0 + 2dc338d commit 4375be6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/libstd/macros.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ macro_rules! assert(
120120
/// ```
121121
#[macro_export]
122122
macro_rules! assert_eq(
123-
($given:expr , $expected:expr) => ({
124-
match (&($given), &($expected)) {
125-
(given_val, expected_val) => {
123+
($left:expr , $right:expr) => ({
124+
match (&($left), &($right)) {
125+
(left_val, right_val) => {
126126
// check both directions of equality....
127-
if !((*given_val == *expected_val) &&
128-
(*expected_val == *given_val)) {
127+
if !((*left_val == *right_val) &&
128+
(*right_val == *left_val)) {
129129
panic!("assertion failed: `(left == right) && (right == left)` \
130-
(left: `{}`, right: `{}`)", *given_val, *expected_val)
130+
(left: `{}`, right: `{}`)", *left_val, *right_val)
131131
}
132132
}
133133
}

0 commit comments

Comments
 (0)