diff options
author | Nadrieril | 2019-03-01 17:28:19 +0100 |
---|---|---|
committer | Nadrieril | 2019-03-01 17:28:19 +0100 |
commit | e5d9aee00b0c775df1d8e2d8819aeb80dffa73c2 (patch) | |
tree | e763a24a0d635048232e72e167ca37eafec69369 /tests/macros.rs | |
parent | 8a2b7536902831079eddd7b00291b718f5dd7186 (diff) |
Split abnf_to_pest and dhall into their own crates
Diffstat (limited to 'tests/macros.rs')
-rw-r--r-- | tests/macros.rs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/macros.rs b/tests/macros.rs deleted file mode 100644 index 4b6d0d7..0000000 --- a/tests/macros.rs +++ /dev/null @@ -1,37 +0,0 @@ -#[macro_export] -macro_rules! include_test_str { - ($x:expr) => { include_str!(concat!("../dhall-lang/tests/", $x, ".dhall")) }; -} - -#[macro_export] -macro_rules! include_test_strs_ab { - ($x:expr) => { (include_test_str!(concat!($x, "A")), include_test_str!(concat!($x, "B"))) }; -} - -#[macro_export] -macro_rules! run_spec_test { - (normalization, $path:expr) => { - // let (expr_str, expected_str) = include_test_strs_ab!($path); - // let expr = parser::parse_expr(&expr_str).unwrap(); - // let expected = parser::parse_expr(&expected_str).unwrap(); - // assert_eq!(normalize::<_, X, _>(&expr), normalize::<_, X, _>(&expected)); - }; - (parser, $path:expr) => { - let expr_str = include_test_str!(concat!($path, "A")); - parser::parse_expr(&expr_str).unwrap(); - }; -} - -#[macro_export] -macro_rules! make_spec_test { - ($type:ident, $name:ident, $path:expr) => { - #[test] - #[allow(non_snake_case)] - #[allow(unused_variables)] - #[allow(unused_imports)] - fn $name(){ - use dhall::*; - run_spec_test!($type, $path); - } - }; -} |