From fb79d63d6a57431ff49b94a3fc90cfcf9c2ee788 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 19 Mar 2019 02:14:43 +0100 Subject: Test printer in parser tests Closes #30 --- dhall/tests/common/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dhall/tests/common') diff --git a/dhall/tests/common/mod.rs b/dhall/tests/common/mod.rs index d18b4bf..a24125e 100644 --- a/dhall/tests/common/mod.rs +++ b/dhall/tests/common/mod.rs @@ -89,6 +89,11 @@ pub fn run_test(base_path: &str, feature: Feature) { let expected = dhall::imports::panic_imports(&expected); assert_eq_pretty!(expr, expected); + + // Round-trip pretty-printer + let expr = parser::parse_expr(&expr.to_string()).unwrap(); + let expr = dhall::imports::panic_imports(&expr); + assert_eq!(expr, expected); } ParserFailure => { let file_path = base_path + ".dhall"; -- cgit v1.2.3