diff options
-rw-r--r-- | Logs/Trust.hs | 7 | ||||
-rw-r--r-- | test.hs | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Logs/Trust.hs b/Logs/Trust.hs index e5322e04e..8f568eba7 100644 --- a/Logs/Trust.hs +++ b/Logs/Trust.hs @@ -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 @@ -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 |