summaryrefslogtreecommitdiff
path: root/dhall/tests
diff options
context:
space:
mode:
authorBasile Henry2020-11-01 22:46:35 +0100
committerBasile Henry2020-11-01 22:47:14 +0100
commit6987b275e4bf5f545d823d186ce08a2fe9a3eb44 (patch)
tree89aebd296ca2ee4cf4e2bd05755b1a3bee2e2856 /dhall/tests
parent34d92560a0a2124e5eadea4832795874505b6cc5 (diff)
Implement type checking for With op
Diffstat (limited to 'dhall/tests')
-rw-r--r--dhall/tests/spec.rs7
-rw-r--r--dhall/tests/type-inference/failure/unit/WithInvalidOverrideA.txt4
-rw-r--r--dhall/tests/type-inference/failure/unit/WithNotRecord.txt4
3 files changed, 5 insertions, 10 deletions
diff --git a/dhall/tests/spec.rs b/dhall/tests/spec.rs
index 36cbd81..c93be7e 100644
--- a/dhall/tests/spec.rs
+++ b/dhall/tests/spec.rs
@@ -544,12 +544,7 @@ fn define_features() -> Vec<TestFeature> {
variant: SpecTestKind::TypeInferenceSuccess,
// TODO: this fails because of caching shenanigans
// too_slow_path: Rc::new(|path: &str| path == "prelude"),
- exclude_path: Rc::new(|path: &str| {
- false
- || path == "prelude"
- // With builtin not implemented yet
- || path == "unit/WithCreateIntermediateRecords"
- }),
+ exclude_path: Rc::new(|path: &str| path == "prelude"),
..default_feature.clone()
},
TestFeature {
diff --git a/dhall/tests/type-inference/failure/unit/WithInvalidOverrideA.txt b/dhall/tests/type-inference/failure/unit/WithInvalidOverrideA.txt
index c34175f..c2af394 100644
--- a/dhall/tests/type-inference/failure/unit/WithInvalidOverrideA.txt
+++ b/dhall/tests/type-inference/failure/unit/WithInvalidOverrideA.txt
@@ -1,7 +1,7 @@
-Type error: error: MustCombineRecord
+Type error: error: WithMustBeRecord
--> <current file>:1:1
|
...
6 | { a = 1 } with a.b = 2
- | ^^^^^^^^^^^^^^^^^^^^^^ MustCombineRecord
+ | ^^^^^^^^^^^^^^^^^^^^^^ WithMustBeRecord
|
diff --git a/dhall/tests/type-inference/failure/unit/WithNotRecord.txt b/dhall/tests/type-inference/failure/unit/WithNotRecord.txt
index 8574e48..cd76485 100644
--- a/dhall/tests/type-inference/failure/unit/WithNotRecord.txt
+++ b/dhall/tests/type-inference/failure/unit/WithNotRecord.txt
@@ -1,6 +1,6 @@
-Type error: error: MustCombineRecord
+Type error: error: WithMustBeRecord
--> <current file>:1:1
|
1 | 5 with a = 10
- | ^^^^^^^^^^^^^ MustCombineRecord
+ | ^^^^^^^^^^^^^ WithMustBeRecord
|