summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
authorNadrieril2019-11-11 15:46:45 +0000
committerNadrieril2019-11-11 15:46:45 +0000
commit8b566b2575096562c2e15d6ac9ee8750db2cf14f (patch)
treed348f580a00c4b97f04f3a2e41ea2a23d67af824 /dhall
parent1c2460bf6ba944d970c6bb6d47863d0244621887 (diff)
Explain TypeError tests
Diffstat (limited to 'dhall')
-rw-r--r--dhall/src/tests.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/dhall/src/tests.rs b/dhall/src/tests.rs
index cde3b03..1037ef9 100644
--- a/dhall/src/tests.rs
+++ b/dhall/src/tests.rs
@@ -176,6 +176,9 @@ pub fn run_test(test: Test<'_>) -> Result<()> {
}
res.unwrap_err();
}
+ // Checks the output of the type error against a text file. If the text file doesn't exist,
+ // we instead write to it the output we got. This makes it easy to update those files: just
+ // `rm -r dhall/tests/type-errors` and run the tests again.
TypeError(file_path) => {
let mut res =
parse_file_str(&file_path)?.skip_resolve()?.typecheck();