summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStephen Paul Weber <singpolyma@singpolyma.net>2012-04-27 12:31:19 -0500
committerStephen Paul Weber <singpolyma@singpolyma.net>2012-04-27 12:31:19 -0500
commit11dcd91f565e298f2a51b13e5d5e2b4423079717 (patch)
treec985060d659e4714283c03bc725d2219d6959664 /tests
parent322b24671707c5dc73c51949731f6e5e28948553 (diff)
SignatureSubpacket encode/decode QuickCheck
Diffstat (limited to 'tests')
-rw-r--r--tests/suite.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/suite.hs b/tests/suite.hs
index ede60bb..694a70a 100644
--- a/tests/suite.hs
+++ b/tests/suite.hs
@@ -40,6 +40,10 @@ prop_s2k_count :: Word8 -> Bool
40prop_s2k_count c = 40prop_s2k_count c =
41 c == OpenPGP.encode_s2k_count (OpenPGP.decode_s2k_count c) 41 c == OpenPGP.encode_s2k_count (OpenPGP.decode_s2k_count c)
42 42
43prop_SignatureSubpacket_serialization_loop :: OpenPGP.SignatureSubpacket -> Bool
44prop_SignatureSubpacket_serialization_loop packet =
45 packet == decode (encode packet)
46
43tests :: [Test] 47tests :: [Test]
44tests = 48tests =
45 [ 49 [
@@ -130,7 +134,8 @@ tests =
130 testCase "onepass_sig" (testSerialization "onepass_sig"), 134 testCase "onepass_sig" (testSerialization "onepass_sig"),
131 testCase "uncompressed-ops-dsa.gpg" (testSerialization "uncompressed-ops-dsa.gpg"), 135 testCase "uncompressed-ops-dsa.gpg" (testSerialization "uncompressed-ops-dsa.gpg"),
132 testCase "uncompressed-ops-dsa-sha384.txt.gpg" (testSerialization "uncompressed-ops-dsa-sha384.txt.gpg"), 136 testCase "uncompressed-ops-dsa-sha384.txt.gpg" (testSerialization "uncompressed-ops-dsa-sha384.txt.gpg"),
133 testCase "uncompressed-ops-rsa.gpg" (testSerialization "uncompressed-ops-rsa.gpg") 137 testCase "uncompressed-ops-rsa.gpg" (testSerialization "uncompressed-ops-rsa.gpg"),
138 testProperty "SignatureSubpacket encode/decode" prop_SignatureSubpacket_serialization_loop
134 ], 139 ],
135 testGroup "S2K count" [ 140 testGroup "S2K count" [
136 testProperty "S2K count encode reverses decode" prop_s2k_count 141 testProperty "S2K count encode reverses decode" prop_s2k_count