quickcheck property for parsing of content identifier logs
This commit is contained in:
parent
7c25cc7715
commit
936aee6a60
7 changed files with 40 additions and 16 deletions
|
@ -20,6 +20,7 @@ module Logs.MapLog (
|
|||
import Common
|
||||
import Annex.VectorClock
|
||||
import Logs.Line
|
||||
import Utility.QuickCheck
|
||||
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
import qualified Data.Map.Strict as M
|
||||
|
@ -32,6 +33,9 @@ data LogEntry v = LogEntry
|
|||
, value :: v
|
||||
} deriving (Eq, Show)
|
||||
|
||||
instance Arbitrary v => Arbitrary (LogEntry v) where
|
||||
arbitrary = LogEntry <$> arbitrary <*> arbitrary
|
||||
|
||||
type MapLog f v = M.Map f (LogEntry v)
|
||||
|
||||
buildMapLog :: (f -> Builder) -> (v -> Builder) -> MapLog f v -> Builder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue