rust/tests/ui/macros/assert-matches-macro-msg.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
339 B
Rust
Raw Normal View History

2021-03-13 11:14:57 +00:00
//@ run-fail
//@ error-pattern:assertion `left matches right` failed: 1 + 1 definitely should be 3
//@ error-pattern: left: 2
//@ error-pattern: right: 3
2021-03-13 11:14:57 +00:00
//@ ignore-emscripten no processes
#![feature(assert_matches)]
2021-07-16 18:26:20 +00:00
use std::assert_matches::assert_matches;
2021-03-13 11:14:57 +00:00
fn main() {
assert_matches!(1 + 1, 3, "1 + 1 definitely should be 3");
}