x509 1.5.0 → 1.5.0.1
raw patch · 2 files changed
+12/−16 lines, 2 filesdep +tastydep +tasty-quickcheckdep −HUnitdep −QuickCheckdep −test-frameworkPVP ok
version bump matches the API change (PVP)
Dependencies added: tasty, tasty-quickcheck
Dependencies removed: HUnit, QuickCheck, test-framework, test-framework-hunit, test-framework-quickcheck2, time
API changes (from Hackage documentation)
Files
- Tests/Tests.hs +8/−9
- x509.cabal +4/−7
Tests/Tests.hs view
@@ -1,10 +1,8 @@ {-# LANGUAGE ScopedTypeVariables #-} module Main where -import Test.Framework (defaultMain, testGroup)-import Test.Framework.Providers.QuickCheck2 (testProperty)--import Test.QuickCheck+import Test.Tasty+import Test.Tasty.QuickCheck import qualified Data.ByteString as B @@ -17,8 +15,7 @@ import qualified Crypto.Types.PubKey.RSA as RSA import qualified Crypto.Types.PubKey.DSA as DSA -import Data.Time.Clock-import Data.Time.Clock.POSIX+import Data.Hourglass instance Arbitrary RSA.PublicKey where arbitrary = do@@ -78,8 +75,10 @@ arbitrary = DistinguishedName <$> (choose (1,5) >>= \l -> replicateM l arbitraryDE) where arbitraryDE = (,) <$> arbitrary <*> arbitrary -instance Arbitrary UTCTime where- arbitrary = posixSecondsToUTCTime . fromIntegral <$> (arbitrary :: Gen Int)+instance Arbitrary DateTime where+ arbitrary = timeConvert <$> (arbitrary :: Gen Elapsed)+instance Arbitrary Elapsed where+ arbitrary = Elapsed . Seconds <$> (choose (1, 100000000)) instance Arbitrary Extensions where arbitrary = Extensions <$> oneof@@ -146,7 +145,7 @@ Right v | v == e -> True | otherwise -> error ("expected " ++ show e ++ " got: " ++ show v) -main = defaultMain+main = defaultMain $ testGroup "X509" [ testGroup "marshall" [ testProperty "pubkey" (property_unmarshall_marshall_id :: PubKey -> Bool) , testProperty "signature alg" (property_unmarshall_marshall_id :: SignatureALG -> Bool)
x509.cabal view
@@ -1,5 +1,5 @@ Name: x509-Version: 1.5.0+Version: 1.5.0.1 Description: X509 reader and writer License: BSD3 License-file: LICENSE@@ -49,12 +49,9 @@ Build-Depends: base >= 3 && < 5 , bytestring , mtl- , QuickCheck >= 2- , HUnit- , test-framework- , test-framework-quickcheck2- , test-framework-hunit- , time+ , tasty+ , tasty-quickcheck+ , hourglass , asn1-types , x509 , crypto-pubkey-types