Skip to content
This repository was archived by the owner on Oct 9, 2019. It is now read-only.
This repository was archived by the owner on Oct 9, 2019. It is now read-only.

Can create a crash by returning an invalid fuzzer from andThen #160

@jwoudenberg

Description

@jwoudenberg

This fuzzer will run into a Debug.crash:

myFuzz : Fuzzer Int
myFuzz =
    int |> andThen (\_ -> frequency [])

Error message reads:

    This test failed because it threw an exception: "Error: Ran into a `Debug.crash` in module `Fuzz.Internal` on line 63
    The message provided by the code author is:

        This shouldn't happen: Fuzz.Internal.unpackGenVal"

Looking at the code I don't think there's a ton we can do about this, but I wanted to report anyway. andThen, by its nature, ensures we only know whether a fuzzer is valid after running it which conflicts with the idea of fuzzer validness itself.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions