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

[TESTS][LAMBDA][MINOR] Fix tests

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