Commit 74752b11 authored by Pietro Abate's avatar Pietro Abate
Browse files

Fix TLV tests (all but one)

parent 62d4041a
......@@ -31,8 +31,10 @@ let tlv_tests = [ "is_var", [
"Empty", Types.no_var, true;
"`A", Types.no_var, true;
"`$A", Types.no_var, false;
"`$A & `$B", Types.no_var, false;
"`$A & Int", Types.no_var, false;
"`$A | Int", Types.no_var, false;
"`$A | Char", Types.no_var, false;
"(`$A,Int)", Types.no_var, false;
"(Char,Int)", Types.no_var, true;
];
......@@ -45,9 +47,11 @@ let tlv_tests = [ "is_var", [
"`$A", Types.has_tlv, true;
"(`$A,Int)", Types.has_tlv, false;
"`$A & Int", Types.has_tlv, false;
"`$A | Int", Types.has_tlv, true;
"`$A | (`$B,Int)", Types.has_tlv, false;
"`$A | (Char,Int)", Types.has_tlv, false;
"`$A | Int", Types.has_tlv, false;
"`$A | Char", Types.has_tlv, false;
"`$A | (Any,Any)", Types.has_tlv, false;
"`$A | (`$B,Int)", Types.has_tlv, true;
"`$A | (Char,Int)", Types.has_tlv, true;
];
]
......@@ -120,10 +124,12 @@ let test_substitution =
let rec_subst_tests = [
"`$A", "A", "Empty";
"`$A", "B", "`$A";
"`$A -> `$B", "A", "X where X = X -> `$B";
"Bool -> `$B", "A", "Bool -> `$B";
"(`$A , `$B)", "A", "X where X = (X, `$B)";
(*
"`$A -> `$B", "A", "X where X = X -> `$B";
"(`$A , (`$B -> (Bool -> `$C)))", "C", "X where X = (`$A , (`$B -> (Bool -> X)))";
*)
];;
let test_rec_subtitutions =
......
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