diff options
author | Joey Hess <joey@kitenet.net> | 2012-12-20 00:06:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-12-20 00:08:30 -0400 |
commit | 7afe264a7af070a7d2e7b60455260646511476f3 (patch) | |
tree | 4c389c0697c2f88314b09e9c5cb442d1f1609498 | |
parent | a724c0e782ecc9bc097549f2c0a273da2bf61827 (diff) |
check
-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 |