elm-explorations / test

Write unit and fuzz tests for Elm code.
https://package.elm-lang.org/packages/elm-explorations/test/latest
BSD 3-Clause "New" or "Revised" License
236 stars 40 forks source link

fuzz floatRange throws "RangeError: Maximum call stack size exceeded" #142

Open malaire opened 4 years ago

malaire commented 4 years ago

Following test gives error

This test failed because it threw an exception: "RangeError: Maximum call stack size exceeded"

    fuzz (Fuzz.floatRange (2.0 ^ 40.0) (2.0 ^ 50.0)) "This will fail" <|
        \x -> Expect.fail "Fail"

I noticed there are few issues like this, but none seemed relevant as I'm only generating single random value here, so no use of e.g. andThen or fuzz2.

Janiczek commented 2 years ago

This will be fixed with the version of elm-test currently in master (the soon to be 2.0.0):

> examples 5 (floatRange (2.0^40.0) (2.0 ^ 50.0))
[1125899906842624,1125899906842623.8,1125899906842623.8,1099511627776,757002359856705.2]
    : List Float