module Lorentz.Test.Import
( testTreesWithContractL
, specWithContractL
) where
import Data.Singletons (SingI)
import Test.Hspec (Spec)
import Test.Tasty (TestTree)
import qualified Lorentz.Base as L
import Michelson.Test.Import (specWithContract, testTreesWithContract)
import Michelson.Typed (ToT)
import qualified Michelson.Untyped as U
testTreesWithContractL
:: (Each [Typeable, SingI] [ToT cp, ToT st], HasCallStack)
=> FilePath -> ((U.Contract, L.Contract cp st) -> IO [TestTree]) -> IO [TestTree]
testTreesWithContractL file testImpl = testTreesWithContract file (testImpl . second L.I)
specWithContractL
:: (Each [Typeable, SingI] [ToT cp, ToT st], HasCallStack)
=> FilePath -> ((U.Contract, L.Contract cp st) -> Spec) -> Spec
specWithContractL file mkSpec = specWithContract file (mkSpec . second L.I)