File tree Expand file tree Collapse file tree 7 files changed +41
-12
lines changed Expand file tree Collapse file tree 7 files changed +41
-12
lines changed Original file line number Diff line number Diff line change 22
33## NEXT RELEASE
44
5+ - #566 : Use ` QCheck.Print ` combinators in ` Util.Pp ` too for consistency,
6+ e.g., to avoid that ` STM ` argument and result printer outputs differ.
57- #562 : Fix the ` int32 ` and ` int64 ` printers in both ` Lin ` and ` STM ` to add
68 missing ` l ` and ` L ` suffixes on literals.
79- #560 : Change ` Lin.{constructible,deconstructible} ` from an empty variant type
Original file line number Diff line number Diff line change @@ -158,14 +158,14 @@ module Pp = struct
158158
159159 let pp_exn = of_show Printexc. to_string
160160 let pp_unit _ fmt () = pp_print_string fmt " ()"
161- let pp_bool _ fmt b = fprintf fmt " %B " b
162- let pp_int par fmt i = fprintf fmt (if par && i < 0 then " (%d )" else " %d " ) i
163- let pp_int32 par fmt i = fprintf fmt (if par && i < 0l then " (%ldl )" else " %ldl " ) i
164- let pp_int64 par fmt i = fprintf fmt (if par && i < 0L then " (%LdL )" else " %LdL " ) i
165- let pp_float par fmt f = fprintf fmt (if par && f < 0.0 then " (%F )" else " %F " ) f
166- let pp_char _ fmt c = fprintf fmt " %C " c
167- let pp_string _ fmt s = fprintf fmt " %S " s
168- let pp_bytes _ fmt s = fprintf fmt " %S " (Bytes. to_string s)
161+ let pp_bool _ fmt b = fprintf fmt " %s " ( QCheck.Print. bool b)
162+ let pp_int par fmt i = fprintf fmt (if par && i < 0 then " (%s )" else " %s " ) ( QCheck.Print. int i)
163+ let pp_int32 par fmt i = fprintf fmt (if par && i < 0l then " (%s )" else " %s " ) ( QCheck.Print. int32 i)
164+ let pp_int64 par fmt i = fprintf fmt (if par && i < 0L then " (%s )" else " %s " ) ( QCheck.Print. int64 i)
165+ let pp_float par fmt f = fprintf fmt (if par && f < 0.0 then " (%s )" else " %s " ) ( QCheck.Print. float f)
166+ let pp_char _ fmt c = fprintf fmt " %s " ( QCheck.Print. char c)
167+ let pp_string _ fmt s = fprintf fmt " %s " ( QCheck.Print. string s)
168+ let pp_bytes _ fmt s = fprintf fmt " %s " (QCheck.Print. bytes s)
169169
170170 let pp_option (pp_s : 'a t ) par fmt o =
171171 match o with
Original file line number Diff line number Diff line change @@ -14,7 +14,13 @@ Test of pp_int64 (negative):
1414-12345L
1515
1616Test of pp_float (infinity):
17- infinity
17+ inf
18+
19+ Test of pp_float (neg_infinity):
20+ -inf
21+
22+ Test of pp_float (nan):
23+ nan
1824
1925Test of pp_float (pi):
20263.14159265359
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ let _ =
2727 pr " pp_int32 (positive)" pp_int32 12345l ;
2828 pr " pp_int64 (negative)" pp_int64 (- 12345L );
2929 pr " pp_float (infinity)" pp_float Float. infinity;
30+ pr " pp_float (neg_infinity)" pp_float Float. neg_infinity;
31+ pr " pp_float (nan)" pp_float nan;
32+ (* pr "pp_float (-. nan)" pp_float (-. nan);*)
3033 pr " pp_float (pi)" pp_float Float. pi;
3134 pr " pp_char (printable)" pp_char 'a' ;
3235 pr " pp_char (unprintable)" pp_char '\000' ;
Original file line number Diff line number Diff line change @@ -14,7 +14,13 @@ Test of pp_int64 (negative):
1414-12345L
1515
1616Test of pp_float (infinity):
17- infinity
17+ inf
18+
19+ Test of pp_float (neg_infinity):
20+ -inf
21+
22+ Test of pp_float (nan):
23+ nan
1824
1925Test of pp_float (pi):
20263.14159265359
Original file line number Diff line number Diff line change @@ -14,7 +14,13 @@ Test of pp_int64 (negative):
1414-12345L
1515
1616Test of pp_float (infinity):
17- infinity
17+ inf
18+
19+ Test of pp_float (neg_infinity):
20+ -inf
21+
22+ Test of pp_float (nan):
23+ nan
1824
1925Test of pp_float (pi):
20263.14159265359
Original file line number Diff line number Diff line change @@ -14,7 +14,13 @@ Test of pp_int64 (negative):
1414-12345L
1515
1616Test of pp_float (infinity):
17- infinity
17+ inf
18+
19+ Test of pp_float (neg_infinity):
20+ -inf
21+
22+ Test of pp_float (nan):
23+ nan
1824
1925Test of pp_float (pi):
20263.14159265359
You can’t perform that action at this time.
0 commit comments