Skip to content

Commit

Permalink
Slightly nicer looking cover/tabulate
Browse files Browse the repository at this point in the history
  • Loading branch information
dustin committed Aug 24, 2023
1 parent 4294d6e commit a2159f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/ExpiringSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ allOpTypes = ["Insert", "Delete", "Update", "UpdateNothing", "NewGeneration"]
-- Verify that after a series of operations, the map and expiring map return the same values for the given keys.
prop_expMapDoesMapStuff :: [Mutation] -> [SomeKey] -> Property
prop_expMapDoesMapStuff ops lookups =
coverTable "pkt types" ((,5) <$> allOpTypes) $
tabulate "pkt types" (takeWhile (/= ' ') . show <$> ops) $
coverTable "mutation types" ((,5) <$> allOpTypes) $ -- The test paths should hit every mutation type (5% min)
tabulate "mutation types" (takeWhile (/= ' ') . show <$> ops) $ -- We can identify one by the first word in its constructor
checkCoverage $
((`Map.lookup` massocs) <$> lookups) === ((`ExpiringMap.lookup` eassocs) <$> lookups)
where
Expand Down

0 comments on commit a2159f3

Please sign in to comment.