it: test region creation
This commit is contained in:
parent
6af9d909b8
commit
ae34a65efe
9 changed files with 179 additions and 35 deletions
30
src/it/test_macros.rs
Normal file
30
src/it/test_macros.rs
Normal 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!()
|
||||
);
|
||||
}
|
||||
}};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue