{-# LANGUAGE CPP #-}
module Main (main) where
import qualified Test.Crypto.DSIGN
import qualified Test.Crypto.Hash
import qualified Test.Crypto.KES
import qualified Test.Crypto.VRF
import qualified Test.Crypto.Regressions
#ifdef SECP256K1_ENABLED
import qualified Test.Crypto.Vector.Secp256k1DSIGN
#endif
import qualified Test.Crypto.EllipticCurve
import Test.Tasty (TestTree, adjustOption, testGroup, defaultMain)
import Test.Tasty.QuickCheck (QuickCheckTests (QuickCheckTests))
import Cardano.Crypto.Libsodium (sodiumInit)
import Test.Crypto.Util (Lock, mkLock)
main :: IO ()
IO ()
main = do
IO ()
sodiumInit
Lock
mlockLock <- IO Lock
mkLock
TestTree -> IO ()
defaultMain (Lock -> TestTree
tests Lock
mlockLock)
tests :: Lock -> TestTree
tests :: Lock -> TestTree
tests Lock
mlockLock =
(QuickCheckTests -> QuickCheckTests) -> TestTree -> TestTree
forall v. IsOption v => (v -> v) -> TestTree -> TestTree
adjustOption (\(QuickCheckTests Int
i) -> Int -> QuickCheckTests
QuickCheckTests (Int -> QuickCheckTests) -> Int -> QuickCheckTests
forall a b. (a -> b) -> a -> b
$ Int -> Int -> Int
forall a. Ord a => a -> a -> a
max Int
i Int
1000) (TestTree -> TestTree)
-> ([TestTree] -> TestTree) -> [TestTree] -> TestTree
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
TestName -> [TestTree] -> TestTree
testGroup TestName
"cardano-crypto-class" ([TestTree] -> TestTree) -> [TestTree] -> TestTree
forall a b. (a -> b) -> a -> b
$
[ Lock -> TestTree
Test.Crypto.DSIGN.tests Lock
mlockLock
, Lock -> TestTree
Test.Crypto.Hash.tests Lock
mlockLock
, Lock -> TestTree
Test.Crypto.KES.tests Lock
mlockLock
, TestTree
Test.Crypto.VRF.tests
, TestTree
Test.Crypto.Regressions.tests
#ifdef SECP256K1_ENABLED
, TestTree
Test.Crypto.Vector.Secp256k1DSIGN.tests
#endif
, TestTree
Test.Crypto.EllipticCurve.tests
]