1
0
Fork 0
forked from wry/wry

it: test region creation

This commit is contained in:
Julian Orth 2022-05-03 16:30:05 +02:00
parent 6af9d909b8
commit ae34a65efe
9 changed files with 179 additions and 35 deletions

30
src/it/test_macros.rs Normal file
View file

@ -0,0 +1,30 @@
macro_rules! tassert {
($cond:expr) => {
if !$cond {
bail!(
"Assert `{}` failed ({}:{})",
stringify!($cond),
file!(),
line!()
);
}
};
}
macro_rules! tassert_eq {
($left:expr, $right:expr) => {{
let left = $left;
let right = $right;
if left != right {
bail!(
"Assert `{} = {:?} = {:?} = {}` failed ({}:{})",
stringify!($left),
left,
right,
stringify!($right),
file!(),
line!()
);
}
}};
}