Commit 8d294687 authored by Julien Lopez's avatar Julien Lopez
Browse files

[TESTS][LIBTEST] Add tallying tests for records

parent f5e19b39
......@@ -100,7 +100,7 @@ and pp_value ppf = function
| XmlNs(_,_,_,_,sigma) -> Format.fprintf ppf "XmlNs(%a)" pp_sigma sigma
| Record(_,sigma) -> Format.fprintf ppf "Record(%a)" pp_sigma sigma
| Atom(a) -> Format.fprintf ppf "Atom(%a)" Atoms.V.print a
| Integer(i) -> Format.fprintf ppf "%d" (Big_int.int_of_big_int i)
| Integer(i) -> Format.fprintf ppf "%d" (Intervals.V.get_int i)
| Char(i) -> Format.fprintf ppf "Char()"
| Abstraction(None, _, sigma) ->
Format.fprintf ppf "Abstraction(None,%a)" pp_sigma sigma
......@@ -110,7 +110,7 @@ and pp_value ppf = function
pp_sigma sigma
| Abstract((name, _)) -> Format.fprintf ppf "Abstract(%s)" name
| String_latin1(_,_,s,_) -> Format.fprintf ppf "\"%s\"" s
| String_utf8(_,_,s,_) -> Format.fprintf ppf "\"%s\"" s
| String_utf8(_,_,s,_) -> Format.fprintf ppf "\"%s\"" (Encodings.Utf8.get_str s)
| Concat(v1, v2) ->
Format.fprintf ppf "Concat(%a, %a)"
pp_value v1
......
......@@ -308,8 +308,14 @@ let tallying_tests = [
[("((`$A , Int) & (`$B , Bool))","(Int , (Int & Bool))")], [[]];
(* map even *)
[("(`$A -> `$B) -> [`$A ] -> [`$B ]","((Int -> Bool) & ((`$A \\ Int) -> (`$A \\ Int)))")], [[]];
[("(`$A -> `$A)", "((Int -> Int) & (Bool -> Bool)) -> `$T")], mk_e []
(* [("(`$A -> `$B) -> [`$A ] -> [`$B ]","((Int -> Bool) & ((`$A \\ Int) -> (`$A \\ Int)))")], [[]];*)
[("(`$A -> `$A)", "((Int -> Int) & (Bool -> Bool)) -> `$T")], mk_e [];
(* records *)
[("{a=Int}","Any")], [[]];
[("{a=`$A}","Any")], [[]];
[("{a=Int}","{a=(Int|Bool)}")], [[]];
[("{a=Int} -> Int", "{a=`$A} -> `$A")], [[]];
]
(* to test tallying { sigma_i } -- > for all i => s sigma_i <= t sigma_i *)
......
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