From 55fa003d68c79ee928fbcdef0c922e333282afe9 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Wed, 28 Mar 2018 21:42:21 -0400 Subject: Switch from test-framework to tasty --- openpgp-asciiarmor.cabal | 5 ++--- 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 , base64-bytestring , bytestring , cereal - , HUnit - , test-framework - , test-framework-hunit + , tasty + , tasty-hunit default-language: Haskell2010 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 @@ -import Test.Framework (defaultMain, testGroup, Test) -import Test.Framework.Providers.HUnit - -import Test.HUnit (Assertion, assertEqual, assertFailure) +import Test.Tasty (defaultMain, testGroup, TestTree) +import Test.Tasty.HUnit (Assertion, assertEqual, assertFailure, testCase) import Codec.Encryption.OpenPGP.ASCIIArmor (decode, decodeLazy, encode, encodeLazy, multipartMerge) import Codec.Encryption.OpenPGP.ASCIIArmor.Types @@ -89,8 +87,8 @@ testStrictEncode fp = do let fakearmors = [Armor ArmorMessage [("Version","OpenPrivacy 0.99")] bs, ClearSigned [("Hash","SHA1")] bs (Armor ArmorSignature [("Version","OpenPrivacy 0.99")] bs)] assertEqual ("strict encode") (encodeLazy fakearmors) (BL.fromChunks [(encode fakearmors)]) -tests :: [Test] -tests = [ +tests :: TestTree +tests = testGroup "openpgp-asciiarmor" [ testGroup "CRC24" [ testCase "CRC24: A" (testCRC24 (BC8.pack "A") 16680698) , testCase "CRC24: Haskell" (testCRC24 (BC8.pack "Haskell") 15612750) -- cgit v1.2.3