diff --git a/CHANGES.md b/CHANGES.md index f911673d..db696257 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,8 @@ ## NEXT RELEASE +- #562: Fix the `int32` and `int64` printers in both `Lin` and `STM` to add + missing `l` and `L` suffixes on literals. - #560: Change `Lin.{constructible,deconstructible}` from an empty variant type to an abstract type to get `Lin` compiling on `5.5.0+trunk` again, due to https://github.com/ocaml/ocaml/pull/13994 removing special handling diff --git a/lib/STM.ml b/lib/STM.ml index 88090b71..142972d3 100644 --- a/lib/STM.ml +++ b/lib/STM.ml @@ -27,8 +27,8 @@ let unit = (Unit, QCheck.Print.unit) let bool = (Bool, QCheck.Print.bool) let char = (Char, QCheck.Print.char) let int = (Int, QCheck.Print.int) -let int32 = (Int32, Int32.to_string) -let int64 = (Int64, Int64.to_string) +let int32 = (Int32, QCheck.Print.int32) +let int64 = (Int64, QCheck.Print.int64) let float = (Float, QCheck.Print.float) let string = (String, QCheck.Print.string) let bytes = (Bytes, QCheck.Print.bytes) diff --git a/lib/lin.ml b/lib/lin.ml index a2b5c790..912070a1 100644 --- a/lib/lin.ml +++ b/lib/lin.ml @@ -181,9 +181,9 @@ let int = GenDeconstr (QCheck.int, QCheck.Print.int, (=)) let int_small = GenDeconstr (QCheck.small_int, QCheck.Print.int, (=)) let int_pos = GenDeconstr (QCheck.pos_int, QCheck.Print.int, (=)) let int_bound b = GenDeconstr (QCheck.int_bound b, QCheck.Print.int, (=)) -let int32 = GenDeconstr (QCheck.int32, Int32.to_string, Int32.equal) -let int64 = GenDeconstr (QCheck.int64, Int64.to_string, Int64.equal) -let nat64_small = GenDeconstr (qcheck_nat64_small, Int64.to_string, Int64.equal) +let int32 = GenDeconstr (QCheck.int32, QCheck.Print.int32, Int32.equal) +let int64 = GenDeconstr (QCheck.int64, QCheck.Print.int64, Int64.equal) +let nat64_small = GenDeconstr (qcheck_nat64_small, QCheck.Print.int64, Int64.equal) let float = GenDeconstr (QCheck.float, QCheck.Print.float, Float.equal) let string = GenDeconstr (string, QCheck.Print.string, String.equal) let string_small = GenDeconstr (string_small, QCheck.Print.string, String.equal)