#[macro_export]
macro_rules! test_envelope_roundtrip {
($type:ty) => {
test_envelope_roundtrip!($type, 20, false);
};
($type:ty, $iterations:expr) => {
test_envelope_roundtrip!($type, $iterations, false);
};
($type:ty, $iterations:expr, $print:expr) => {
#[test]
fn test_envelope() {
$crate::test_envelope_roundtrip::<$type>($iterations, $print);
}
};
($type:ty, $iterations:expr, $print:expr, $name:ident) => {
#[test]
fn $name() {
$crate::test_envelope_roundtrip::<$type>($iterations, $print);
}
};
}
#[macro_export]
macro_rules! test_cbor_roundtrip {
($type:ty) => {
test_cbor_roundtrip!($type, 20, false);
};
($type:ty, $iterations:expr) => {
test_cbor_roundtrip!($type, $iterations, false);
};
($type:ty, $iterations:expr, $print:expr) => {
#[test]
fn test_cbor() {
$crate::test_cbor_roundtrip::<$type>($iterations, $print);
}
};
($type:ty, $iterations:expr, $print:expr, $name:ident) => {
#[test]
fn $name() {
$crate::test_cbor_roundtrip::<$type>($iterations, $print);
}
};
}