diff options
-rw-r--r-- | openpgp-asciiarmor.cabal | 5 | ||||
-rw-r--r-- | tests/suite.hs | 10 |
2 files changed, 6 insertions, 9 deletions
diff --git a/openpgp-asciiarmor.cabal b/openpgp-asciiarmor.cabal index 82063dd..0feac1d 100644 --- a/openpgp-asciiarmor.cabal +++ b/openpgp-asciiarmor.cabal | |||
@@ -54,9 +54,8 @@ Test-Suite tests | |||
54 | , base64-bytestring | 54 | , base64-bytestring |
55 | , bytestring | 55 | , bytestring |
56 | , cereal | 56 | , cereal |
57 | , HUnit | 57 | , tasty |
58 | , test-framework | 58 | , tasty-hunit |
59 | , test-framework-hunit | ||
60 | default-language: Haskell2010 | 59 | default-language: Haskell2010 |
61 | 60 | ||
62 | Benchmark benchmark | 61 | Benchmark benchmark |
diff --git a/tests/suite.hs b/tests/suite.hs index 5ad3d05..3a7b7eb 100644 --- a/tests/suite.hs +++ b/tests/suite.hs | |||
@@ -1,7 +1,5 @@ | |||
1 | import Test.Framework (defaultMain, testGroup, Test) | 1 | import Test.Tasty (defaultMain, testGroup, TestTree) |
2 | import Test.Framework.Providers.HUnit | 2 | import Test.Tasty.HUnit (Assertion, assertEqual, assertFailure, testCase) |
3 | |||
4 | import Test.HUnit (Assertion, assertEqual, assertFailure) | ||
5 | 3 | ||
6 | import Codec.Encryption.OpenPGP.ASCIIArmor (decode, decodeLazy, encode, encodeLazy, multipartMerge) | 4 | import Codec.Encryption.OpenPGP.ASCIIArmor (decode, decodeLazy, encode, encodeLazy, multipartMerge) |
7 | import Codec.Encryption.OpenPGP.ASCIIArmor.Types | 5 | import Codec.Encryption.OpenPGP.ASCIIArmor.Types |
@@ -89,8 +87,8 @@ testStrictEncode fp = do | |||
89 | let fakearmors = [Armor ArmorMessage [("Version","OpenPrivacy 0.99")] bs, ClearSigned [("Hash","SHA1")] bs (Armor ArmorSignature [("Version","OpenPrivacy 0.99")] bs)] | 87 | let fakearmors = [Armor ArmorMessage [("Version","OpenPrivacy 0.99")] bs, ClearSigned [("Hash","SHA1")] bs (Armor ArmorSignature [("Version","OpenPrivacy 0.99")] bs)] |
90 | assertEqual ("strict encode") (encodeLazy fakearmors) (BL.fromChunks [(encode fakearmors)]) | 88 | assertEqual ("strict encode") (encodeLazy fakearmors) (BL.fromChunks [(encode fakearmors)]) |
91 | 89 | ||
92 | tests :: [Test] | 90 | tests :: TestTree |
93 | tests = [ | 91 | tests = testGroup "openpgp-asciiarmor" [ |
94 | testGroup "CRC24" [ | 92 | testGroup "CRC24" [ |
95 | testCase "CRC24: A" (testCRC24 (BC8.pack "A") 16680698) | 93 | testCase "CRC24: A" (testCRC24 (BC8.pack "A") 16680698) |
96 | , testCase "CRC24: Haskell" (testCRC24 (BC8.pack "Haskell") 15612750) | 94 | , testCase "CRC24: Haskell" (testCRC24 (BC8.pack "Haskell") 15612750) |