add ability to have heavy tests

This commit is contained in:
Robert Habermeier 2016-05-31 19:51:24 +02:00
parent 4ccaabde40
commit c81e4e24b3
1 changed files with 21 additions and 1 deletions

View File

@ -43,7 +43,27 @@ macro_rules! register_test {
$cb(name, chain);
}
}
}
};
(heavy $name:ident, $cb:expr, $file:expr) => {
#[test]
#[cfg(feature = "test-heavy")]
fn $name() {
for (name, chain) in extract_chain!(iter $file) {
$cb(name, chain);
}
}
};
(ignore $name:ident, $cb:expr, $file:expr) => {
#[test]
#[ignore]
fn $name() {
for (name, chain) in extract_chain!(iter $file) {
$cb(name, chain);
}
}
};
}
#[cfg(test)]