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
823cb976
Commit
823cb976
authored
Jun 12, 2014
by
Pietro Abate
Browse files
Fix functional tests for apply_raw
parent
b1f88f1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/libtest/tallyingTest.ml
View file @
823cb976
...
...
@@ -461,21 +461,20 @@ let test_apply =
let
(
s
,
t
)
=
(
parse_typ
s
,
parse_typ
t
)
in
let
(
sl
,
s
,
t
,
g
)
=
Types
.
apply_raw
s
t
in
let
s_sigma
=
sigmacup
sl
s
in
let
t_sigma
=
sigmacup
sl
t
in
let
t_sigma_domain
=
(
Types
.
Arrow
.
domain
(
Types
.
Arrow
.
get
t_sigma
))
in
let
gamma
=
Types
.
cons
(
Types
.
var
(
Var
.
mk
"Gamma"
))
in
let
t1
=
sigmacup
sl
s
in
let
t2_gamma
=
sigmacup
sl
(
Types
.
arrow
(
Types
.
cons
t
)
gamma
)
in
assert_equal
~
pp_diff
:
(
fun
fmt
_
->
Format
.
fprintf
fmt
"t
@@ sl
< 0 -> 1 = %a
\n
"
Types
.
Print
.
print
t
_sigma
)
(
Types
.
subtype
t
_sigma
(
parse_typ
"Empty -> Any"
))
true
;
Format
.
fprintf
fmt
"t
1
< 0 -> 1 = %a
\n
"
Types
.
Print
.
print
t
1
)
(
Types
.
subtype
t
1
(
parse_typ
"Empty -> Any"
))
true
;
assert_equal
~
pp_diff
:
(
fun
fmt
_
->
Format
.
fprintf
fmt
"sl = %a
\n
"
Types
.
Tallying
.
CS
.
pp_sl
sl
;
Format
.
fprintf
fmt
"(s @@ sl) = %a
\n
"
Types
.
Print
.
print
s_sigma
;
Format
.
fprintf
fmt
"(t @@ sl) = %a
\n
"
Types
.
Print
.
print
t_sigma
;
Format
.
fprintf
fmt
"g = %a
\n
"
Types
.
Print
.
print
g
;
Format
.
fprintf
fmt
"domain(t @@ sl) = %a
\n
"
Types
.
Print
.
print
t_sigma_domain
)
(
Types
.
subtype
s_sigma
t_sigma
)
true
Format
.
fprintf
fmt
"t1 = %a
\n
"
Types
.
Print
.
print
t1
;
Format
.
fprintf
fmt
"t2 -> gamma = %a
\n
"
Types
.
Print
.
print
t2_gamma
;
)
(
Types
.
subtype
t1
t2_gamma
)
true
with
Tallying
.
Step1Fail
->
assert_equal
[]
[]
)
)
apply_raw_tests
...
...
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