module Main (main) where

import Test.Hspec

import Cardano.Crypto.Libsodium (sodiumInit)
import Cardano.Crypto.WalletHD.Encrypted (
  withDeterministicRandomnessForTesting,
  withFastKdfForTesting,
 )
import qualified Test.Cardano.Crypto.Wallet.RoundTripSpec as RoundTrip
import qualified Test.Cardano.Crypto.Wallet.SignSpec as Sign
import qualified Test.Cardano.Crypto.Wallet.V2FormatSpec as V2Format

main :: IO ()
IO ()
main = do
  let withInit :: IO b -> IO b
withInit IO b
runTests = do
        IO ()
sodiumInit
        IO b -> IO b
forall a. IO a -> IO a
withFastKdfForTesting (IO b -> IO b) -> IO b -> IO b
forall a b. (a -> b) -> a -> b
$ IO b -> IO b
forall a. IO a -> IO a
withDeterministicRandomnessForTesting IO b
runTests
  Spec -> IO ()
hspec (Spec -> IO ()) -> Spec -> IO ()
forall a b. (a -> b) -> a -> b
$ (IO () -> IO ()) -> Spec -> Spec
forall a.
HasCallStack =>
(IO () -> IO ()) -> SpecWith a -> SpecWith a
aroundAll_ IO () -> IO ()
forall a. IO a -> IO a
withInit (Spec -> Spec) -> Spec -> Spec
forall a b. (a -> b) -> a -> b
$ do
    Spec
RoundTrip.tests
    Spec
V2Format.tests
    Spec
Sign.tests