aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/evaluators/FOL.ml10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/unit/evaluators/FOL.ml b/test/unit/evaluators/FOL.ml
index 93eb8e7..ce8a2cd 100644
--- a/test/unit/evaluators/FOL.ml
+++ b/test/unit/evaluators/FOL.ml
@@ -318,6 +318,10 @@ module Make (S : Abstract.Storage.STORAGE) (C : Helpers.Storage.CONFIGURATOR) =
"a restriction reaches through a projection"
[["name", Concepts.Value.String "Alaric"]]
(bindings (run (F.Where (names, called "Alaric")) drain));
+ check
+ (list (list (pair string Helpers.value)))
+ "restrictions that disagree hold nothing" []
+ (bindings (run (F.Where (F.Where (employees, aged 42), aged 30)) drain));
check bool "a tuple agreeing with the binding is held" true
(asking
(F.Where (employees, aged 42))
@@ -339,7 +343,9 @@ module Make (S : Abstract.Storage.STORAGE) (C : Helpers.Storage.CONFIGURATOR) =
F.instantiate root (F.Where (F.Base Kernel.Path.("stored" @/ this), called "Gunther"))
in
let pushed =
- match plan with F.Project (F.Where (F.Where (F.Base _, _), _), _) -> true | _ -> false
+ match plan with
+ | F.Project (F.Where (F.Base _, binding), _) -> BatMap.String.cardinal binding = 2
+ | _ -> false
in
let* result = F.execute plan in
let* found = drain result in
@@ -349,7 +355,7 @@ module Make (S : Abstract.Storage.STORAGE) (C : Helpers.Storage.CONFIGURATOR) =
in
check string "a restriction survives its encoding" (F.encode inner)
(F.encode (Helpers.condition_as_failure (F.decode (F.encode inner))));
- check bool "the restriction moved below the stored projection" true pushed;
+ check bool "the restriction moved below the stored projection and joined its own" true pushed;
check
(list (list (pair string Helpers.value)))
"and both restrictions held"