From 70263bb4535c40ffa73548e3f0b4b574a856d764 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 11 Nov 2019 09:44:24 +0000 Subject: Test type error messages --- dhall/build.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'dhall/build.rs') diff --git a/dhall/build.rs b/dhall/build.rs index c7d339c..337480f 100644 --- a/dhall/build.rs +++ b/dhall/build.rs @@ -394,5 +394,34 @@ fn main() -> std::io::Result<()> { }, )?; + make_test_module( + &mut file, + TestFeature { + module_name: "type_error", + directory: spec_tests_dir.join("type-inference/failure/"), + variant: "TypeError", + path_filter: |path: &str| { + false + // TODO: Enable imports in typecheck tests + || path == "importBoundary" + || path == "customHeadersUsingBoundVariable" + // TODO: projection by expression + || path == "unit/RecordProjectionByTypeFieldTypeMismatch" + || path == "unit/RecordProjectionByTypeNotPresent" + // TODO: toMap + || path == "unit/EmptyToMap" + || path == "unit/HeterogenousToMap" + || path == "unit/MistypedToMap1" + || path == "unit/MistypedToMap2" + || path == "unit/MistypedToMap3" + || path == "unit/MistypedToMap4" + || path == "unit/NonRecordToMap" + || path == "unit/ToMapWrongKind" + }, + input_type: FileType::Text, + output_type: None, + }, + )?; + Ok(()) } -- cgit v1.2.3