Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property test failure #450

Open
tomjaguarpaw opened this issue Dec 11, 2024 · 0 comments
Open

Property test failure #450

tomjaguarpaw opened this issue Dec 11, 2024 · 0 comments

Comments

@tomjaguarpaw
Copy link
Contributor

This looks like a genuine property test failure, but I've no idea what to do about it:

https://github.com/kowainik/tomland/actions/runs/12285988153/job/34285197633

  test/Test/Toml/Codec/Combinator/Common.hs:39:5: 
  1) Codec: unit and property tests for bidirectional codecs, Combinator spec, Combinator.Map: Roundtrip tests, Map Text [Int] (tableMap): decode . encode ≡ id
       failed after 53 tests and 19 shrinks.
       shrink path: 53:d4EdK2l5M3s3
       
          ┏━━ test/Test/Toml/Codec/Combinator/Common.hs ━━━
       34 ┃     -> Gen a
       35 ┃     -> SpecWith (Arg Expectation)
       36 ┃ codecRoundtripWith dcode typeName mkCodec genA = it label $ hedgehog $ do
       37 ┃     a <- forAll genA
          ┃     │ fromList [ ( "b-" , [ 0 ] ) , ( "b-.aa" , [ 0 ] ) ]
       38 ┃     let codec = mkCodec "a"
       39 ┃     tripping a (encode codec) (dcode codec)
          ┃     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          ┃     │ ━━━ Intermediate ━━━
          ┃     │ "\n[a]\n  [[a.b-]]\n    val = 0\n\n  [[a.b-.aa]]\n    val = 0\n"
          ┃     │ ━━━ - Original) (+ Roundtrip ━━━
          ┃     │ - Right (fromList [ ( "b-" , [ 0 ] ) , ( "b-.aa" , [ 0 ] ) ])
          ┃     │ + Right (fromList [ ( "b-" , [ 0 ] ) ])
       40 ┃   where
       41 ┃     label :: String
       42 ┃     label = typeName ++ ": decode . encode ≡ id"

  To rerun use: --match "/Codec: unit and property tests for bidirectional codecs/Combinator spec/Combinator.Map: Roundtrip tests/Map Text [Int] (tableMap): decode . encode ≡ id/" --seed 830760668
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant