Commit b49243b2 authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Remove buggy test case.

parent 284a11ba
......@@ -4,7 +4,7 @@ open OUnit
let parse_typ s =
let st = Stream.of_string s in
let astpat = Parser.pat st in
let astpat = Parser.pat st in
let nodepat = Typer.typ Builtin.env astpat in
Types.descr nodepat
;;
......@@ -19,7 +19,7 @@ let variance_test = [
]
let test_variance =
"test variance annotations" >:::
"test variance annotations" >:::
List.map (fun (t1,expected) ->
(Printf.sprintf " %s" t1) >:: (fun _ ->
let t = parse_typ t1 in
......@@ -38,7 +38,7 @@ let set_op_tests = [
]
let test_set_operations =
"test set operations" >:::
"test set operations" >:::
List.map (fun (s1,s2) ->
(Printf.sprintf " %s <: %s " s1 s2) >:: (fun _ ->
let t1 = parse_typ s1 in
......@@ -60,7 +60,7 @@ let subst_tests = [
];;
let test_substitution =
"test type substitution operations" >:::
"test type substitution operations" >:::
List.map (fun (t,v,s,expected) ->
(Printf.sprintf "[%s]{%s/%s}") t v s >:: (fun _ ->
let t = parse_typ t in
......@@ -78,8 +78,6 @@ let test_substitution =
let rec_subst_tests = [
"`$A", "A", "Empty";
"`$A", "B", "`$A";
"`$A | Int", "A", "X where X = (X | Int)";
"`$A | `$B | Int", "A", "X where X = (X | `$B | Int )";
"`$A -> `$B", "A", "X where X = X -> `$B";
"Bool -> `$B", "A", "Bool -> `$B";
"(`$A , `$B)", "A", "X where X = (X, `$B)";
......@@ -87,7 +85,7 @@ let rec_subst_tests = [
];;
let test_rec_subtitutions =
"test recursive type substitution operations" >:::
"test recursive type substitution operations" >:::
List.map (fun (t,v,expected) ->
(Printf.sprintf "mu X . [%s]{%s/X}") t v >:: (fun _ ->
let t = parse_typ t in
......@@ -176,7 +174,7 @@ let subtype_tests = [
];;
let test_subtype =
"test subtype" >:::
"test subtype" >:::
List.map (fun (s1,s2,expected) ->
(Printf.sprintf " %s <: %s " s1 s2) >:: (fun _ ->
let t1 = parse_typ s1 in
......@@ -198,7 +196,7 @@ let witness_tests = [
"(`A , `$X)", "((`A , (Any \\ `A)) | (`$X , `A))", false;
(* (a , a^[ X ]) *)
"(`$X & (`$X , `A))", "`C", false;
(* (any^[ X ] , A)^[ X ] *)
(* (any^[ X ] , A)^[ X ] *)
"(`$A & (`$A , `T))","(`T1 -> `T2)", false;
(* (any^[ A ] , t)^[ A ] *)
......@@ -207,7 +205,7 @@ let witness_tests = [
];;
let test_witness =
"test subtype" >:::
"test subtype" >:::
List.map (fun (s1,s2,expected) ->
(Printf.sprintf " %s <: %s " s1 s2) >:: (fun _ ->
let t1 = parse_typ s1 in
......@@ -237,10 +235,9 @@ let all =
test_rec_subtitutions;
(* test_witness; *)
]
let main () =
OUnit.run_test_tt_main all
;;
main ()
main ()
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