1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
pub use paste::paste;
#[macro_export]
macro_rules! test_eq {
($id: literal, $func:expr, $expected: expr) => {
paste! {#[test] fn [<test_case_ $id>]() {
assert_eq!($func, $expected);
}}
};
}
#[macro_export]
macro_rules! tests {
($($t:tt)*) => {
#[cfg(test)]
mod tests {
use super::*;
$($t)*
}
};
}