summaryrefslogtreecommitdiff
path: root/src/test/fixtures/error.rs
blob: 559afee4090c6de24d76e374f42409c0af441108 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
macro_rules! expected {
    ($expr:expr, $expect:pat $(,)?) => {
        $crate::test::fixtures::error::expected!($expr, $expect, ())
    };

    ($expr:expr, $expect:pat, $body:expr $(,)?) => {
        match $expr {
            $expect => $body,
            other => panic!("expected {}, found {other:#?}", stringify!($expect)),
        }
    };
}

pub(crate) use expected;