adding an optional argument to Shrink.string for character shrinking, with a conservative default
fix character shrinkers in QCheck.{printable_string,printable_string_of_size,small_printable_string,numeral_string,numeral_string_of_size} so that they have the expected behaviour.
For now, we don't expose a string arbitrary that takes a shrinker as argument. Albeit it would be nice, there is the question of how to do it. I see three possibilities:
add an optional argument to QCheck.string_gen and QCheck.string_gen_of_size
add a non-optional argument to QCheck.string_gen and QCheck.string_gen_of_size
add two functions: QCheck.string_gen_shrink and QCheck.string_gen_shrink_of_size
This PR is an attempt to fix #257.
It does so by:
Shrink.string
for character shrinking, with a conservative defaultQCheck.{printable_string,printable_string_of_size,small_printable_string,numeral_string,numeral_string_of_size}
so that they have the expected behaviour.For now, we don't expose a
string arbitrary
that takes a shrinker as argument. Albeit it would be nice, there is the question of how to do it. I see three possibilities:QCheck.string_gen
andQCheck.string_gen_of_size
QCheck.string_gen
andQCheck.string_gen_of_size
QCheck.string_gen_shrink
andQCheck.string_gen_shrink_of_size