split tests and json_tests

This commit is contained in:
debris
2016-02-02 22:50:41 +01:00
parent bb2104d312
commit 1b6fe392f8
13 changed files with 23 additions and 21 deletions

View File

@@ -0,0 +1,34 @@
pub use common::*;
macro_rules! test {
($name: expr) => {
assert!(do_json_test(include_bytes!(concat!("../../res/ethereum/tests/", $name, ".json"))).is_empty());
}
}
#[macro_export]
macro_rules! declare_test {
(ignore => $id: ident, $name: expr) => {
#[ignore]
#[test]
#[allow(non_snake_case)]
fn $id() {
test!($name);
}
};
(heavy => $id: ident, $name: expr) => {
#[cfg(feature = "test-heavy")]
#[test]
#[allow(non_snake_case)]
fn $id() {
test!($name);
}
};
($id: ident, $name: expr) => {
#[test]
#[allow(non_snake_case)]
fn $id() {
test!($name);
}
}
}