summaryrefslogtreecommitdiff
path: root/dhall/tests/common
diff options
context:
space:
mode:
authorNadrieril2019-03-19 02:14:43 +0100
committerNadrieril2019-03-19 02:14:43 +0100
commitfb79d63d6a57431ff49b94a3fc90cfcf9c2ee788 (patch)
treeac6929295cfdfa438fad3eb40ec32a61174e7b8d /dhall/tests/common
parent9f8622ae6163bdea83604bafdfc3ee4e70b0bcde (diff)
Test printer in parser tests
Closes #30
Diffstat (limited to 'dhall/tests/common')
-rw-r--r--dhall/tests/common/mod.rs5
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";