avh4 / elm-color

Standard representation of colors, encouraging sharing between packages. (This replaces elm-lang/core#Color from Elm 0.18.)
BSD 3-Clause "New" or "Revised" License
23 stars 6 forks source link

Fuzz Test Failure #28

Open changlinli opened 8 months ago

changlinli commented 8 months ago

After updating the test dependency to add

"elm-explorations/test": "2.0.0 <= v < 3.0.0"

and changing the implementation of tuple2 and tuple3 in tests/ColorTest.elm to the following:

tuple2 : Fuzzer a -> Fuzzer b -> Fuzzer ( a, b )
tuple2 a b =
    Fuzz.pair a b

tuple3 : Fuzzer a -> Fuzzer b -> Fuzzer c -> Fuzzer ( a, b, c )
tuple3 a b c =
    Fuzz.triple a b c

to allow the most recent versions of either elm-test or elm-test-rs to run tests, I got the following tests:


Running 8963 tests. To reproduce these results later,
run elm-test-rs with --seed 1137142392 and --fuzz 100

↓ Color
✗ can represent HSLA colors (fromHsla)

Given ((0.9999999999999998,1,0.9999999999999998),0)

    0
    ╷
    │ Expect.within Absolute 1e-10
    ╵
    0.9999999999999998

↓ Color
✗ can represent HSLA colors (hsl)

Given (0,1.0000000827403713e-10,0.9999999999999998)

    0
    ╷
    │ Expect.within Absolute 1e-10
    ╵
    1.0000000827403713e-10

↓ Color
✗ can represent HSLA colors (hsla)

Given ((0.9999999999999998,1,0.9999999999999998),0)

    0
    ╷
    │ Expect.within Absolute 1e-10
    ╵
    0.9999999999999998

TEST RUN FAILED

Duration: 4510 ms
Passed:   8960
Failed:   3

I'm not sure whether these tests are spuriously failing, whether this reflects a true bug, whether this reflects some error in how I've upgraded the tests (although I don't think this is the case), or whether this is a bug in elm-explorations/test.