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

[TESTS][LAMBDA][MINOR] Recover deleted sigmas in tests

parent d7a762df
...@@ -189,43 +189,43 @@ let tests_eval = "CDuce runtime tests (Typed -> Lambda -> Value)" >::: ...@@ -189,43 +189,43 @@ let tests_eval = "CDuce runtime tests (Typed -> Lambda -> Value)" >:::
| (el : 'A{}) :: (rest : ['A{}]) -> ((f.el), ((map.f).rest))"); | (el : 'A{}) :: (rest : ['A{}]) -> ((f.el), ((map.f).rest))");
assert_equal ~msg:"Test CDuce.runtime.misc.map_even_simple failed" assert_equal ~msg:"Test CDuce.runtime.misc.map_even_simple failed"
~printer:(fun x -> x) ~printer:(fun x -> x)
"(\"hey\", Atom(false), {})" "(\"hey\", Atom(false), {A/Int;A/Bool})"
(run_test_eval "(fun map f : ('A{}->'B{}) x : ['A{}] : ['B{}] -> (run_test_eval "(fun map f : ('A{A/Int;A/Bool}->'B{A/Int;A/Bool}) x : ['A{A/Int;A/Bool}] : ['B{A/Int;A/Bool}] ->
match x : ['A{}] with match x : ['A{A/Int;A/Bool}] with
| (el : 'A{}) :: [] -> f.el | (el : 'A{A/Int;A/Bool}) :: [] -> f.el
| (el : 'A{}) :: (rest : ['A{}]) -> ((f.el), ((map.f).rest))).(fun ((Int -> Bool) & ((!Int) -> (!Int))) | (el : 'A{A/Int;A/Bool}) :: (rest : ['A{A/Int;A/Bool}]) -> ((f.el), ((map.f).rest))).(fun ((Int -> Bool) & ((!Int) -> (!Int)))
| x : Int -> (match (x % 2) : Int with | x : Int -> (match (x % 2) : Int with
| 0 -> `true | 0 -> `true
| 1 -> `false) | 1 -> `false)
| x : (!Int) -> x).[\"hey\"; 3]"); | x : (!Int) -> x).[\"hey\"; 3]");
assert_equal ~msg:"Test CDuce.runtime.misc.map_even_medium failed" assert_equal ~msg:"Test CDuce.runtime.misc.map_even_medium failed"
~printer:(fun x -> x) ~printer:(fun x -> x)
"(\"hey\", Atom(false), Atom(true), {})" "(\"hey\", Atom(false), Atom(true), {A/Int;A/Bool})"
(run_test_eval "(fun map f : ('A{}->'B{}) x : ['A{}] : ['B{}] -> (run_test_eval "(fun map f : ('A{A/Int;A/Bool}->'B{A/Int;A/Bool}) x : ['A{A/Int;A/Bool}] : ['B{A/Int;A/Bool}] ->
match x : ['A{}] with match x : ['A{A/Int;A/Bool}] with
| (el : 'A{}) :: [] -> f.el | (el : 'A{A/Int;A/Bool}) :: [] -> f.el
| (el : 'A{}) :: (rest : ['A{}]) -> ((f.el), ((map.f).rest))).(fun ((Int -> Bool) & ((!Int) -> (!Int))) | (el : 'A{A/Int;A/Bool}) :: (rest : ['A{A/Int;A/Bool}]) -> ((f.el), ((map.f).rest))).(fun ((Int -> Bool) & ((!Int) -> (!Int)))
| x : Int -> (match (x % 2) : Int with | x : Int -> (match (x % 2) : Int with
| 0 -> `true | 0 -> `true
| 1 -> `false) | 1 -> `false)
| x : (!Int) -> x).[\"hey\"; 3; 2]"); | x : (!Int) -> x).[\"hey\"; 3; 2]");
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(false), Atom(true), {A/Int;A/Bool})"
(run_test_eval "(fun map f : ('A{}->'B{}) x : ['A{}] : ['B{}] -> (run_test_eval "(fun map f : ('A{A/Int;A/Bool}->'B{A/Int;A/Bool}) x : ['A{A/Int;A/Bool}] : ['B{A/Int;A/Bool}] ->
match x : ['A{}] with match x : ['A{A/Int;A/Bool}] with
| (el : 'A{}) :: [] -> f.el | (el : 'A{A/Int;A/Bool}) :: [] -> f.el
| (el : 'A{}) :: (rest : ['A{}]) -> ((f.el), ((map.f).rest))).(fun ((Int -> Bool) & (Bool -> Bool) & ((!(Int|Bool)) -> (!(Int|Bool)))) | (el : 'A{A/Int;A/Bool}) :: (rest : ['A{A/Int;A/Bool}]) -> ((f.el), ((map.f).rest))).(fun ((Int -> Bool) & (Bool -> Bool) & ((!(Int|Bool)) -> (!(Int|Bool))))
| x : Int -> `true | x : Int -> `true
| x : Bool -> `false | x : Bool -> `false
| 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(false), Atom(true), Atom(false), {A/Int;A/Bool})"
(run_test_eval "(fun map f : ('A{}->'B{}) x : ['A{}] : ['B{}] -> (run_test_eval "(fun map f : ('A{A/Int;A/Bool}->'B{A/Int;A/Bool}) x : ['A{A/Int;A/Bool}] : ['B{A/Int;A/Bool}] ->
match x : ['A{}] with match x : ['A{A/Int;A/Bool}] with
| (el : 'A{}) :: [] -> f.el | (el : 'A{A/Int;A/Bool}) :: [] -> f.el
| (el : 'A{}) :: (rest : ['A{}]) -> ((f.el), ((map.f).rest))).(fun ((Int -> Bool) & (Bool -> Bool) & ((!(Int|Bool)) -> (!(Int|Bool)))) | (el : 'A{A/Int;A/Bool}) :: (rest : ['A{A/Int;A/Bool}]) -> ((f.el), ((map.f).rest))).(fun ((Int -> Bool) & (Bool -> Bool) & ((!(Int|Bool)) -> (!(Int|Bool))))
| x : Int -> `true | x : Int -> `true
| x : Bool -> `false | x : Bool -> `false
| x : (!(Int|Bool)) -> x).[`true; 3; `true]"); | x : (!(Int|Bool)) -> x).[`true; 3; `true]");
......
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