mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-11-26 17:13:57 +03:00
make test suite more obviously correct
This commit is contained in:
parent
5dd5bc4100
commit
ba69f6846a
@ -93,9 +93,8 @@ prop_addToKeys n m = lower (IMap.addToKeys n m) == IntMap.mapKeysMonotonic (n+)
|
||||
prop_lookup :: Int -> I -> Bool
|
||||
prop_lookup k m = IMap.lookup k m == IntMap.lookup k (lower m)
|
||||
|
||||
prop_restrict :: Int -> Int -> I -> Bool
|
||||
prop_restrict k len m = lower (IMap.restrict k (Run len ()) m) == restrict (lower m) where
|
||||
restrict = fst . IntMap.split (k+len) . snd . IntMap.split (k-1)
|
||||
prop_restrict :: Int -> Run () -> I -> Bool
|
||||
prop_restrict k r m = lower (IMap.restrict k r m) == IntMap.intersection (lower m) (lowerRun k r)
|
||||
|
||||
prop_mapMaybe :: (O -> Maybe O) -> I -> Bool
|
||||
prop_mapMaybe f m = lower (IMap.mapMaybe f m) == IntMap.mapMaybe f (lower m)
|
||||
|
Loading…
Reference in New Issue
Block a user