diff options
author | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-27 12:31:19 -0500 |
---|---|---|
committer | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-27 12:31:19 -0500 |
commit | 11dcd91f565e298f2a51b13e5d5e2b4423079717 (patch) | |
tree | c985060d659e4714283c03bc725d2219d6959664 | |
parent | 322b24671707c5dc73c51949731f6e5e28948553 (diff) |
SignatureSubpacket encode/decode QuickCheck
-rw-r--r-- | tests/suite.hs | 7 |
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 | |||
40 | prop_s2k_count c = | 40 | prop_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 | ||
43 | prop_SignatureSubpacket_serialization_loop :: OpenPGP.SignatureSubpacket -> Bool | ||
44 | prop_SignatureSubpacket_serialization_loop packet = | ||
45 | packet == decode (encode packet) | ||
46 | |||
43 | tests :: [Test] | 47 | tests :: [Test] |
44 | tests = | 48 | tests = |
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 |