Skip to content

Commit

Permalink
Quote and escape bytes in QCheck{,2}.Print too
Browse files Browse the repository at this point in the history
  • Loading branch information
jmid committed Dec 7, 2024
1 parent 3639d68 commit abbc41b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/QCheck.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/core/QCheck2.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit abbc41b

Please sign in to comment.