Skip to content

Idea: Better Char and String Fuzzers #90

Open
@jonathanjouty

Description

@jonathanjouty

As mentioned in #89, I'm a fan of hedgehog.

hedgehog comes with a useful set of generators for characters and for strings too, such as (as would be written in Elm):

  • lower : Fuzzer Char
  • alphaNum: Fuzzer Char

These are great building blocks for larger fuzzers, as the generator for strings has the form (ignoring Range, discussed separately in #89):

string : Fuzzer Char -> Fuzzer String

Thus allowing the user to choose what class of characters to use when generating a list string.
In many cases all printable Unicode characters are invalid input.

Even if you represented valid strings safely using type MyAlphaString = MyAlphaString String. Writing a fuzzer for MyAlphaString is not straightforward.

Would you accept a PR in this direction? or prefer it as a separate package?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design QuestionNeeds design discussionfuzzersConcerns randomness or simplifiers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions