Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quote and escape Observable strings and chars #296

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## NEXT RELEASE

- ...
- Quote and escape when printing `string` and `char` in the `Observable` module
for function generation

## 0.22

Expand Down
2 changes: 1 addition & 1 deletion example/QCheck_runner_test.expected.ocaml4.32
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Test FAIL_pred_map_commute failed (47 shrink steps):

Test FAIL_fun2_pred_strings failed (1 shrink steps):

{some other string -> false; _ -> true}
{"some other string" -> false; _ -> true}

--- Failure --------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion example/QCheck_runner_test.expected.ocaml4.64
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Test FAIL_pred_map_commute failed (77 shrink steps):

Test FAIL_fun2_pred_strings failed (1 shrink steps):

{some other string -> false; _ -> true}
{"some other string" -> false; _ -> true}

--- Failure --------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion example/QCheck_runner_test.expected.ocaml5.32
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Test FAIL_pred_map_commute failed (47 shrink steps):

Test FAIL_fun2_pred_strings failed (1 shrink steps):

{some other string -> false; _ -> true}
{"some other string" -> false; _ -> true}

--- Failure --------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion example/QCheck_runner_test.expected.ocaml5.64
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Test FAIL_pred_map_commute failed (79 shrink steps):

Test FAIL_fun2_pred_strings failed (1 shrink steps):

{some other string -> false; _ -> true}
{"some other string" -> false; _ -> true}

--- Failure --------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions src/core/QCheck.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1004,8 +1004,8 @@ module Observable = struct
let int : int t = make ~hash:H.int ~eq:Eq.int Print.int
let float : float t = make ~eq:Eq.float Print.float
let bytes = make ~hash:H.bytes ~eq:Eq.bytes Print.bytes
let string = make ~hash:H.string ~eq:Eq.string Print.string
let char = make ~hash:H.char ~eq:Eq.char Print.char
let string = make ~hash:H.string ~eq:Eq.string (sprintf "%S")
let char = make ~hash:H.char ~eq:Eq.char (sprintf "%C")

let option p =
make ~hash:(H.opt p.hash) ~eq:(Eq.option p.eq)
Expand Down
2 changes: 1 addition & 1 deletion test/core/QCheck_expect_test.expected.ocaml4.32
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ Test fail_pred_map_commute failed (47 shrink steps):

Test fail_pred_strings failed (1 shrink steps):

{some other string -> false; _ -> true}
{"some other string" -> false; _ -> true}

--- Failure --------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion test/core/QCheck_expect_test.expected.ocaml4.64
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ Test fail_pred_map_commute failed (77 shrink steps):

Test fail_pred_strings failed (1 shrink steps):

{some other string -> false; _ -> true}
{"some other string" -> false; _ -> true}

--- Failure --------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions test/core/QCheck_expect_test.expected.ocaml5.32
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ Test fail_pred_map_commute failed (47 shrink steps):

Test fail_pred_strings failed (1 shrink steps):

{some other string -> false; _ -> true}
{"some other string" -> false; _ -> true}

--- Failure --------------------------------------------------------------------

Expand Down Expand Up @@ -552,7 +552,7 @@ Test fold_left fold_right uncurried fun last failed (25 shrink steps):

Test fold_left test, fun first failed (66 shrink steps):

({(, 2) -> "a"; _ -> ""}, "", [], [2])
({("", 2) -> "a"; _ -> ""}, "", [], [2])

--- Failure --------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions test/core/QCheck_expect_test.expected.ocaml5.64
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ Test fail_pred_map_commute failed (79 shrink steps):

Test fail_pred_strings failed (1 shrink steps):

{some other string -> false; _ -> true}
{"some other string" -> false; _ -> true}

--- Failure --------------------------------------------------------------------

Expand Down Expand Up @@ -584,7 +584,7 @@ Test fold_left fold_right uncurried fun last failed (25 shrink steps):

Test fold_left test, fun first failed (66 shrink steps):

({(, 2) -> "a"; _ -> ""}, "", [], [2])
({("", 2) -> "a"; _ -> ""}, "", [], [2])

--- Failure --------------------------------------------------------------------

Expand Down
Loading