From abbc41bf1973bea6e5aa4de4904076dbb52b33b6 Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Sat, 7 Dec 2024 14:35:10 +0100 Subject: [PATCH] Quote and escape bytes in QCheck{,2}.Print too --- src/core/QCheck.ml | 2 +- src/core/QCheck2.ml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/QCheck.ml b/src/core/QCheck.ml index 2d74904..f6b2327 100644 --- a/src/core/QCheck.ml +++ b/src/core/QCheck.ml @@ -479,8 +479,8 @@ module Print = struct let int = string_of_int let bool = string_of_bool let float = string_of_float - let bytes = Bytes.to_string let string s = Printf.sprintf "%S" s + let bytes b = string (Bytes.to_string b) let char c = Printf.sprintf "%C" c let option f = function diff --git a/src/core/QCheck2.ml b/src/core/QCheck2.ml index b4e8560..0c821a0 100644 --- a/src/core/QCheck2.ml +++ b/src/core/QCheck2.ml @@ -797,10 +797,10 @@ module Print = struct let float = string_of_float - let bytes = Bytes.to_string - let string s = Printf.sprintf "%S" s + let bytes b = string (Bytes.to_string b) + let char c = Printf.sprintf "%C" c let option f = function