Commit b1f88f1e authored by Julien Lopez's avatar Julien Lopez
Browse files

Using equal instead of (==) solve the problem of the last commit

Switch typesTest from OUnit to OUnit2 (mostly to get a correct exit value)
parent a8a4c258
open OUnit (* TODO: Switch to OUnit2 when tests are fixed, then use tools/install_hooks.sh -d to check tallying before a commit *)
open OUnit(*2*)
open Types open Types
let parse_typ s = let parse_typ s =
...@@ -490,7 +491,7 @@ let suite = ...@@ -490,7 +491,7 @@ let suite =
] ]
let main () = let main () =
OUnit.run_test_tt_main suite OUnit(*2*).run_test_tt_main suite
;; ;;
main () main ()
open OUnit open OUnit2
let parse_typ s = let parse_typ s =
let st = Stream.of_string s in let st = Stream.of_string s in
...@@ -308,7 +308,7 @@ let all = ...@@ -308,7 +308,7 @@ let all =
] ]
let main () = let main () =
OUnit.run_test_tt_main all OUnit2.run_test_tt_main all
;; ;;
main () main ()
...@@ -549,7 +549,7 @@ let cup x y = ...@@ -549,7 +549,7 @@ let cup x y =
absent= x.absent || y.absent; absent= x.absent || y.absent;
toplvars = TLV.empty toplvars = TLV.empty
} in } in
let isvar = (is_var x && x == t) || (is_var y && y == t) in let isvar = (is_var x && equal x t) || (is_var y && equal y t) in
update_tlv x y { t with toplvars = { t.toplvars with TLV.isvar = isvar }} update_tlv x y { t with toplvars = { t.toplvars with TLV.isvar = isvar }}
let cap x y = let cap x y =
...@@ -566,7 +566,7 @@ let cap x y = ...@@ -566,7 +566,7 @@ let cap x y =
absent= x.absent && y.absent; absent= x.absent && y.absent;
toplvars = TLV.empty toplvars = TLV.empty
} in } in
let isvar = (is_var x && x == t) || (is_var y && y == t) in let isvar = (is_var x && equal x t) || (is_var y && equal y t) in
update_tlv x y { t with toplvars = { t.toplvars with TLV.isvar = isvar }} update_tlv x y { t with toplvars = { t.toplvars with TLV.isvar = isvar }}
let diff x y = let diff x y =
...@@ -583,7 +583,7 @@ let diff x y = ...@@ -583,7 +583,7 @@ let diff x y =
absent= x.absent && not y.absent; absent= x.absent && not y.absent;
toplvars = TLV.empty toplvars = TLV.empty
} in } in
let isvar = (x == any && is_var y) || (is_var x && y == empty) in let isvar = (equal x any && is_var y) || (is_var x && equal y empty) in
update_tlv x y { t with toplvars = { t.toplvars with TLV.isvar = isvar }} update_tlv x y { t with toplvars = { t.toplvars with TLV.isvar = isvar }}
(* TODO: optimize disjoint check for boolean combinations *) (* TODO: optimize disjoint check for boolean combinations *)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment