diff options
author | Nadrieril | 2019-03-19 02:14:43 +0100 |
---|---|---|
committer | Nadrieril | 2019-03-19 02:14:43 +0100 |
commit | fb79d63d6a57431ff49b94a3fc90cfcf9c2ee788 (patch) | |
tree | ac6929295cfdfa438fad3eb40ec32a61174e7b8d /dhall/tests/common | |
parent | 9f8622ae6163bdea83604bafdfc3ee4e70b0bcde (diff) |
Test printer in parser tests
Closes #30
Diffstat (limited to 'dhall/tests/common')
-rw-r--r-- | dhall/tests/common/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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"; |