about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-12-16 14:50:58 +0000
committerbors <bors@rust-lang.org>2014-12-16 14:50:58 +0000
commit4375be65a4197629d4542b366d4c5cf80ebfbb94 (patch)
treeab15a43ca9898349564170044ce7d8e4aa575387 /src/libstd
parent59287b01704f14cb887f543147788001813b7f9b (diff)
parent2dc338dfdb964a3a3ba6b434143c29ebe4233c7e (diff)
downloadrust-4375be65a4197629d4542b366d4c5cf80ebfbb94.tar.gz
rust-4375be65a4197629d4542b366d4c5cf80ebfbb94.zip
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.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/macros.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index 9cc165ce570..a02b37fcfd1 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -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)
                 }
             }
         }