Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
f5e19b39
Commit
f5e19b39
authored
Jun 01, 2014
by
Julien Lopez
Browse files
[TESTS][LAMBDA][MINOR] Fix tests
parent
a1ef3391
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/lambda/src/lambdaTests.ml
View file @
f5e19b39
...
...
@@ -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))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment