Skip to content

Commit

Permalink
Restyled by fourmolu
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed Nov 5, 2024
1 parent d5e6ae5 commit 85991da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/unit/TestContext.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Swarm.Util (showT)
import Test.QuickCheck.Instances.Text ()
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (Assertion, assertBool, assertEqual, testCase)
import Test.Tasty.QuickCheck (testProperty, Gen, generate, withMaxSuccess, Arbitrary(..))
import Test.Tasty.QuickCheck (Arbitrary (..), Gen, generate, testProperty, withMaxSuccess)

testContext :: TestTree
testContext =
Expand Down Expand Up @@ -47,11 +47,11 @@ testContext =
"no paired hash collisions"
(withMaxSuccess 10000 (hashConsistent @Int))
, testCase
"no hash collisions in a large pool" $
do
"no hash collisions in a large pool"
$ do
ctxs <- generate (replicateM 100000 (arbitrary :: Gen (Ctx Int)))
let m = M.fromListWith (++) (map (\ctx -> (ctxHash ctx, [unCtx ctx])) ctxs)
assertBool "foo" $ all ((==1) . length . nub) m
assertBool "foo" $ all ((== 1) . length . nub) m
]
where
ctx1 = singleton "x" 3
Expand Down

0 comments on commit 85991da

Please sign in to comment.