aboutsummaryrefslogtreecommitdiff
path: root/rego-proofs/compiler-rewrite/test/compiler_rewrite.ml
diff options
context:
space:
mode:
authorJakob L. Kreuze2023-10-31 14:02:55 -0400
committerJakob L. Kreuze2023-10-31 14:02:55 -0400
commit55b391229361435e3f29fefab82c738316d63ec4 (patch)
treee262d91e8393612c6cde54bf028a7affafd3abc3 /rego-proofs/compiler-rewrite/test/compiler_rewrite.ml
parentb65d0fd86ca4a94364d16968b87729986967eb5c (diff)
More detailed variable usage analysis
Diffstat (limited to 'rego-proofs/compiler-rewrite/test/compiler_rewrite.ml')
-rw-r--r--rego-proofs/compiler-rewrite/test/compiler_rewrite.ml15
1 files changed, 10 insertions, 5 deletions
diff --git a/rego-proofs/compiler-rewrite/test/compiler_rewrite.ml b/rego-proofs/compiler-rewrite/test/compiler_rewrite.ml
index ef42340..cbb7b04 100644
--- a/rego-proofs/compiler-rewrite/test/compiler_rewrite.ml
+++ b/rego-proofs/compiler-rewrite/test/compiler_rewrite.ml
@@ -24,7 +24,8 @@ q {
x := 2
}
|} in
- let (_, bound) = To_test.extract_variables (extract_query policy_code) in
+ let open Compiler_rewrite.Compiler in
+ let { bound; _ } = To_test.extract_variables (extract_query policy_code) in
Alcotest.(check strings)
"expected identifier list" [ "x" ] bound
@@ -38,7 +39,8 @@ q {
z := 4
}
|} in
- let (_, bound) = To_test.extract_variables (extract_query policy_code) in
+ let open Compiler_rewrite.Compiler in
+ let { bound; _ } = To_test.extract_variables (extract_query policy_code) in
Alcotest.(check strings)
"expected identifier list" [ "x"; "y"; "z" ] bound
@@ -51,7 +53,8 @@ q {
y := x
}
|} in
- let (_, bound) = To_test.extract_variables (extract_query policy_code) in
+ let open Compiler_rewrite.Compiler in
+ let { bound; _ } = To_test.extract_variables (extract_query policy_code) in
Alcotest.(check strings)
"expected identifier list" [ "x"; "y" ] bound
@@ -64,7 +67,8 @@ q {
y == 8
}
|} in
- let (free, bound) = To_test.extract_variables (extract_query policy_code) in
+ let open Compiler_rewrite.Compiler in
+ let { free; bound; _ } = To_test.extract_variables (extract_query policy_code) in
Alcotest.(check strings)
"expected identifier list" [] free;
Alcotest.(check strings)
@@ -79,7 +83,8 @@ q {
z = 7
}
|} in
- let (free, bound) = To_test.extract_variables (extract_query policy_code) in
+ let open Compiler_rewrite.Compiler in
+ let { free; bound; _ } = To_test.extract_variables (extract_query policy_code) in
Alcotest.(check strings)
"expected identifier list" [ "z" ] free;
Alcotest.(check strings)

© 2015 - 2026 Jakob L. Kreuze