diff options
| author | bors <bors@rust-lang.org> | 2015-06-14 19:42:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-06-14 19:42:26 +0000 |
| commit | e89bb24cb267dfa1bf9acee6a06b3221114ae7f5 (patch) | |
| tree | 86f9732669315753701a11ac5831fd3bb42ee11b /src/test/run-fail | |
| parent | cc44423566726260e316d879a0a1dd9d3fb92e07 (diff) | |
| parent | bddb685e7322c8ffb9578ae9e5a3a161071b257b (diff) | |
| download | rust-e89bb24cb267dfa1bf9acee6a06b3221114ae7f5.tar.gz rust-e89bb24cb267dfa1bf9acee6a06b3221114ae7f5.zip | |
Auto merge of #26071 - petrochenkov:assert1, r=alexcrichton
`assert_eq!` has better diagnostics than `assert!` and is more helpful when something actually breaks, but the diagnostics has it's price - `assert_eq!` generate some formatting code which is slower to compile and possibly run. [My measurements](https://internals.rust-lang.org/t/assert-a-b-or-assert-eq-a-b/1367/12?u=petrochenkov) show that presence of this formatting code doesn't affect compilation + execution time of the test suite significantly, so `assert_eq!` can be used instead of `assert!` consistently. (Some tests doesn't reside in src/test, they are not affected by these changes, I'll probably open a separate PR for them later)
Diffstat (limited to 'src/test/run-fail')
| -rw-r--r-- | src/test/run-fail/panic.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/run-fail/panic.rs b/src/test/run-fail/panic.rs index 7c6473ebfc2..6773c6b9b51 100644 --- a/src/test/run-fail/panic.rs +++ b/src/test/run-fail/panic.rs @@ -9,4 +9,4 @@ // except according to those terms. // error-pattern:1 == 2 -fn main() { assert!((1 == 2)); } +fn main() { assert!(1 == 2); } |
