Quote and escape Observable strings and chars #296
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When recently using QCheck's function generation support, I noticed an issue with its printing of chars and strings.
Consider these two examples:
resulting in output such as:
Note the not-so-helpful function domain printing:
� -> true
and-> false
.This PR therefore offers a quickfix to these two printers, aligning them with the
arbitrary
printers, and thus offering a uniform print out:Looking further,
arbitrary
one more time, rather than use thePrint
module, supposed to be used for thisQCheck2.Print.char
andQCheck2.Print.string
already behave like the above, creating a QCheck.Print / QCheck2.Print mismatch for chars and strings 😱I'll therefore file a sister-PR with a breaking change to
QCheck.Print.{char,string}
restoring uniformity and order to the universe... ⭐ ...then we discuss the preferred solution and whether anyone's (expect) tests may be broken by it.