NorfairKing / validity

Validity and validity-based testing
https://www.youtube.com/watch?v=eIs9qNh17SM
MIT License
156 stars 31 forks source link

genvalidity-text-1.0.0.0 testsuite failed in Stackage Nightly build #101

Closed juhp closed 2 years ago

juhp commented 2 years ago
    Failures:

      test/Data/GenValidity/TextSpec.hs:89:28: 
      1) Data.GenValidity.Text, Strict Text, textWithoutAnyOf, never contains any of the given chars
           Falsifiable (after 62 tests):
             "Sf\177445j\ETB\1042812\STX\RS\ESC\54796K,\145365%\165630\r\ETB\990043r\1090611V\b{\1075011\135158P\1020487 \1080484\53064\65533o[\169085<\SOH\186133Yj}g4fOp"
             "\65533\1090810\170309\265568\1108101\65533\595966\1010967\986930\916105\2241\860537\660185\658381\1001861\65533\30519\485547\717184\65533\419308\1022746\347921\65533\446086\628980\974780\461121\1113039\796610\65533\251864\716438\65533\492899"
           predicate succeeded on: "\65533\1090810\170309\265568\1108101\65533\595966\1010967\986930\916105\2241\860537\660185\658381\1001861\65533\30519\485547\717184\65533\419308\1022746\347921\65533\446086\628980\974780\461121\1113039\796610\65533\251864\716438\65533\492899"

      To rerun use: --match "/Data.GenValidity.Text/Strict Text/textWithoutAnyOf/never contains any of the given chars/"

    Randomized with seed 18824094

    Finished in 0.0146 seconds
    13 examples, 1 failure
NorfairKing commented 2 years ago

Well this is new. It's a flaky test I guess.

juhp commented 2 years ago

It seems so

NorfairKing commented 2 years ago

Managed to repro this locally repro

NorfairKing commented 2 years ago

Oh goodie, this is a UTF16 surrogate code point character thing again:

      it "works with \65533" $ 
        let c = '\65533'
         in forAll (textWithoutAny c) $ \t ->
              ST.unpack t `shouldNotSatisfy` elem c
NorfairKing commented 2 years ago

Should be fixed in genvalidity-text-1.0.0.1.