-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels
Description
unordered-containers/tests/Strictness.hs
Lines 24 to 29 in 4da2c20
-- Key type that generates more hash collisions. | |
newtype Key = K { unK :: Int } | |
deriving (Arbitrary, Eq, Ord, Show) | |
instance Hashable Key where | |
hashWithSalt salt k = hashWithSalt salt (unK k) `mod` 20 |
This hash function produces only values in the range [0..19]
. As a result, a typical generated tree will have a BitmapIndexed
root node that contains some Leaf
s and some Collision
s. No Full
nodes at all, and no internal/non-root BitmapIndexed
nodes!
It seems very likely that some code added since #317 hasn't been tested at all. :/