-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hyd-dev
committed
Mar 13, 2021
1 parent
bc8093e
commit 7ecb5d8
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// run-fail | ||
// error-pattern:panicked at 'assertion failed: `(left == right)` | ||
// error-pattern: left: `2` | ||
// error-pattern:right: `3`: 1 + 1 definitely should be 3' | ||
// ignore-emscripten no processes | ||
|
||
fn main() { | ||
assert_eq!(1 + 1, 3, "1 + 1 definitely should be 3"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// run-fail | ||
// error-pattern:panicked at 'assertion failed: `(left matches right)` | ||
// error-pattern: left: `2` | ||
// error-pattern:right: `3`: 1 + 1 definitely should be 3' | ||
// ignore-emscripten no processes | ||
|
||
#![feature(assert_matches)] | ||
|
||
fn main() { | ||
assert_matches!(1 + 1, 3, "1 + 1 definitely should be 3"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// run-fail | ||
// error-pattern:panicked at 'assertion failed: `(left != right)` | ||
// error-pattern: left: `2` | ||
// error-pattern:right: `2`: 1 + 1 definitely should not be 2' | ||
// ignore-emscripten no processes | ||
|
||
fn main() { | ||
assert_ne!(1 + 1, 2, "1 + 1 definitely should not be 2"); | ||
} |