From 54d3f23e68bf6e769d8a96e40a2b0c4426e38507 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 2 Mar 2019 22:21:43 +0100 Subject: Add parser/failure tests from spec --- dhall/tests/macros.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'dhall/tests/macros.rs') diff --git a/dhall/tests/macros.rs b/dhall/tests/macros.rs index 5ad2ab3..6031a34 100644 --- a/dhall/tests/macros.rs +++ b/dhall/tests/macros.rs @@ -18,7 +18,13 @@ macro_rules! run_spec_test { }; (parser, $path:expr) => { let expr_str = include_test_str!(concat!($path, "A")); - parser::parse_expr(&expr_str).unwrap(); + parser::parse_expr_pest(&expr_str).map_err(|e| println!("{}", e)).unwrap(); + // parser::parse_expr(&expr_str).unwrap(); + }; + (parser_failure, $path:expr) => { + let expr_str = include_test_str!($path); + parser::parse_expr_pest(&expr_str).map_err(|e| println!("{}", e)).unwrap_err(); + // parser::parse_expr(&expr_str).unwrap(); }; } -- cgit v1.2.3