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

[TESTS][LAMBDA][MINOR] Fix tests

parent a1ef3391
......@@ -209,8 +209,8 @@ let tests_eval = "CDuce runtime tests (Typed -> Lambda -> Value)" >:::
assert_equal ~msg:"Test CDuce.runtime.misc.map failed"
~printer:(fun x -> x)
"Abstraction((`$A -> `$B,[ `$A* ] -> [ `$B* ]),Sel(1,(`$A -> `$B -> [ `$A* ] ->
[
`$B* ]),Id))"
[
`$B* ]),Id))"
(run_test_eval "fun map f : ('A -> 'B) x : ['A] : ['B] ->
match x : ['A] with
| (el : 'A) :: [] -> f.el
......@@ -239,9 +239,8 @@ let tests_eval = "CDuce runtime tests (Typed -> Lambda -> Value)" >:::
| x : (!Int) -> x).[4; \"hey\"; 3; 2]");
assert_equal ~msg:"Test CDuce.runtime.misc.map_even_hard failed"
~printer:(fun x -> x)
"(Atom(true),(\"hey\",((3,(5,Atom(nil),Id),{ { `$A = Int } ,{ `$A = Bool
} }),(Atom(true),(Abstraction((`$C,`$C),{ { `$A = Int } ,{ `$A = Bool
} }),(Atom(false),Atom(nil),Id),Id),Id),Id),Id),Id)"
"(Atom(true),(\"hey\",((3,(5,Atom(nil),Mono),Mono),(Atom(true),(Abstraction((
`$C,`$C),Sel(1,(`$C -> `$C),Id)),(Atom(false),Atom(nil),Mono),Mono),Mono),Mono),Mono),Mono)"
(run_test_eval "(fun map f : ('A->'B) x : ['A] : ['B] ->
match x : ['A] with
| (el : 'A) :: (rest : ['A]) -> ((f.el), ((map.f).rest))
......@@ -252,7 +251,7 @@ let tests_eval = "CDuce runtime tests (Typed -> Lambda -> Value)" >:::
| x : (!Int) -> x).[4; \"hey\"; [3; 5]; 2; (fun ('C -> 'C) | x : 'C -> x); 3+4]");
assert_equal ~msg:"Test CDuce.runtime.misc.map_is_int_simple failed"
~printer:(fun x -> x)
"(Atom(false),(Atom(true),Atom(nil),Id),Id)"
"(Atom(false),(Atom(true),Atom(nil),Mono),Mono)"
(run_test_eval "(fun map f : ('A->'B) x : ['A] : ['B] ->
match x : ['A] with
| (el : 'A) :: (rest : ['A]) -> ((f.el), ((map.f).rest))
......@@ -262,7 +261,7 @@ let tests_eval = "CDuce runtime tests (Typed -> Lambda -> Value)" >:::
| x : (!(Int|Bool)) -> x).[`true; 3]");
assert_equal ~msg:"Test CDuce.runtime.misc.map_is_int_medium failed"
~printer:(fun x -> x)
"(Atom(false),(Atom(true),(Atom(false),Atom(nil),Id),Id),Id)"
"(Atom(false),(Atom(true),(Atom(false),Atom(nil),Mono),Mono),Mono)"
(run_test_eval "(fun map f : ('A->'B) x : ['A] : ['B] ->
match x : ['A] with
| (el : 'A) :: (rest : ['A]) -> ((f.el), ((map.f).rest))
......
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