about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-07-11 23:43:45 -0700
committerbors <bors@rust-lang.org>2013-07-11 23:43:45 -0700
commit09394774df9959069b96aa7e6fa3472ae880e549 (patch)
tree410bf661213adbb56a189c2ae1a5db46d9d1169e /src
parentcc4baac891b9de51d2bb78b7777ea33dd668cec7 (diff)
parent26f0a55f76e2b40c5308a86bb774b1b541b5d6fe (diff)
downloadrust-09394774df9959069b96aa7e6fa3472ae880e549.tar.gz
rust-09394774df9959069b96aa7e6fa3472ae880e549.zip
auto merge of #7695 : cmr/rust/assert_eq_msg, r=pnkfelix
This changes it from 

```
left: true does not equal right: false
```

to

```
assertion failed: `(left == right) && (right == left)` (left: `true`, right: `false`)
```
Diffstat (limited to 'src')
-rw-r--r--src/libsyntax/ext/expand.rs3
-rw-r--r--src/test/run-fail/assert-eq-macro-fail.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 71e0d49493b..b5d7d94c313 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -531,7 +531,8 @@ pub fn core_macros() -> @str {
                 let expected_val = $expected;
                 // check both directions of equality....
                 if !((given_val == expected_val) && (expected_val == given_val)) {
-                    fail!(\"left: %? does not equal right: %?\", given_val, expected_val);
+                    fail!(\"assertion failed: `(left == right) && (right == \
+                    left)` (left: `%?`, right: `%?`)\", given_val, expected_val);
                 }
             }
         )
diff --git a/src/test/run-fail/assert-eq-macro-fail.rs b/src/test/run-fail/assert-eq-macro-fail.rs
index facfb89409c..a31bd25a6f1 100644
--- a/src/test/run-fail/assert-eq-macro-fail.rs
+++ b/src/test/run-fail/assert-eq-macro-fail.rs
@@ -1,4 +1,4 @@
-// error-pattern:left: 14 does not equal right: 15
+// error-pattern:assertion failed: `(left == right) && (right == left)` (left: `14`, right: `15`)
 
 #[deriving(Eq)]
 struct Point { x : int }