check
This commit is contained in:
parent
df90a2acd5
commit
1702409f00
2 changed files with 8 additions and 0 deletions
|
@ -15,6 +15,8 @@ module Logs.Trust (
|
|||
lookupTrust,
|
||||
trustMapLoad,
|
||||
trustMapRaw,
|
||||
|
||||
prop_parse_show_TrustLog,
|
||||
) where
|
||||
|
||||
import qualified Data.Map as M
|
||||
|
@ -113,3 +115,8 @@ showTrustLog Trusted = "1"
|
|||
showTrustLog UnTrusted = "0"
|
||||
showTrustLog DeadTrusted = "X"
|
||||
showTrustLog SemiTrusted = "?"
|
||||
|
||||
prop_parse_show_TrustLog :: Bool
|
||||
prop_parse_show_TrustLog = all check [minBound .. maxBound]
|
||||
where
|
||||
check l = parseTrustLog (showTrustLog l) == l
|
||||
|
|
1
test.hs
1
test.hs
|
@ -122,6 +122,7 @@ quickcheck = TestLabel "quickcheck" $ TestList
|
|||
, qctest "prop_read_show_direct" Annex.Content.Direct.prop_read_show_direct
|
||||
, qctest "prop_parse_show_log" Logs.Presence.prop_parse_show_log
|
||||
, qctest "prop_read_show_TrustLevel" Types.TrustLevel.prop_read_show_TrustLevel
|
||||
, qctest "prop_parse_show_TrustLog" Logs.Trust.prop_parse_show_TrustLog
|
||||
]
|
||||
|
||||
blackbox :: Test
|
||||
|
|
Loading…
Reference in a new issue