summaryrefslogtreecommitdiff
path: root/Logs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-12-20 00:06:55 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-12-20 00:08:30 -0400
commit7afe264a7af070a7d2e7b60455260646511476f3 (patch)
tree4c389c0697c2f88314b09e9c5cb442d1f1609498 /Logs
parenta724c0e782ecc9bc097549f2c0a273da2bf61827 (diff)
check
Diffstat (limited to 'Logs')
-rw-r--r--Logs/Trust.hs7
1 files changed, 7 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