diff options
author | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-27 13:07:54 -0500 |
---|---|---|
committer | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-27 13:07:54 -0500 |
commit | 16f0cd61f101ad1de2da3b3445b7f31b124de317 (patch) | |
tree | 8a452edade6b91951bc8c189b185e57b7853beb9 /tests | |
parent | 2ed08625f7f56ab5c086498d47242299cff10e98 (diff) |
MPI encode/decode QuickCheck
Diffstat (limited to 'tests')
-rw-r--r-- | tests/suite.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/suite.hs b/tests/suite.hs index 694a70a..afadc35 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_MPI_serialization_loop :: OpenPGP.MPI -> Bool | ||
44 | prop_MPI_serialization_loop mpi = | ||
45 | mpi == decode (encode mpi) | ||
46 | |||
43 | prop_SignatureSubpacket_serialization_loop :: OpenPGP.SignatureSubpacket -> Bool | 47 | prop_SignatureSubpacket_serialization_loop :: OpenPGP.SignatureSubpacket -> Bool |
44 | prop_SignatureSubpacket_serialization_loop packet = | 48 | prop_SignatureSubpacket_serialization_loop packet = |
45 | packet == decode (encode packet) | 49 | packet == decode (encode packet) |
@@ -135,6 +139,7 @@ tests = | |||
135 | testCase "uncompressed-ops-dsa.gpg" (testSerialization "uncompressed-ops-dsa.gpg"), | 139 | testCase "uncompressed-ops-dsa.gpg" (testSerialization "uncompressed-ops-dsa.gpg"), |
136 | testCase "uncompressed-ops-dsa-sha384.txt.gpg" (testSerialization "uncompressed-ops-dsa-sha384.txt.gpg"), | 140 | testCase "uncompressed-ops-dsa-sha384.txt.gpg" (testSerialization "uncompressed-ops-dsa-sha384.txt.gpg"), |
137 | testCase "uncompressed-ops-rsa.gpg" (testSerialization "uncompressed-ops-rsa.gpg"), | 141 | testCase "uncompressed-ops-rsa.gpg" (testSerialization "uncompressed-ops-rsa.gpg"), |
142 | testProperty "MPI encode/decode" prop_MPI_serialization_loop, | ||
138 | testProperty "SignatureSubpacket encode/decode" prop_SignatureSubpacket_serialization_loop | 143 | testProperty "SignatureSubpacket encode/decode" prop_SignatureSubpacket_serialization_loop |
139 | ], | 144 | ], |
140 | testGroup "S2K count" [ | 145 | testGroup "S2K count" [ |